frostiede/enum-bundle
A Symfony bundle that simplifies working with PHP enums, providing integration helpers and utilities to use enum types more cleanly across your application. Ideal for projects adopting PHP 8.1+ enums with Symfony.
values()/labels()/options() helper surface — so the decision it informs is "do we standardize on enums across the domain model," not "do we adopt this library."registerBundles(), no Flex recipes), so the bundle layer is dead weight and may not autoload cleanly. Confirm a Laravel service provider and Eloquent integration actually exist before scoping any work; if they don't, this isn't a Laravel decision at all.Rule::enum(), ->enum() migration columns — cover most of what a userland enum library used to provide. Adopt only if a concrete capability gap exists (instance maps, ordering semantics, label lookup, coercion helpers) that native enums don't cover.toArray()/labels()/options() traits, and a genuine win from centralizing them. Restrict to prototypes, internal tools, or low-blast-radius services.symfony/* constraints, and license — then treat it as a fork you own, not a live dependency.bensampo/laravel-enum, archtechx/enums) or plain native enums plus a custom cast cover most needs.To executives: This is a small, near-zero-cost utility that removes an entire class of bugs — invalid or inconsistent status strings leaking into the database, APIs, and UI — and speeds delivery of any status- or workflow-driven feature. The code is tiny enough to fork and own internally, so maintenance risk is contained. Two caveats: it has no adoption and appears to be a Symfony bundle, so it may not fit our Laravel stack without adaptation. Recommendation: approve a short, timeboxed evaluation, not a production dependency.
To engineering: It's a thin helper layer over native PHP 8.1 enums — value/label maps, validation, casting. Given zero stars, zero dependents, and probable Symfony-only packaging, treat it as reference code: spend a day diffing its API against a ~40-line internal trait and against established alternatives (bensampo/laravel-enum, archtechx/enums), then either fork it under our namespace or reimplement only the parts we use. Either way we own the code, avoid an unpinned third-party dependency in the domain layer, and keep full static-analysis and IDE support. Hard gates before any integration: Composer resolution against our locked set, and a written native-enum gap analysis — if neither clears, the answer is "build," and we record that decision in our standards.
How can I help you explore Laravel packages today?