Skip to content

Squiz/DocCommentAlignment: add support for final classes and final properties #951

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

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 9, 2025

Description

If a class or property used the final keyword, the docblock would not be recognized as one which needed examining.

Fixed now.

Includes tests.

Suggested changelog entry

  • Added support for PHP 8.4 final properties to the following sniffs:
    • Squiz.Commenting.DocCommentAlignment
  • Squiz.Commenting.DocCommentAlignment will now examine docblocks for final classes.

Related issues/external references

Related to #734, follow up to #834 and #907

…operties

If a class or property used the `final` keyword, the docblock would not be recognized as one which needed examining.

Fixed now.

Includes tests.
Copy link
Contributor

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final classes not being checked is a bug that I didn't add, right?

@jrfnl
Copy link
Member Author

jrfnl commented Apr 9, 2025

Final classes not being checked is a bug that I didn't add, right?

Correct, that is unrelated. That was just an oversight in the sniff which I noticed when I was updating the sniff for final properties anyhow, so figured I'd better fix that in the same commit.

@jrfnl jrfnl merged commit 5946d53 into master Apr 13, 2025
63 checks passed
@jrfnl jrfnl deleted the feature/squiz-doccommentalignment-final-classes-and-properties branch April 13, 2025 01:11
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.

2 participants