PhpEnums

Extended PHP 8.1+ enums features & specific integrations with frameworks and libraries

MIT License

Downloads
2.6M
Stars
321
Committers
29

Bot releases are visible (Hide)

PhpEnums - v1.4.0

Published by ogizanagi over 6 years ago

Mainly brings the choice enums concept and Symfony Form integrations enhancements.

Changelog

[7ac0c29] minor #42 Fix cs-fixer config (@ogizanagi)
[ea73095] minor #43 Use native sql type (@nervo)
[7fb3966] feature #48 Add ScalarToEnumTransformer (@ostrolucky)
[52c6306] feature #50 Allow usage of FCQN instead of aliases in Faker provider (@ostrolucky)
[c575970] feature #49 Add ChoiceEnumTrait & SimpleChoiceEnum (@ogizanagi)
[5c487f4] bug #53 Fix Autodiscovered values must only be int or string (@ogizanagi)
[eeeaf12] minor #54 Fix EA extended inspections (@ogizanagi)
[f34537f] feature #55 Add EnumType choices_as_enum_values option (@ogizanagi)
[2863118] minor #56 Rename ScalarToEnumTransformer to ValueToEnumTransformer (@ogizanagi)

PhpEnums - v1.3.0

Published by ogizanagi almost 7 years ago

This release brings official Symfony 4.0 support.

Features

[36da43d] feature #38 Update symfony 4 compatibility (@benji07, @ogizanagi)

Minor

[e9095a6] minor #40 Update cs-fixer & rules (@ogizanagi)
[527629c] minor #41 Minor deps changes (@ogizanagi)

PhpEnums - v1.2.1

Published by ogizanagi about 7 years ago

Bug fix

[a1edb3f] Fix missing annotation on enum validator constraint (@ogizanagi)

PhpEnums - v1.2.0

Published by ogizanagi over 7 years ago

This release mainly introduces a VarDumper caster for enums:

HTML CLI

Features

[1e06d8d] Add a VarDumper caster (@ogizanagi)

Misc

[5325521] Remove old date in copyright and php cs fixer config (@NicolasDievart)

PhpEnums - v1.1.1

Published by ogizanagi over 7 years ago

Bug fix

[0206253] AutoDiscoveredValuesTrait: do only autodiscover public constants (@ogizanagi)

Documentation

[2cee949] Fix Nelmio/Alice tag for Faker provider (@xavier-rdo)

PhpEnums - v1.1.0

Published by ogizanagi over 7 years ago

Feature

[92bb0e6] Provide a Faker Enum Provider Bridge (@xavier-rdo)
[d2af391] Base FlaggedEnum::readables() implementation (@ogizanagi)
[7e6766c] Add an AutoDiscoveredValuesTrait to automatically guess values from constants (@ogizanagi)

Misc

[9800a9e] Replaced mixed to int|string where appropriate (@ogizanagi)
[86b538d] Update travis and dependencies (@ogizanagi)

PhpEnums - v1.0.0

Published by ogizanagi over 7 years ago

First stable release

PhpEnums - v0.5.0

Published by ogizanagi almost 8 years ago

Feature

[d04a1a6] Add Symfony Validator Enum constraint (@ogizanagi)

Bug fix

[8adc873] FlaggedEnum::accepts should not throw any exception (@ogizanagi)

Documentation

[741ec7f] Mention the multiton pattern (@ogizanagi)
[0255514] Add PHP7 requirement badge (@xavier-rdo)

Misc

[35445d9] Use null coalescing operator (@ogizanagi)

PhpEnums - v0.4.0

Published by ogizanagi almost 8 years ago

This release simply continues the job started in 7f7ab9e, which aims to better reflect enum types immutability and enum values acting as singletons.

Feature

[1ea250e] [BC BREAK] Rename flagged enums add/remove to with/without (@ogizanagi)

PhpEnums - v0.3.0

Published by ogizanagi almost 8 years ago

Feature

[618ae73] Reduce the size of the generated archive by using gitattributes (@ogizanagi)
[e7afccd] [BC BREAK] Make enum construct final and suggest to make enum classes final (@ogizanagi)
[7f7ab9e] [BC BREAK] Rename EnumInterface::create to get (@ogizanagi)
[160cf41] Lower requirements for provided integrations (allow sf 2.8) (@ogizanagi)

Bug fix

[d34cec0] Fix issues spotted by Scrutinizer (@ogizanagi)
[a452534] Fix some data transformers exceptions issues (@ogizanagi)

Documentation

[7d8dc2a] How to compare enums (@ogizanagi)
[631b6af] Mention valid and invalid use cases for enumerations (@ogizanagi)
[792bfef, 975799e] Improve documentation (@xavier-rdo, @chalasr)

PhpEnums - v0.2.0

Published by ogizanagi almost 8 years ago

Features

[679617f] Allow enums to be created using callStatic (@benji07, @ogizanagi)
[b2ffe49] Enum values as singletons (@ogizanagi)
[dce810c] Add __toString method inside ReadableEnumInterface (@ogizanagi)

Documentation

[d9150bb] Explain reasons for developing another library (@ogizanagi)
[847d462] [Doc] Review integrations doc organization (@ogizanagi)

PhpEnums - v0.1.0

Published by ogizanagi almost 8 years ago