Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Enum Serializer Bundle

Enum Serializer Bundle Laravel Package

mrgoodbytes8667/enum-serializer-bundle

A Symfony bundle that adds serialization support for PHP enums, making it easy to convert backed enum cases to and from scalar values across APIs, Doctrine and config, with lightweight integration and minimal setup.

View on GitHub
Deep Wiki
Context7

Enum Serializer Bundle brings first-class PHP 8.1+ enum support to the Symfony Serializer. Backed enums normalize to their scalar values and denormalize back automatically, eliminating the need for hand-written normalizers or custom logic in your DTOs.

  • Automatic normalization/denormalization for backed and pure enums
  • Context-aware value mapping for custom serialized representations
  • Attribute-driven configuration alongside existing serializer metadata
  • Seamless integration with Symfony's serializer service and DI container
  • Lightweight design with no extra runtime dependencies
Frequently asked questions about Enum Serializer Bundle
Is mrgoodbytes8667/enum-serializer-bundle a Laravel package?
No. It is a Symfony bundle, not a Laravel package. Laravel has no bundle registration mechanism; it uses service providers and the container. The bundle's value sits in its DI extension and compiler pass, which never execute in Laravel, so composer require-ing it yields no working integration.
Does this package work in a Laravel application?
There is no supported path to install it and have it just work in Laravel. You could pull symfony/serializer into the app and manually instantiate the normalizer, but that reimplements the bundle's entire contribution. Laravel also does not use symfony/serializer by default, so you inherit a new dependency surface for little gain.
How do I install enum-serializer-bundle?
You install it with Composer and then register the bundle in a Symfony application's bundles.php or kernel configuration. That registration step is where its normalizer wiring happens. For Laravel there is no equivalent bundle hook, so installation alone does nothing useful.
What Laravel versions does this package support?
None specifically. It is a Symfony bundle with no Laravel service provider, so Laravel version support is not part of its design. Any compatibility depends on its PHP, symfony/serializer, and spatie/enum constraints, which you should diff against your stack before considering it.
What is the license for this package?
The repository reports NOASSERTION, meaning there is no recognized license file. Absent an explicit license, default copyright applies and redistribution or use rights are unclear until legal review. That is a hard blocker for most enterprises.
Is this package actively maintained?
It has 0 stars, 0 dependents, and a single maintainer. With no downstream users there is no community bug-finding, no fork pressure, and no signal that the code has been exercised outside the author's own use. You would be the first real adopter, not a beneficiary of a mature tool.
What are Laravel alternatives to this Symfony enum serializer?
Use an Eloquent cast plus an API Resource transformer for enum serialization, or adopt spatie/laravel-data for declarative DTO serialization. If you truly need symfony/serializer semantics, wire a custom normalizer in a service provider. These keep you on first-party idioms and avoid dragging Symfony bootstrapping into the runtime.
Does it support PHP 8.1 native backed enums?
The bundle depends on spatie/enum's class-based enum API, which coexists awkwardly with PHP 8.1+ native backed enums. Compatibility with current spatie/enum majors is unverified, and the normalizer likely handles only one model. Confirm behavior against your enum style before any pilot.
Can I use symfony/serializer in Laravel?
Yes, you can install symfony/serializer and wire a custom normalizer in a Laravel service provider. But Laravel's default JSON encoding path, Eloquent casts, and API Resources already cover most enum serialization needs. The manual wiring is roughly the same amount of code the bundle would have supplied.
Is there a test suite or CI, and which Symfony versions are supported?
The provided context does not confirm a test suite or CI, and compatibility with Symfony 6 and 7 is unverified. Check the repository for CI workflows and run it against your pinned PHP and Symfony versions. If no tests exist, treat the normalizer as unproven code and cover it with your own tests.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core