Skip to content

PHPCS: silence deprecation notice for CS run#834

Merged
GaryJones merged 1 commit into
developfrom
feature/phpcs-silence-deprecation
May 20, 2025
Merged

PHPCS: silence deprecation notice for CS run#834
GaryJones merged 1 commit into
developfrom
feature/phpcs-silence-deprecation

Conversation

@jrfnl

@jrfnl jrfnl commented May 19, 2025

Copy link
Copy Markdown
Collaborator

For the code in this repo, various rulesets from the WordPressCS project are used.

One of those ruleset includes a sniff - Generic.Functions.CallTimePassByReference - which is (hard) deprecated since PHPCS 3.13.0 and which is kind of redundant anyhow as:

  1. The sniff is looking for a syntax which was removed from PHP in PHP 5.4.
  2. The PHPCompatibility standard safeguards against re-introduction of the removed PHP syntax anyhow.

This will at some point need addressing in WordPressCS upstream, but for now, we can silence the deprecation notice by excluding the redundant sniff.

For the code in this repo, various rulesets from the WordPressCS project are used.

One of those ruleset includes a sniff - `Generic.Functions.CallTimePassByReference` - which is (hard) deprecated since PHPCS 3.13.0 and which is kind of redundant anyhow as:
1. The sniff is looking for a syntax which was removed from PHP in PHP 5.4.
2. The PHPCompatibility standard safeguards against re-introduction of the removed PHP syntax anyhow.

This will at some point need addressing in WordPressCS upstream, but for now, we can silence the deprecation notice by excluding the redundant sniff.
@jrfnl jrfnl added this to the 3.x Next milestone May 19, 2025
@jrfnl jrfnl requested a review from a team as a code owner May 19, 2025 17:06
@GaryJones GaryJones merged commit 058d2c2 into develop May 20, 2025
@GaryJones GaryJones deleted the feature/phpcs-silence-deprecation branch May 20, 2025 06:51
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