orkhanahmadov/eloquent-enum-cast
Eloquent Enum Cast lets Laravel Eloquent models cast attributes to native PHP 8 enums. Declare an enum in your model's casts array and read database values as typed enum instances, keeping code type-safe and readable without manual conversion logic.
PHP ^8.0 support, which removes a platform-upgrade prerequisite from that decision.Adopt when:
Look elsewhere when:
For executives: We are evaluating a Laravel/PHP dependency rather than building the capability ourselves. The new 1.4.0 release restores PHP 8.0 support, which means adoption no longer forces a runtime upgrade — no additional engineering budget, no migration project, no separate release train. Recommendation is to pilot on one application, pin to 1.4.0, and revisit if the package's supported PHP range shifts again.
For engineering: 1.4.0 reverts the PHP floor to ^8.0. Verify your deployment targets actually satisfy ^8.0, pin the exact version in composer.json rather than using a caret constraint on the package, and add a CI job that runs against your oldest supported PHP minor. Treat the support-matrix change as a tracked risk item: it has now moved in both directions, so budget a small amount of ongoing diligence per upgrade, and confirm the changelog for any interim release that may have broken 8.0 consumers before you standardize on it.
Confidence note: This assessment is based on release metadata only — no feature-level or adoption evidence was available. Validate the functional fit and maintenance activity (release cadence, issue responsiveness, test coverage) before committing beyond a pilot.
How can I help you explore Laravel packages today?