A simple implementation of enumerated types, for PHP. https://docs.belin.io/enum.php
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

4.1 KiB

Changelog

Version 8.2.0

  • Updated the documentation.
  • Updated the package dependencies.

Version 8.1.0

  • Updated the package dependencies.

Version 8.0.0

  • Breaking change: raised the required PHP version.
  • Breaking change: using PHP 7.4 features, like arrow functions.

Version 7.5.0

  • Modified the package layout.
  • Updated the package dependencies.

Version 7.4.0

  • Replaced the Phing build system by Robo.
  • Updated the package dependencies.

Version 7.3.0

  • Added support for PHPStan static analyzer.
  • Updated the package dependencies.

Version 7.2.0

  • Updated the package dependencies.

Version 7.1.0

Version 7.0.0

  • Breaking change: raised the required PHP version.
  • Breaking change: all methods of the EnumTrait trait are now final.
  • Updated the package dependencies.

Version 6.1.0

  • Added a user guide based on MkDocs.
  • Updated the package dependencies.

Version 6.0.0

  • Breaking change: raised the required PHP version.
  • Breaking change: using PHP 7.1 features, like class constant visibility and void functions.
  • Fixed the issue #1: protected and private constants are now ignored.

Version 5.0.0

  • Breaking change: dropped the $strict parameter of the isDefined() and getName() methods, comparisons are now always strict.
  • Added the assert() method.
  • Added the coerce() method.
  • Added the getEntries() method.
  • Added the getIndex() method.
  • Changed licensing for the MIT License.

Version 4.0.0

  • Breaking change: renamed the enum namespace to Enum.
  • Breaking change: the $strict parameter of the isDefined() and getName() methods is now true by default.
  • Added new unit tests.

Version 3.1.0

  • Enabled the strict typing.
  • Replaced phpDocumentor documentation generator by ApiGen.
  • Updated the package dependencies.

Version 3.0.0

  • Breaking change: renamed the root namespace to enum.
  • Breaking change: reverted the name of the trait to EnumTrait.

Version 2.0.0

  • Breaking change: renamed the trait to Enum.
  • Ported the unit test assertions from TDD to BDD.
  • Updated the package dependencies.

Version 1.3.0

  • Updated the package dependencies.

Version 1.2.0

  • Replaced the Codacy code coverage service by the Coveralls one.
  • Updated the package dependencies.

Version 1.1.0

  • Added a $strict parameter to isDefined() and getName() methods.

Version 1.0.0

  • Initial release.