Updated Rector to commit 2f5a252ea9bac10994e08623e9371ec132045880

2f5a252ea9 [DX] Make command default autotag (#5441)
This commit is contained in:
Tomas Votruba 2024-01-07 12:05:03 +00:00
parent dd2b386e30
commit 816ddfc830
3 changed files with 8 additions and 15 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'c9608a0f11d8a58224b33c8d2695f210a81816bc';
public const PACKAGE_VERSION = '2f5a252ea9bac10994e08623e9371ec132045880';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-01-07 00:30:43';
public const RELEASE_DATE = '2024-01-07 13:02:42';
/**
* @var int
*/

View File

@ -17,20 +17,21 @@ use Rector\Skipper\SkipCriteriaResolver\SkippedClassResolver;
use Rector\Validation\RectorConfigValidator;
use Rector\ValueObject\PhpVersion;
use Rector\ValueObject\PolyfillPackage;
use RectorPrefix202401\Symfony\Component\Console\Command\Command;
use RectorPrefix202401\Webmozart\Assert\Assert;
/**
* @api
*/
final class RectorConfig extends Container
{
/**
* @var string[]
*/
private const AUTOTAG_INTERFACES = [Command::class];
/**
* @var array<class-string<RectorInterface>, mixed[]>>
*/
private $ruleConfigurations = [];
/**
* @var string[]
*/
private $autotagInterfaces = [];
/**
* @param string[] $paths
*/
@ -310,13 +311,6 @@ final class RectorConfig extends Container
{
SimpleParameterProvider::setParameter(Option::COLLECTORS, \false);
}
/**
* @internal Use to add tag on service registrations
*/
public function autotagInterface(string $interface) : void
{
$this->autotagInterfaces[] = $interface;
}
/**
* @param string $abstract
* @param mixed $concrete
@ -324,7 +318,7 @@ final class RectorConfig extends Container
public function singleton($abstract, $concrete = null) : void
{
parent::singleton($abstract, $concrete);
foreach ($this->autotagInterfaces as $autotagInterface) {
foreach (self::AUTOTAG_INTERFACES as $autotagInterface) {
if (!\is_a($abstract, $autotagInterface, \true)) {
continue;
}

View File

@ -262,7 +262,6 @@ final class LazyContainerFactory
$inflectorFactory = new InflectorFactory();
return $inflectorFactory->build();
});
$rectorConfig->autotagInterface(Command::class);
$rectorConfig->singleton(ProcessCommand::class);
$rectorConfig->singleton(WorkerCommand::class);
$rectorConfig->singleton(SetupCICommand::class);