Just came across this while testing against PHP-CS-Fixer's tests. Not super important, but still a bug.
<?php
class Test {
readonly public int $test;
}
Prettier Output (php-parser 3.2.5):
[error] test.php: SyntaxError: Parse Error : syntax error, unexpected 'public' (T_PUBLIC), expecting T_VARIABLE on line 4
[error] 2 |
[error] 3 | class Test {
[error] > 4 | readonly public int $test;
[error] | ^
[error] 5 | }
I thought this should have been solved by #997, but it looks like that only applied to promoted properties in the constructor.