Skip to content

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

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
merged 1 commit into from
Apr 14, 2025

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 9, 2023

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
Copy link
Member Author

jrfnl commented Jan 5, 2024

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

@weierophinney
Copy link

@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
Copy link
Member Author

jrfnl commented Jan 17, 2024

@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
Copy link
Member Author

jrfnl commented Mar 9, 2025

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
Copy link
Member Author

jrfnl commented Mar 9, 2025

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
Copy link
Member

@fredden fredden left a comment

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
Copy link
Member Author

jrfnl commented Apr 13, 2025

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
61 checks passed
@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