Skip to content

Squiz/Commenting sniffs: update for properties with asymmetric visibility #1120

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 Jun 6, 2025

Description

These commits all update commenting sniffs to allow them to correctly find a docblock when asym visbility is used.

Squiz/BlockComment: update for properties with asymmetric visibility

Prevent false positives for the "block comments must start with ..." error.

Includes tests.

Squiz/DocCommentAlignment: update for properties with asymmetric visibility

Prevent false negatives for the "incorrect space before star" error.

Includes tests.

Squiz/VariableComment: update for properties with asymmetric visibility

Prevent false positives for the "no docblock found" error.

Includes tests.

Suggested changelog entry

  • Added support for PHP 8.4 asymmetric visibility modifiers to the following sniffs:
    • Squiz.Commenting.BlockComment
    • Squiz.Commenting.DocCommentAlignment
    • Squiz.Commenting.VariableComment

Related issues/external references

Follow up on #851
Follow up on #1116

Related to #734

@jrfnl jrfnl added this to the 3.13.1 milestone Jun 6, 2025
@jrfnl jrfnl mentioned this pull request Jun 6, 2025
43 tasks
Base automatically changed from php-8.4/feature/file-methods-support-asym-visibility to master June 9, 2025 01:45
@jrfnl jrfnl marked this pull request as ready for review June 9, 2025 01:54
jrfnl added 3 commits June 9, 2025 04:37
Prevent false positives for the "block comments must start with ..." error.

Includes tests.
…bility

Prevent false negatives for the "incorrect space before star" error.

Includes tests.
Prevent false positives for the "no docblock found" error.

Includes tests.
@jrfnl jrfnl force-pushed the php-8.4/feature/squiz-comment-sniffs-support-asym-visibility branch from c9f27df to 8d9a663 Compare June 9, 2025 02:37
@jrfnl
Copy link
Member Author

jrfnl commented Jun 9, 2025

Rebased without changes to get a proper build.

@jrfnl jrfnl merged commit 5da71ee into master Jun 9, 2025
62 checks passed
@jrfnl jrfnl deleted the php-8.4/feature/squiz-comment-sniffs-support-asym-visibility branch June 9, 2025 03:16
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.

1 participant