Skip to content

[SetList] Add COMPOSER_BASED constant, remove empty DOCTRINE_BUNDLE_210 set - #499

Merged
TomasVotruba merged 1 commit into
mainfrom
setlist-cleanup-composer-based
Aug 3, 2026
Merged

[SetList] Add COMPOSER_BASED constant, remove empty DOCTRINE_BUNDLE_210 set#499
TomasVotruba merged 1 commit into
mainfrom
setlist-cleanup-composer-based

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Two small DoctrineSetList cleanups.

Add COMPOSER_BASED

config/sets/composer-based.php had no constant, so it could only be referenced by a raw path:

$rectorConfig->sets([__DIR__ . '/../../../config/sets/composer-based.php']);

Now:

use Rector\Doctrine\Set\DoctrineSetList;

return RectorConfig::configure()
    ->withSets([
        DoctrineSetList::COMPOSER_BASED,
    ]);

->withComposerBased(doctrine: true) stays the recommended way - this is for configs that enumerate sets explicitly.

Remove DOCTRINE_BUNDLE_210

config/sets/doctrine-bundle-210.php has been an empty closure since #382 (2025-05), when the AsListener attribute rule moved to the doctrine-bundle 2.8 set:

return static function (RectorConfig $rectorConfig): void {
    // only for BC
};

It is not registered in DoctrineSetProvider, so it never shows up in the prepared set list - the only way to reach it was the deprecated DoctrineSetList::DOCTRINE_BUNDLE_210 constant, which loaded a set that did nothing. File and constant removed together, same as 5f471cf.

…10 set

The composer-based set had no DoctrineSetList constant, so it could only be
referenced by a raw path. Add COMPOSER_BASED for withSets() use.

The doctrine-bundle-210 set has been an empty "only for BC" closure since #382
(2025-05), when the AsListener attribute moved to the doctrine-bundle 2.8 set.
Remove the file and its deprecated constant.
@TomasVotruba
TomasVotruba merged commit ef32172 into main Aug 3, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the setlist-cleanup-composer-based branch August 3, 2026 15:55
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