Skip to content

4.0 | Zend.Debug.CodeAnalyzer: remove sniff - #58

Merged
jrfnl merged 1 commit into
4.xfrom
phpcs-4.x/remove-external-tooling-sniffs
Apr 14, 2025
Merged

jrfnl merged 1 commit into
4.xfrom
phpcs-4.x/remove-external-tooling-sniffs

Conversation

@jrfnl

@jrfnl jrfnl commented Nov 9, 2023

Copy link
Copy Markdown
Member

Description

Recreation of upstream PR squizlabs/PHP_CodeSniffer#3802:

I have the impression that the Zend Code Analyzer tool as stand-alone tool is no longer available. Please correct me if I'm wrong.

I propose to remove the sniff which allowed for running that tool via PHPCS in PHPCS 4.0, along the same lines as was already done for external JS/CSS tools in commit ea52e7b.

Suggested changelog entry

The Zend.Debug.CodeAnalyzer sniff has been removed

@jrfnl jrfnl added this to the 4.0.0 milestone Nov 9, 2023
@jrfnl
jrfnl force-pushed the phpcs-4.x/remove-external-tooling-sniffs branch from feb27d9 to 1ce2237 Compare November 11, 2023 04:10
@jrfnl
jrfnl force-pushed the phpcs-4.x/remove-external-tooling-sniffs branch from 1ce2237 to 87c22c8 Compare December 6, 2023 00:37
@jrfnl
jrfnl force-pushed the phpcs-4.x/remove-external-tooling-sniffs branch from 87c22c8 to 3148a61 Compare December 7, 2023 16:04
@jrfnl

jrfnl commented Jan 5, 2024

Copy link
Copy Markdown
Member Author

@weierophinney Just checking - have you got an opinion on this proposed sniff removal ?

@weierophinney

Copy link
Copy Markdown

@jrfnl Go for it. We've been actively steering customers to XDebug for years, as (a) Zend Debugger was only ever supported in Zend Studio, and (b) Zend Studio was last actively developed in the PHP 7.1/7.2 timeline, making it irrelevant to most users regardless.

@jrfnl

jrfnl commented Jan 17, 2024

Copy link
Copy Markdown
Member Author

@weierophinney Thank you for confirming what I suspected. I will go ahead and soft deprecate this in 3.9.0, hard deprecate in the last 3.x minor and remove in 4.0.

@jrfnl

jrfnl commented Mar 9, 2025 •

Copy link
Copy Markdown
Member Author

Rebased without changes to get rid of the merge conflict and to check something: the build for this PR should fail as the Squiz ruleset.xml file still references this sniff, which would result in a "ERROR: Referenced sniff "Zend.Debug.CodeAnalyzer" does not exist." error if the ruleset is used.

If CI does not fail on this, we are missing a QA check and that needs to be addressed.

jrfnl added a commit that referenced this pull request Mar 9, 2025
This adds a QA test to verify that the build-in rulesets do not throw any errors to prevent a change in the sniffs, which needs an update to a ruleset, from going unnoticed.

Ref:
* #58 (comment)
@jrfnl jrfnl mentioned this pull request Mar 9, 2025
@jrfnl

jrfnl commented Mar 9, 2025

Copy link
Copy Markdown
Member Author

If CI does not fail on this, we are missing a QA check and that needs to be addressed.

The missing QA check is being added now via PR #868

@jrfnl jrfnl closed this in #868 Mar 9, 2025
jrfnl added a commit that referenced this pull request Mar 9, 2025
This adds a QA test to verify that the build-in rulesets do not throw any errors to prevent a change in the sniffs, which needs an update to a ruleset, from going unnoticed.

Ref:
* #58 (comment)
@jrfnl jrfnl reopened this Mar 14, 2025

@fredden fredden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also remove this line:

<rule ref="Zend.Debug.CodeAnalyzer"/>

@jrfnl

jrfnl commented Apr 13, 2025

Copy link
Copy Markdown
Member Author

We should also remove this line:

<rule ref="Zend.Debug.CodeAnalyzer"/>

Exactly (that was the reason to add the QA check in #868). Local branch has already been updated, didn't push (yet) as I'd have to keep rebasing. It's included in the 4.0 line up though, so we'll get to it some time this week.

I have the impression that the Zend Code Analyzer tool as stand-alone tool is no longer available. Please correct me if I'm wrong.

I propose to remove the sniff which allowed for running that tool via PHPCS in PHPCS 4.0, along the same lines as was already done for external JS/CSS tools in commit ea52e7b.

Follow up on 277

Related to 6
@jrfnl
jrfnl changed the base branch from 4.0 to 4.x April 14, 2025 14:35
@jrfnl
jrfnl force-pushed the phpcs-4.x/remove-external-tooling-sniffs branch from f69e3fd to 7321f10 Compare April 14, 2025 14:35
@jrfnl
jrfnl merged commit 265359c into 4.x Apr 14, 2025
@jrfnl
jrfnl deleted the phpcs-4.x/remove-external-tooling-sniffs branch April 14, 2025 15:15
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.

4 participants