Skip to content

Ruleset: remove support for sniffs nor implementing Sniff interface - #986

Merged
jrfnl merged 1 commit into
4.xfrom
phpcs-4.0/feature/694-4-ruleset-dont-allow-sniffs-not-implementing-sniff-interface
Apr 14, 2025
Merged

jrfnl merged 1 commit into
4.xfrom
phpcs-4.0/feature/694-4-ruleset-dont-allow-sniffs-not-implementing-sniff-interface

Conversation

@jrfnl

@jrfnl jrfnl commented Apr 14, 2025

Copy link
Copy Markdown
Member

Description

Previously truly invalid sniffs would already be ignored/rejected, but sniffs which didn't implement the interface, but did implement the required methods would still be accepted.

Now, both will be rejected.

Includes removing the RegisterSniffsRejectsInvalidSniffTest class as these tests are now redundant (covered via the RegisterSniffsMissingInterfaceTest class).

This commit executes step 4 to address issue #694.

Suggested changelog entry

Removed:

  • Support for sniffs not implementing the PHP_CodeSniffer\Sniffs\Sniff interface.

Related issues/external references

Closes #694

Related to #6

Previously truly invalid sniffs would already be ignored/rejected, but sniffs which didn't implement the interface, but did implement the required methods would still be accepted.

Now, both will be rejected.

Includes removing the `RegisterSniffsRejectsInvalidSniffTest` class as these tests are now redundant (covered via the `RegisterSniffsMissingInterfaceTest` class).

This commit executes step 4 to address issue 694..

Closes 694

Related to 6
@jrfnl
jrfnl merged commit f267f46 into 4.x Apr 14, 2025
@jrfnl
jrfnl deleted the phpcs-4.0/feature/694-4-ruleset-dont-allow-sniffs-not-implementing-sniff-interface branch April 14, 2025 18:57
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.

2 participants