spatie/enum
Obsolete: PHP 8.1+ has native enums (recommended). Spatie Enum provides strongly typed, object-based enums for older PHP versions, enabling IDE-friendly static analysis and refactoring. Define enums via @method annotations and call StatusEnum::draft().
Full Changelog: https://github.com/spatie/enum/compare/3.12.0...3.13.0
isset() calls to enum ->value und ->label - #109cases() method to retrieve all instances of the enum - #79[@readonly](https://github.com/readonly) annotation and annotation parsing libraries - #92Closure as value/label map - #87assertIsEnumValue() and assertIsEnumLabel() to \Spatie\Enum\Phpunit\EnumAssertions - #80\Spatie\Enum\Enum php-doc [@property-read](https://github.com/property-read) annotations - #78\Spatie\Enum\Enum::toValues() and \Spatie\Enum\Enum::toLabels() methods - #72\Spatie\Enum\Phpunit\EnumAssertions with a default set of assertions - #71TypeError if value passed to Enum construct is not string or integerEnumDefinition as internaltoArray() to allow custom array representations #58isEqual() and isAny() method doc-tags to accept mixed values__call within the context of an objectisEqual() #39How can I help you explore Laravel packages today?