Repository navigation
[1.1.0] - 2026-05-24
Added
- Validation helpers:
rule(),ruleOnly(),ruleExcept() - Comparison helpers:
is(),isAny(),in() - Lookup helpers:
tryFromValue(),fromName(),fromNameOrDefault() toSelectArrayByName()for name-keyed select optionslabelsMap()as the preferred override for custom labels (setLabels()remains supported)trans()for translation keys- Explicit
EnumStringablehelpers onstr()(camel, slug, snake, headline, upper, lower, plural, singular, title) with__callfor otherStrmethods - GitHub Actions CI and PHPStan level 8
- Expanded test coverage
- UPGRADE.md for upgrading from 1.0.x
- Laravel 13 support (
illuminate/*^13.0)
Changed
getCase()uses nativetryFrom()with strict value matching for backed enumsgetLabel()safely handles enums without custom labelsexcept()andgenerate()always return zero-indexed case listsonly()accepts enum instances, names, and values consistently withexcept()- Subset generation uses isolated classes per call (fixes shared-state bug) while keeping 1.0.x static API compatibility
- Package is now zero-config (no service provider required)
- Explicit
illuminate/collections,illuminate/support, andilluminate/validationdependencies
Removed
- Empty
EnumableServiceProviderandspatie/laravel-package-toolsdependency
Fixed
- Subset generation no longer shares mutable static state between calls
- README examples and method documentation corrected
Upgrade notes
See UPGRADE.md. All existing trait method names are unchanged. Subset methods (only, except, generate) continue to support static calls such as YourEnum::only([...])::labels().