Skip to content

AbstractPatternSniff::__construct(): remove the $ignoreComments property #974

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

Description

PHPCS deprecated the $ignoreComments parameter of the AbstractPatternSniff::__construct() sniff in version 1.4.0.

  • AbstractPatternSniff now sets the ignoreComments option using a public var rather than through the constructor
    • This allows the setting to be overwritten in ruleset.xml files
    • Old method remains for backwards compatibility

Time to remove this dead code.

Related to #6

Suggested changelog entry

Removed: The $ignoreComments parameter for the AbstractPatternSniff::__construct() method.

PHPCS deprecated the `$ignoreComments` parameter of the `AbstractPatternSniff::__construct()` sniff in version 1.4.0.

> - AbstractPatternSniff now sets the ignoreComments option using a public var rather than through the constructor
>     - This allows the setting to be overwritten in ruleset.xml files
>     - Old method remains for backwards compatibility

Time to remove this dead code.

Related to 6
@jrfnl jrfnl merged commit ff7a908 into 4.x Apr 14, 2025
53 of 54 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/6-abstractpatternsniff-remove-deprecated-param branch April 14, 2025 14:28
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.

3 participants