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 #517 by always loading CodeSniffer tokens #542

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

Jibbarth
Copy link
Collaborator

@Jibbarth Jibbarth commented Oct 3, 2021

Q A
Bug fix? yes
New feature? no
Fixed tickets #517

Refs issue #517

When we remove PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes\PropertyDeclarationSniff::class, the PHP_CodeSniffer\Util\Tokens class is not called. Other sniffs may use Tokens defined in this file, without requiring it, and lead to an error.

Requiring file into Kernel allow to have all theses tokens defined anyway.

It avoid undefined token when removing some PHPCs rules while other sniff expect the token is defined without loading them
@Jibbarth Jibbarth added the bug Something isn't working label Oct 3, 2021
@JustSteveKing JustSteveKing merged commit 44f05ab into nunomaduro:master Jun 13, 2022
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.

Undefined constant 'T_MULTIPLY' when trying to remove a PHP_CodeSniffer Sniff via configuration file
5 participants