On Tue, Nov 11, 2025 at 10:29 AM Mikhail Savin <[email protected]> wrote:
> > That said, adding values() to BackedEnum is a source-level BC break for > codebases that already define conflicting values() on backed enums. > > But, as we can see from GitHub searches that I posted in PR, most of the > implementations is exactly the same, so BC break is very small > Do you think you can quantify this BC break: how many implementations are having a different signature? And update the RFC "Impact on Ecosystem" section? Small note: implementations usually use `array_column(self::cases(), 'value')` instead of `array_map(static fn(self $c) => $c->value, self::cases())`. and that's just normal, as it is 2x faster: https://3v4l.org/Q5AYg#v8.4.14 maybe mention it as well, or instead of the one you had it the examples, as this is usually how it can be found in libraries. -- Alex
