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

fix: Formatting\ReturnTypeSniff to use new type of token for parenthesis #204

Merged

Conversation

michalbundyra
Copy link
Member

@michalbundyra michalbundyra commented Oct 15, 2024

Since PHP_CodeSniffer 3.10.0 parenthesis token has been changed to:

  • T_TYPE_OPEN_PARENTHESIS (from T_OPEN_PARENTHESIS)
  • T_TYPE_CLOSE_PARENTHESIS (from T_CLOSE_PARENTHESIS)

and therefore the sniff did not work correctly for composite return type declarations.

Bump minimum PHP_CodeSniffer version to 3.10.3 so the new tokens are defined.

Since [PHP_CodeSniffer 3.10.0](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.10.0) parenthesis token has been changed to:
- T_TYPE_OPEN_PARENTHESIS (from T_OPEN_PARENTHESIS)
- T_TYPE_CLOSE_PARENTHESIS (from T_CLOSE_PARENTHESIS)

and therefore the sniff did not work correctly for composite return type declarations.

Bump minimum PHP_CodeSniffer version to 3.10.3 so the new tokens are defined.
@michalbundyra michalbundyra added the bug Something isn't working label Oct 15, 2024
@michalbundyra michalbundyra added this to the 1.4.0 milestone Oct 15, 2024
@michalbundyra michalbundyra merged commit 55366d0 into webimpress:master Oct 15, 2024
1 of 14 checks passed
@michalbundyra michalbundyra deleted the fix/formatting-return-type-dnf branch October 15, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant