prolix/serializer-bundle
A Symfony bundle that integrates the Prolix serializer, providing autowired serialization services and bundle configuration for normalizers and encoders so you can convert PHP objects to and from JSON, XML and other formats with minimal boilerplate.
Despite living in a Composer ecosystem shared with Laravel, this is a Symfony framework bundle, not a Laravel package. The 3.1.2 release adds Symfony 5 support to an already Symfony-centric dependency set (symfony/framework-bundle, symfony/dependency-injection, symfony/twig-bundle, doctrine/orm). Before adding it:
AppKernel (3.x/4.x) or bundles.php (4.x+), plus config/bundles.php in Symfony Flex projects.composer require <vendor>/<package>:^3.1 and check that your app's Symfony version is 3.3+, 4.x, or 5.x (the new upper bound). Doctrine ORM 2.7 is the new floor for the dev/test matrix, but the ^2.7 constraint in 3.1.2 is a require-dev/suggest-level tightening — verify whether it's a runtime constraint in your copy of composer.json.bin/console debug:container and look for the service IDs it exposes, then exercise one read-only action (e.g. its controller/service) to confirm the DI graph resolves before you build feature work on top.If you're on Laravel and hoping to use this in-app: stop and evaluate alternatives. Laravel does not ship framework-bundle, so the bundle's service provider, compiler passes, and config tree will not load. Anything you extract must be done at the component level (e.g. an individual class that only depends on symfony/validator or symfony/yaml), not by installing the bundle.
Symfony-side integration (the intended path):
config/bundles.php (Symfony 4/5) or AppKernel::registerBundles() (3.x).config/packages/<bundle>.yaml, importing the bundle's default config and overriding keys. Use the config tree's nodes — Symfony will error on unknown keys, so this is also your discovery mechanism.$container->get().@BundleName/...; override by shadowing under templates/bundles/<BundleName>/.^2.4 still technically resolves in 3.1.x.Cross-cutting with Laravel codebases:
Symfony\Component\HttpKernel\Bundle\Bundle, ContainerBuilder, or FrameworkBundle event subscribers is not portable.symfony/yaml is already shipped in Laravel's vendor tree via Symfony components) rather than pulling the bundle in.Testing:
setUp(): void signatures. PHPUnit 8.5 requires PHP 7.2+ (and 7.2.5+ if you also run Symfony 5).symfony/framework-bundle is a hard dependency. This is the single biggest gotcha for Laravel developers: the package cannot load outside a Symfony kernel. Treat any Laravel compatibility claim as "extract the component, not the bundle."^2.7. Doctrine 2.7 changed several proxy/naming defaults and removed some deprecated APIs. If you were pinning to ^2.4 and haven't audited your entities/proxies, budget a pass before the upgrade.^8.5 — return-type hints on setUp/tearDown and assertRegExp → assertMatchesRegularExpression renames will bite if you have custom tests touching the bundle. This does not affect runtime code.composer require triggers a recipe; on older Symfony, you must edit AppKernel/bundles.php manually. Both paths are easy to miss — always verify with debug:container / debug:router.bin/console lint:container and cache:clear immediately after upgrade — the config schema is the most common source of post-upgrade breakage."*" constraint. The symfony/twig-bundle: * entry in the 3.1.2 notes means any version is accepted. This is loose — if you're debugging template resolution or block overrides, pin your Twig bundle to a known-good version in your app to isolate regressions.bin/console debug:event-dispatcher, debug:container --tag=<tag>, and the Symfony profiler's "Doctrine" and "Twig" panels. If a service is missing, it's almost always a compiler pass not running because the bundle wasn't registered or was registered conditionally in Kernel::registerBundles().Extension class is what owns the config tree; its CompilerPassInterface implementations are where tag-based services are wired. If you need to override one of its services, prefer a compiler pass decorating the service (Symfony 3.3+ supports setDecoratedService / decoration) over editing vendor config.composer why-not <vendor>/<package> after install to catch this.How can I help you explore Laravel packages today?