Hi internals,
I recently found out that constructor property promotion cannot be used for
final properties. I propose that it become allowed. Thoughts? Would this
need an RFC, or is this minor enough to be acceptable with just a mailing
list discussion?
Background:
In the process of trying to help support PHP 8.4 syntax in PHPCS[1], I
discovered that constructor property promotion cannot be used with final
properties. I thought that this was a bug, and filed GH-17860 with the
report[2]. But, in the discussion on the patch that I sent to fix the
bug[3], I was told that this was intentionally omitted. So, now the bug is
a feature request.
-Daniel
[1] https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/734
[2] https://github.com/php/php-src/issues/17860
[3] https://github.com/php/php-src/issues/17861