lamoda/enum-bundle
Lamoda EnumBundle is a lightweight Symfony bundle for modeling enumerated values as typed PHP classes, with labels, validation, Doctrine DBAL mapping, and form choice integration, helping teams keep reusable enum definitions consistent across domain logic and UI in Symfony applications.
EnumType, Doctrine DBAL types) so a single enum convention can be enforced across the codebase instead of ad-hoc constants and magic strings. That is a codebase-hygiene decision the package makes cheaper, not a decision the package makes for you.lamoda/php-enum. If the need is "enums in Symfony forms and Doctrine without hand-writing a form type and DBAL type per enum," buying (MIT, free) is cheaper than building and maintaining. If the need includes OpenAPI/schema generation, admin UI generation, or translated labels, you will build on top regardless — so this dependency is a partial down payment, not a solution.lamoda/php-enum library applies and you write your own casts. Flag it as an input to framework choice, not just a composer decision.lamoda/php-enum is already in the tree, small services with many small enums and a need for consistent form rendering — now including Symfony 6 services that have not yet migrated to native enums.Adopt only when all of these hold:
lamoda/php-enum investment, a live Symfony 5 codebase not yet on native enums, or a deliberate preference for that library's API over native enums.Look elsewhere when:
Decision rule: if Symfony on PHP 8.1+ native enums covers your cases, the correct PM answer is still "no new dependency." 1.6 removes a version blocker, not the reason to prefer native enums. Adopt only where boilerplate savings are concrete and the codebase is already committed to the underlying library.
To executives: A free, MIT-licensed utility that removes repetitive code from how we model fixed lists of values — order status, currency, user role. The new 1.6 release adds Symfony 6 compatibility, which means it is not frozen on an old framework version and we can run it on current Symfony services. Cost is near zero and it is easy to remove. But it remains a small, low-adoption library (10 stars, no dependents) and 1.6 is a compatibility bump rather than a sign of active roadmap investment, so we treat it as a tactical convenience with a planned exit to PHP's native enums, not a platform commitment. Recommendation: approve for Symfony services as a bridge dependency; revisit at the next major PHP/Symfony upgrade.
To engineering: It is glue, not a framework. The bundle registers enum services, provides a form type, Doctrine DBAL types, and validation so you stop hand-writing a type class per enum. Release 1.6 is a one-line change — Symfony 6 is now allowed by the constraint — so nothing in our code changes and there are no breaking changes or deprecations to plan around. Two caveats, stated plainly: (1) it is Symfony-only — Laravel gets nothing but the base lamoda/php-enum library and hand-written casts; (2) Symfony 6 is a PHP 8.1-era stack, so native backed enums plus Symfony's built-in support cover most of this, meaning adoption is a conscious trade of one thinly-maintained dependency for less boilerplate. Zero dependents means no community safety net — vendor or fork it before it goes anywhere critical.
The ask: approve conditional use in Symfony 5/6 services with a documented migration path to native enums; do not approve as a standard for new Laravel work, and do not treat the 1.6 compatibility bump as justification to expand scope.
How can I help you explore Laravel packages today?