PHP 8.1 add UnitEnum | BackedEnum polyfill
l-you opened this issue · comments
PHP 8.1 adds native enum support with UnitEnum and BackedEnum interfaces https://www.php.net/manual/en/class.backedenum.php. I would like to send a PR with implemented interfaces. Maybe there is another workaround?
Given that these interfaces cannot be implemented directly, I don't see any benefit about adding polyfills for them. And I see drawbacks (breaking code doing feature detection on them)