[CHANGED] Renamed namespace and class from Enum
to ZEnum
to allow PHP 8.1
[CHANGED] Added support for PHP 8.0
[CHANGED] \Zlikavac32\Enum\assertNoParentHasEnumerateMethodForClass()
is renamed to \Zlikavac32\Enum\assertEnumClassParentsAdhereConstraints()
[CHANGED] \Error
is thrown instead of the \LogicException
if a property is accessed before it's initialized
[CHANGED] Minimal supported PHP version is 7.4
[FIXED] Method regex capturing carriage return
[ADDED] \Zlikavac32\Enum\UnhandledEnumException
[ADDED] Enum names are resolved from the class PHPDoc comment
[REMOVED] Enum names can no longer be listed as string in the enumerate()
method
[REMOVED] PHP 7.1 support
[CHANGED] Enum class no longer must be immediate parent
[CHANGED] Optimized functions imports
[CHANGED] Extracted few private methods into functions
[NEW] Method final isAnyOf(Enum ...$enums): bool
[NEW] Method final static contains(string $name): bool
[CHANGED] Enum implements JsonSerializable
[CHANGED] Standardized error messages
[FIXED] __set_state
now declared as static
[CHANGED] Element instance must have calling enum as it first parent
[CHANGED] Added constructor in \Zlikavac32\Enum\Enum
which is required to be called
[NEW] Check for duplicate names when just listing enum elements
[NEW] First tagged version
You can’t perform that action at this time.