Skip to content

Squiz/FunctionDeclarationArgumentSpacing: fix typo in SpacingAfterSetVis[i]bility error code #1135

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 17, 2025

Description

Follow up on #1121

The SpacingAfterVis[i]bility error code was introduced in v 3.12.0 (March this year) for constructor property promotion.
The SpacingAfterSetVis[i]bility error code was introduced in v 3.13.1 (few days ago) for constructor property promotion with asym visibility.

Both contained the same typo.

Now, changing an error code is a breaking change. However, with 3.13.1 only having been released a few days ago, it is my opinion that if released soon as 3.13.2, this is an acceptable bug fix.
But then, it would be really weird to not fix the other error code in the same version. Then again, as PHPCS 4.0.0 is around the corner and does allow for breaking changes, let's leave the older typo for 4.0.0, just to be on the safe side.

Suggested changelog entry

Fixed: Squiz.Functions.FunctionDeclarationArgumentSpacing: fixed typo in new error code SpacingAfterSetVis[i]bility

@jrfnl jrfnl added this to the 3.13.2 milestone Jun 17, 2025
@jrfnl jrfnl changed the title Squiz/FunctionDeclarationArgumentSpacing: fix typo in error code Squiz/FunctionDeclarationArgumentSpacing: fix typo in SpacingAfterSetVis[i]bility error code Jun 17, 2025
…tVis[i]bility` error code

The `SpacingAfterVis[i]bility` error code was introduced in v 3.12.0 (March this year) for constructor property promotion.
The `SpacingAfterSetVis[i]bility` error code was introduced in v 3.13.1 (few days ago) for constructor property promotion with asym visibility.

Both contained the same typo.

Now, changing an error code is a breaking change. However, with 3.13.1 only having been released a few days ago, it is my opinion that if released soon as 3.13.2, this is an acceptable bug fix.
But then, it would be really weird to not fix the other error code in the same version. Then again, as PHPCS 4.0.0 is around the corner and does allow for breaking changes, let's leave the older typo for 4.0.0, just to be on the safe side.
@jrfnl jrfnl force-pushed the feature/squiz-functiondeclarationargumentspacing-fix-errorcode branch from 7d07cf5 to a1c2aaa Compare June 17, 2025 11:00
jrfnl added a commit that referenced this pull request Jun 17, 2025
…s[i]bility` error code

Follow up on #792, related to #1135

The `SpacingAfterVis[i]bility` error code was introduced in v 3.12.0 (March this year) for constructor property promotion.
The `SpacingAfterSetVis[i]bility` error code was introduced in v 3.13.1 (this month) for constructor property promotion with asym visibility.

Both contained the same typo.

PR 1135 fixes the asym error code and will be included in PHPCS 3.13.2.

This commit now fixes the non-asym error code and will be included in PHPCS 4.0.0.
@jrfnl jrfnl merged commit c43b854 into master Jun 17, 2025
61 checks passed
@jrfnl jrfnl deleted the feature/squiz-functiondeclarationargumentspacing-fix-errorcode branch June 17, 2025 13:59
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