-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PHP8.2] Support for readonly
classes
#6604
Comments
Would be nice to have indeed, can you propose a PR for it, please? |
We should update the tokenizer to make a custom Maybe new rules:
|
Just to double check, but |
Correct, anonymous classes cannot be |
2 points:
-> It would be nice to provide a fixer to remove |
Looks like these two examples are valid: readonly final class Foo {} final readonly class Foo {} But when I try to apply the
Here's a small repo to reproduce the problem: I did not test this against the PR from @mateuszsip |
it is all here #6624 , if anyone is interested in finishing it |
@alfredbez could you verify #6745 against your reproducer and check if it works properly? |
This bug is solved with the change from the PR: CI output 🎉 (commit) I also tried to change in #6744 but it does not work for the same reason. |
The goal of this task is to provide support for
readonly
classes. New class-level keyword must not break any fixers and should be supported only for PHP 8.2+The text was updated successfully, but these errors were encountered: