Skip to content

[Sets] Drop PHPUnitSetProvider from the collector - #8295

Merged
TomasVotruba merged 1 commit into
mainfrom
remove-phpunit-set-provider
Aug 5, 2026
Merged

[Sets] Drop PHPUnitSetProvider from the collector#8295
TomasVotruba merged 1 commit into
mainfrom
remove-phpunit-set-provider

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Companion to rectorphp/rector-phpunit#758, same shape as #8292 for Symfony.

That PR moves every per-version rule into composer-based.php, each bound to the phpunit/phpunit version its target API is available from, so no ComposerTriggeredSet is left in the package. What PHPUnitSetProvider still listed were three plain sets, all reachable through PHPUnitSetList::COMPOSER_BASED, PHPUNIT_CODE_QUALITY and ANNOTATIONS_TO_ATTRIBUTES.

-use Rector\PHPUnit\Set\SetProvider\PHPUnitSetProvider;
 use Rector\Set\Contract\SetInterface;

         $setProviders = [
             new PHPSetProvider(),
             new CoreSetProvider(),
-            new PHPUnitSetProvider(),
             new DoctrineSetProvider(),
             new TwigSetProvider(),
         ];

No behavior change for withComposerBased(phpunit: true) — it adds PHPUnitSetList::COMPOSER_BASED directly and never routes through SetGroup::PHPUNIT.

Merge this before rectorphp/rector-phpunit#758, which deletes the class. The reverse order leaves main instantiating a class that no longer exists.

tests/Set green: 12 tests, 15 assertions.

rectorphp/rector-phpunit#758 moves every per-version rule into the composer-based set, leaving no ComposerTriggeredSet in that package. Its remaining sets are reachable through the PHPUnitSetList constants, which is what withComposerBased(phpunit: true) already uses, so the provider is removed there.
@TomasVotruba
TomasVotruba merged commit 7ec46de into main Aug 5, 2026
64 checks passed
@TomasVotruba
TomasVotruba deleted the remove-phpunit-set-provider branch August 5, 2026 11:54
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