- Is rz/formatter-bundle compatible with Laravel?
- No. rz/formatter-bundle is a Symfony 2 bundle that extends SonataFormatterBundle and relies on Symfony's Bundle class, DI compiler passes, and Sonata admin/block integration. None of that maps onto Laravel's service-provider, facade, and manager/driver model, so it cannot be used as a drop-in Laravel dependency. The formatting logic may be portable, but the packaging is not.
- Can I install rz/formatter-bundle with Composer in a Laravel 10 or 11 app?
- Direct Composer installation into Laravel 10 or 11 is not viable. The package targets Symfony 2.x and PHP 5.x-era constraints, with hard dependencies on symfony/http-kernel, symfony/dependency-injection, and Sonata packages, several of which are abandoned upstream. Those constraints will conflict with a modern Laravel application's dependency graph.
- What does rz/formatter-bundle actually do?
- It bundles reusable formatting helpers so applications can render dates, numbers, strings, and other values consistently. Its real value is a small set of formatter or parser implementations, such as Markdown, HTML sanitization, and text/plain transforms, registered into a formatter chain. The bundle wiring around that logic is Symfony- and Sonata-specific.
- How do I use rz/formatter-bundle formatters in a Laravel application?
- The realistic path is fork-and-extract rather than install. Copy the formatter classes you need, audit them for Symfony and Sonata type hints, and replace the Symfony service wiring with Laravel bindings. A clean shape is a FormatterManager bound as a singleton, drivers registered through config, a Formatter facade, and a format(string $type, string $value): string contract mirroring Sonata's chain semantics.
- Does rz/formatter-bundle support PHP 8?
- There is no evidence that it does. The bundle targets PHP 5.x-era constraints, and PHP 8 incompatibilities are likely in both this package and Sonata 2-era code, including implicit nullable parameters, dynamic properties, and deprecated constructs. A trial port of one representative formatter to PHP 8.2 is the recommended go/no-go check.
- Is rz/formatter-bundle still maintained?
- No. The repository is archived, has zero stars and zero dependents, and shows no evidence of tests, CI, or documentation. Archived status means no security or compatibility patches will arrive. That also means there is no community knowledge base to fall back on when behavior is unclear.
- What are the Laravel alternatives to rz/formatter-bundle?
- For nearly every plausible formatter there is a maintained Laravel-side equivalent with PHP 8 support. Common choices include league/commonmark or spatie/laravel-markdown for Markdown, a dedicated HTML sanitizer library for rich HTML, and Laravel's built-in Number and Str helpers for numeric and string formatting. Evaluate those first, since they likely cover most of the requirement without a fork.
- Is rz/formatter-bundle safe to run in production?
- It carries high structural risk. The package is archived, its transitive dependencies are abandoned, and that creates audit and CVE exposure with no upstream fixes. If rich HTML formatting is in scope, sanitization behavior must be re-verified independently, because legacy escaping assumptions are a common XSS vector.
- What license does rz/formatter-bundle use, and can I fork it?
- The license is not documented in the evaluation, so verify it in the repository before forking. Check for upstream attribution or copyleft obligations from SonataFormatterBundle and SonataCoreBundle lineage as well. Those obligations, not just the code itself, constrain how a fork can be distributed.
- How do I migrate from rz/formatter-bundle to a Laravel package?
- Start with an audit that enumerates formatter classes and classifies each as pure logic, Symfony-coupled, or Sonata-admin-coupled; expect the admin-coupled ones to be discarded. Trial port one representative formatter to PHP 8.2 as a go/no-go gate, then re-platform the survivors as a Laravel package targeting php ^8.2 and laravel/framework ^10|^11 with PSR-4 autoloading and package discovery. Because there are no upstream tests, establish parity with your own fixture suite covering the content types and output contracts you must preserve.