On 24-4-2023 12:28, Daniil Gentili wrote:
Hi all,
I've submitted https://github.com/php/php-src/pull/11126 to add
support for final anonymous classes, though as noted by iluuu1994, it
would probably make more sense to just make all anonymous classes
final by default, what do you think?
Daniil Gentili.
I always though anonymous class where `final` by nature. The fact that
that hack to extend them works, seems iffy at best.
For what it's worth, I'd be in favour of making the default behaviour
for anonymous classes `final` without the need to add a `final` keyword.
For those edge-cases which would be broken by that change, I wonder if
support to opt-out could be added via an `#[AllowAliasing]` attribute ?