grifart/enum
This system is a PHP library that provides a type-safe enumeration implementation, allowing developers to create and manage enum types with built-in validation. It offers an abstract base class and traits to simplify enum creation, while enforcing structural consistency and type safety through runtime checks. The library includes comprehensive test coverage and examples demonstrating migration from legacy constant-based patterns to more robust enum implementations.
64.5
Adequate · 4 August 2026
495
lines of production code
PHP
primary language
1
bus factor · 2 authors in all
3
measurements over time
How it got here
2017 · Initial release and validation
This period marks the initial release of the grifart/enum library, introducing the core Enum base class and AutoInstances trait for PHP 7.1+. The work focused on establishing a robust testing suite and enforcing structural consistency checks to ensure type-safe enumeration implementations.
8 changes
2019 · Test coverage and migration examples
This period focused on expanding test coverage and providing migration examples for the Enum library. The work included adding regression tests for edge cases and creating detailed test suites that demonstrate how to migrate legacy code and refactor state machines using the new enum implementation.
5 changes
Survey your own repository
grifart/enum was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point the surveyor at a repository you know and see whether you agree with it.
About this page
- The description of this project is derived from its own commit history, not from its README.
- The score is its highest published measurement, taken on 4 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 0bce28aaee — the exact code this score is about.
- Scored under rubric rubric-2026.08.19. Score the same commit under that rubric and you get the same number.