Skip to content

[depre] Remove deprecated AssertPropertyExistsRector - #742

Merged
TomasVotruba merged 1 commit into
mainfrom
deprecate-interface-assert-property-exists
Jul 31, 2026
Merged

[depre] Remove deprecated AssertPropertyExistsRector#742
TomasVotruba merged 1 commit into
mainfrom
deprecate-interface-assert-property-exists

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Jul 31, 2026

Copy link
Copy Markdown
Member

AssertPropertyExistsRector was already deprecated - it carried a @deprecated tag and refactor() threw:

/**
 * @deprecated as this assert method was removed in PHPUnit 10 @see https://github.com/sebastianbergmann/phpunit/issues/4601
 */

The method it produced, assertClassHasAttribute(), was removed in PHPUnit 10, so there is nothing left for the rule to do. It had no tests, no set membership and no references anywhere in the repo.

Same treatment as AddCoversClassAttributeRector, AssertCountWithZeroToAssertEmptyRector and AssertCompareToSpecificMethodRector before it - the file goes.

PHPStan, ECS and class-leak pass on the removal.

@TomasVotruba
TomasVotruba force-pushed the deprecate-interface-assert-property-exists branch from d0dad6f to 31c4d6e Compare July 31, 2026 16:52
The rule was already deprecated and threw on refactor(), as the
assertClassHasAttribute() method it produced was removed in PHPUnit 10.
It had no tests and was not part of any set.
@TomasVotruba
TomasVotruba force-pushed the deprecate-interface-assert-property-exists branch from 31c4d6e to 597f0a4 Compare July 31, 2026 16:54
@TomasVotruba TomasVotruba changed the title Mark AssertPropertyExistsRector as DeprecatedInterface [depre] Remove deprecated AssertPropertyExistsRector Jul 31, 2026
@TomasVotruba
TomasVotruba merged commit f9a0b10 into main Jul 31, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the deprecate-interface-assert-property-exists branch July 31, 2026 16:56
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