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

Ruleset: hard deprecate support for sniffs not implementing the Sniff interface #891

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Mar 18, 2025

Description

While sniffs which don't implement the Sniff interface, but do implement the register() and process() methods, will work, it should be considered strongly discouraged.

This commit adds a new, non-blocking deprecation notice which will inform users if they are using a sniff which doesn't implement the Sniff interface.

The intention is to remove support for sniffs which don't implement the Sniff interface in PHPCS 4.0.

Includes tests.

This commit executes step 3 to address issue #694.

Suggested changelog entry

Added deprecation notices (hard deprecation) for:

  • Sniffs not implementing the PHP_CodeSniffer\Sniffs\Sniff interface, which will no longer be supported in PHPCS 4.0.

…f` interface

While sniffs which don't implement the `Sniff` interface, but do implement the `register()` and `process()` methods, will _work_, it should be considered strongly discouraged.

This commit adds a new, non-blocking deprecation notice which will inform users if they are using a sniff which doesn't implement the `Sniff` interface.

The intention is to remove support for sniffs which don't implement the `Sniff` interface in PHPCS 4.0.

Includes tests.

This commit executes step 3 to address issue 694..
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