Skip to content

[depre] Remove 4 rules deprecated since 2025-10 - #743

Merged
TomasVotruba merged 1 commit into
mainfrom
remove-long-deprecated-rules
Jul 31, 2026
Merged

[depre] Remove 4 rules deprecated since 2025-10#743
TomasVotruba merged 1 commit into
mainfrom
remove-long-deprecated-rules

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Four rules have carried DeprecatedInterface and thrown on refactor() for 9 months:

Deprecated Rule
2025-10-23 CreateMockToAnonymousClassRector
2025-10-24 AddParentSetupCallOnSetupRector
2025-10-29 SetUpBeforeClassToSetUpRector
2025-11-14 RemoveDataProviderParamKeysRector

None is part of a set, none has tests left, and the only thing each still does is throw:

public function refactor(Node $node): ?Node
{
    throw new ShouldNotHappenException(sprintf(
        '"%s" is deprecated and should not be used anymore. Remove it from your config files.',
        self::class,
    ));
}

Same treatment as AssertPropertyExistsRector in #742.

PHPStan, ECS, class-leak and PHPUnit (626 tests) pass on the removal.

CreateMockToAnonymousClassRector, AddParentSetupCallOnSetupRector,
SetUpBeforeClassToSetUpRector and RemoveDataProviderParamKeysRector have
been throwing on refactor() for 9 months. None of them is part of a set
and none has tests left.
@TomasVotruba
TomasVotruba merged commit 6065b56 into main Jul 31, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the remove-long-deprecated-rules branch July 31, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant