Skip to content
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

Universal/[Require/Disallow]FinalClass: docs/test update for readonly classes #148

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 2, 2022

Universal/[Require/Disallow]FinalClass: rename metric

What with PHP 8.2 introducing readonly classes, the metric name Class declaration type would become ambiguous as readonly is not taken into account for the metric (and doesn't need to be as it doesn't have a direct relationship to abstract/final).

To prevent confusion about what the metric records, the metric name has been updated.

Universal/[Require/Disallow]FinalClass: add tests with readonly classes

... to ensure the fixer continues to work correctly when the class is also readonly.

What with PHP 8.2 introducing `readonly` classes, the metric name `Class declaration type` would become ambiguous as `readonly` is not taken into account for the metric (and doesn't need to be as it doesn't have a direct relationship to `abstract`/`final`).

To prevent confusion about what the metric records, the metric name has been updated.
... to ensure the fixer continues to work correctly when the class is also `readonly`.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Nov 2, 2022
@jrfnl jrfnl enabled auto-merge November 2, 2022 22:15
@jrfnl jrfnl merged commit 7379753 into develop Nov 2, 2022
@jrfnl jrfnl deleted the universal/require-disallowfinalclass-allow-for-readonly-classes branch November 2, 2022 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant