symfony / polyfill

PHP polyfills

Home Page:https://symfony.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 8.1 add UnitEnum | BackedEnum polyfill

l-you opened this issue · comments

commented

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)