Skip to content

Commit

Permalink
Explain reasons for developing another library
Browse files Browse the repository at this point in the history
  • Loading branch information
ogizanagi committed Nov 7, 2016
1 parent b2ffe49 commit 28ae99e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ Using an enum class provides many benefits:
- Helps to describe how to read, serialize, export \[, ...\] an enumeration
- Allow common libraries and frameworks integrations.

Why another library ?

- [`myclabs/php-enum`](https://github.com/myclabs/php-enum) provides base enum implementation as a class, based on the `\SplEnum` object class. However, it doesn't provide as much features nor integrations as we wish to.
- [`commerceguys/enum`](https://github.com/commerceguys/enum) only acts as a utility class, but does not intend to instantiate enumerations. Hence, it doesn't allow as much features nor integrations with third-party libraries and frameworks. Manipulating enums as objects are also one of the first motivation of this project.
- [`yethee/BiplaneEnumBundle`](https://github.com/yethee/BiplaneEnumBundle) is the first library we got inspiration from. But it was designed as a Symfony Bundle, whereas we opt for a component first approach. Integrations are then provided in a dedicated `Bridge` namespace and are not restricted to Symfony.

Finally, we used to create similar classes from scratch in some projects lately.
Providing our own package inspired from the best ones, on which we'll apply our own philosophy looks a better way to go.

# Features

- Base implementation for simple, readable and flagged (bitmask) enumerations based on the [BiplaneEnumBundle](https://github.com/yethee/BiplaneEnumBundle) ones.
Expand Down

0 comments on commit 28ae99e

Please sign in to comment.