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 Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Framework mismatch (blocking for Laravel). Not a portability nuisance — a hard incompatibility with the intended runtime.
  • Abandonment. ~3 years since last release; 11 stars and 0 dependents means no production signal, no downstream bug reports, and no one else to discover a breaking change before you do.
  • Bus factor of one. Security response time is effectively undefined; there is no CVE feed monitoring this package.
  • Silent-failure class. Enum glue code fails quietly: a form type that coerces rather than rejects, a Doctrine type that hydrates the wrong case on unknown values, a serializer that emits "Active" where the API contract expects "active". These surface in production data, not in CI.
  • Opportunity score vs. composite score. The gap here (opportunity 28.55 against a 1.23 composite) is the useful signal: the problem — enum ergonomics across forms, persistence, and serialization — is genuinely worth solving. This artifact is not the way to solve it.

Key questions for the spike owner.

  1. Which specific capability do we need that Symfony 7 / Doctrine ORM 3 does not already provide? Name it concretely; if we cannot, the evaluation is over.
  2. What are our locked Symfony and PHP versions, and does the package's constraint set intersect them at all?
  3. Is there a maintained fork with Symfony 6.4/7 support, or a maintainer willing to merge a compatibility PR?
  4. What is the license, and does vendoring satisfy our OSS policy?
  5. Does the package have CI, static analysis, and tests we could inherit, or are we starting from zero?
  6. Who on the team owns this dependency through the next two Symfony majors?

Integration Approach

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.

  1. Spike (1 day): enumerate the bundle's public surface; diff it against native Symfony/Doctrine capabilities on our target version.
  2. Decision gate: if the diff is empty — and we expect it to be — record a "rejected: superseded by platform" ADR and stop.
  3. Gap implementation (if any): write the missing helper in-house with unit tests; register it as a normal service.
  4. If a fork is genuinely warranted: fork to the internal Git namespace, add Symfony 7 constraints, wire CI, and pin the fork to a named owner. This is the expensive branch — require a written justification naming the feature core cannot provide.

Operational Impact

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.

  • Form/validation coercion: an invalid enum input silently mapping to a default instead of raising. Test with deliberately invalid payloads, not just happy-path cases.
  • Persistence drift: unknown DB values hydrating to null or throwing at read time in production. Add a data-quality check over enum columns before and after any change.
  • Serialization shape changes: API consumers keyed to the bundle's string formatting breaking when we switch to core. Contract-test the JSON boundary.
  • DI/compile failures: bundle service definitions incompatible with the Symfony 7 container, failing at cache warmup — cheap to detect, but it means the app does not boot.
  • Abandonment surprises: a transitive dependency bump that forces an upgrade of this package we cannot make. Pin exact versions and put the package on the dependency-review watchlist.

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.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
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