fervo/enum-bundle
fervo/enum-bundle provides practical utilities for working with PHP enums in Laravel applications, including helpers for enum-backed model attributes, validation, and common conversions so enum values stay type-safe and easy to use throughout your codebase.
Verdict up front: reject for a Laravel codebase; do not adopt for a Symfony codebase either — treat it as a reference implementation only. The package is a Symfony bundle (fervo/enum-bundle), not a Laravel package. It requires symfony/framework-bundle, bundle registration in config/bundles.php, and kernel/DI wiring. There is no service provider, no facade, and no Laravel integration path. Dropping it into a Laravel app would mean hand-porting its classes and re-implementing the container wiring it depends on — at which point you have written your own package.
Architecture fit. For Laravel: none. For Symfony: the bundle's premise is that PHP 8.1 backed enums need framework glue — a form type, a Doctrine DBAL type, a validator constraint, possibly Twig helpers. That premise was largely absorbed by the platform between 2022 and 2024: Doctrine ORM ships native enum mapping, Symfony Form ships an enum form type, the Serializer and value resolvers handle backed enums, and the Choice/Enum validator constraints cover validation. A bundle whose value proposition is "integrate enums into Symfony" is therefore competing with core, and core wins on every axis that matters (support, upgrade guarantees, docs).
Integration feasibility. Low. Last release October 2022 means the package's composer.json almost certainly does not declare Symfony 7 (or late 6.4) support. In a modern Symfony app, installation either fails resolution or requires version-constraint aliasing / --ignore-platform-req tricks that void any upgrade guarantee. Even where it installs, the payoff is a handful of thin classes covering surface area largely duplicated by core. The engineering cost of a fork-and-patch exceeds the cost of writing the two or three helpers you actually need (~100–200 LOC).
Technical risk.
"Active" where the API contract expects "active". These surface in production data, not in CI.Key questions for the spike owner.
Stack fit. Laravel shop: no fit — close the ticket, and if enum ergonomics are a real pain point, evaluate Laravel-native options (casts, Illuminate\Validation\Rules\Enum, backed-enum casts in Eloquent). Symfony shop: fit is nominal, not additive. Budget for a half-day spike, not a sprint.
Migration path. Invert the usual direction: this is not "adopt then migrate away from," it is "skip adoption, target core." The migration path for any team already on this bundle is a one-time replacement of its form type and Doctrine type with the native equivalents, plus a data audit on any persisted enum column whose on-disk representation the bundle chose for you. That audit — not the code change — is the risk-bearing step.
Compatibility. Assume Symfony 5.4/6.x and PHP 8.1 only. Verify rather than trust: read composer.json, run composer why-not against our pinned versions, and confirm PHP 8.2/8.3 deprecation cleanliness. If we decide we need a specific class from the bundle, vendor that file into app/Support with attribution and a test — do not take a dependency to obtain 40 lines of code.
Sequencing.
Maintenance. Forking converts a free dependency into a permanent internal liability: constraint bumps at every Symfony major, PHP-version deprecation sweeps, and a standing owner. Estimate ~0.1 FTE/year for a small fork — modest in isolation, but it is spend against a problem the platform already solved. Adoption without forking is worse: an unmaintained, unpatchable dependency sitting in the request path.
Support. No vendor, no SLA, no release cadence, no dependents generating issue traffic. Any question we have, we answer ourselves. Compare against core Symfony, where the answer is documentation, a release schedule, and a security advisory process.
Scaling. Runtime cost is negligible — these are thin wrappers with no I/O. The scaling concern is organizational: every additional service that pulls the package multiplies the upgrade surface, and the bus factor of one means the cost of a needed fix is unbounded rather than proportional. Breadth of adoption is the risk multiplier here, not request volume.
Failure modes to instrument for.
null or throwing at read time in production. Add a data-quality check over enum columns before and after any change.Ramp-up. A Symfony developer understands the surface in an hour — it is small and conventional. The expensive ramp-up is institutional: explaining to the next engineer, and to an auditor, why an unmaintained bundle with zero dependents sits in a critical path. That explanation is the deliverable to avoid needing.
How can I help you explore Laravel packages today?