Skip to content

Releases: marc-mabe/php-enum

v2.1.0

22 Jun 18:44
Compare
Choose a tag to compare

Feature release of the 2.x branch.

Changes:

  • #52 added EnumSerializableTrait for making enumerations serializable
  • #51 EnumSet: dynamic bitset size - no longer limited to 32/64 enumerators
  • #51 EnumSet: added methods [get|set]Bitset

BC-breaks:

  • none

see https://github.com/marc-mabe/php-enum/issues?q=is%3Aissue+is%3Aclosed+milestone%3A2.1.0

v2.0.0

24 Feb 16:31
Compare
Choose a tag to compare

First stable release of the 2.0 branch.

Changes:

  • Inherited enumerations will be handled as own enumeration types
  • EnumSet is based on a real bitset now
  • Removed unnecessary source folder for PSR-4 autloading
  • Added Enum::getEnumerators()

BC-breaks:

  • EnumSet: Max. possible enumerators are limited by the size of an integer (32 or 64)
  • Enum::is() no longer returns TRUE on inherited enumerations

see https://github.com/marc-mabe/php-enum/issues?q=is%3Aissue+is%3Aclosed+milestone%3A2.0.0

v2.0.0-beta1

09 Feb 20:00
Compare
Choose a tag to compare
v2.0.0-beta1 Pre-release
Pre-release

First pre-release of the 2.0 branch.

Changes:

* Inherited enumerations will be handled as own enumeration types
* EnumSet is based on a real bitset now
* Removed unnecessary source folder for PSR-4 autloading
* Added Enum::getEnumerators() 

BC-breaks:

* EnumSet: Max. possible enumerators are limited by the size of an integer (32 or 64)
* Enum::is() no longer returns TRUE on inherited enumerations

see https://github.com/marc-mabe/php-enum/issues?q=is%3Aissue+is%3Aclosed+milestone%3A2.0.0

v1.2.0

22 May 20:42
Compare
Choose a tag to compare

v1.1.0

04 Apr 07:40
Compare
Choose a tag to compare

v1.0.0

16 Oct 07:49
Compare
Choose a tag to compare

This is the first stable release!
(API changes will not occur before the next major release 2.x)

Changes since 1.0.0-beta2:

  • Enumeration values will be compared using strict comparison
  • __toString() returns the name by default and is no longer final

v1.0.0-beta2

23 Sep 15:36
Compare
Choose a tag to compare
v1.0.0-beta2 Pre-release
Pre-release

This will be the last beta until 1.0.0 will be stable (hopefully).
(After the first stable will be out we'll never change API until the next major release!)

Changes:

  • PHP 5.3 will be required
  • Moved to namespaces
  • BC break how to instantiate a new enumeration (please read usage information)
  • It's no longer possible to define a default value
    • You can define a method to instantiate it like UserStatus::getDefault()
  • Now instances of the same enumeration holds the same instance (singleton)
  • Now getConstants() is static

New Features:

  • Implemented EnumMap
  • Implemented EnumSet
  • Added ordinal information and make it possible to instantiate it from

v1.0.0-beta1

14 Oct 17:19
Compare
Choose a tag to compare
v1.0.0-beta1 Pre-release
Pre-release
First beta