All notable changes to enum will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
- Nothing
- Nothing
- Nothing
- Nothing
- Nothing
- Nothing
- Build pipeline
- Support for PHP 8.5
- Type-hinting to avoid IDEs confusion with backed enums native methods
- Give priority to properties when resolving a case item
- Removed unneeded readonly modifiers
- Enums discoverability
- Console command to create an enum
- Console command to annotate enums
- Console command to turn PHP enums into TypeScript enums
- Improved static analysis
- CasesCollection::groupBy() does not wrap the result into a collection
- Full support for PHP 8.4
- Improved error message for invalid meta
- Method
SelfAware::metaAttributeNames()to list the names of all meta attributes
- Upgraded PHPStan to v2
- Method has() to the cases collection
- JsonSerializable and Stringable interfaces to the cases collection
- Methods isBackedByInteger() and isBackedByString() to the SelfAware trait
- Allow any callable when setting the logic for magic methods
- Allow meta inheritance when getting meta names
- Improve generics in cases collection
- Simplify logic by negating methods in the Compares trait
- Nothing
- Nothing
- Nothing
- Nothing
- Custom and default implementation of magic methods
- The
Metaattribute and related methods - Method
value()to get the value of a backed case or the name of a pure case - Methods
toArray(),map()to theCasesCollection - Generics in docblocks
- Static analysis
- Renamed keys to meta
CasesCollectionmethods return an instance of the collection whenever possibleCasesCollection::groupBy()groups into instances of the collection- Filtering methods keep the collection keys
- Renamed methods
CollectsCases::casesBy*()toCollectsCases::keyBy*() - Renamed
cases()toall()inCasesCollection - Renamed
get()toresolveMeta()inSelfAware - When hydrating from meta, the value is no longer mandatory and it defaults to
true - The value for
pluck()is now mandatory - Renamed sorting methods
- Introduced PER code style
- Parameter
$defaultfrom theCasesCollection::first()method
- First implementation of the package