Problem/Motivation

While working on another issue, I found out 4.x was failing by itself.

Steps to reproduce

Run phpunit test suit on 4.x.

Proposed resolution

PHPStan 2.x changed behavior — with customRulesetUsed: true and no level specified, PHPStan's RestrictedClassNameUsageExtension mechanism (which handles class.extendsDeprecatedClass) is not activated. The old phpstan-deprecation-rules 1.x had standalone rule classes that ran unconditionally; 2.x switched to the extension mechanism which requires a level to be set.

Adding level: 0 makes PHPStan activate the restricted usage checks, restoring detection of deprecated class extensions.

I'll report back when the tests finish.

Remaining tasks

User interface changes

API changes

Data model changes

AI disclosure

AI was used to debug, fix and verify this issue.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gábor hojtsy created an issue. See original summary.

  • gábor hojtsy committed 9d7f7241 on 4.x
    Issue #3574741: Fix loss of deprecated class extension detection with...
gábor hojtsy’s picture

Status: Needs review » Fixed

Our tests proved that that was the right fix :) Added a no-neon-change branch to prove that without the fix the current 4.x fails on the current major. (Both pass on previous major).

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.