From 33f8d9f05424f095298b1f9404de866ae52c753e Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 7 Jan 2024 12:07:05 +0000 Subject: [PATCH] Updated Rector to commit 3751c94d26dc1bd8a7a1699f64d0c983dfd11a9f https://github.com/rectorphp/rector-src/commit/3751c94d26dc1bd8a7a1699f64d0c983dfd11a9f Revert "[DX] Make command default autotag" (#5442) --- src/Application/VersionResolver.php | 4 ++-- src/Config/RectorConfig.php | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 1cb14c120e0..d54de5d240a 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '2f5a252ea9bac10994e08623e9371ec132045880'; + public const PACKAGE_VERSION = '3751c94d26dc1bd8a7a1699f64d0c983dfd11a9f'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-01-07 13:02:42'; + public const RELEASE_DATE = '2024-01-07 13:04:44'; /** * @var int */ diff --git a/src/Config/RectorConfig.php b/src/Config/RectorConfig.php index f80008d8b67..ee7901834f4 100644 --- a/src/Config/RectorConfig.php +++ b/src/Config/RectorConfig.php @@ -24,14 +24,14 @@ use RectorPrefix202401\Webmozart\Assert\Assert; */ final class RectorConfig extends Container { - /** - * @var string[] - */ - private const AUTOTAG_INTERFACES = [Command::class]; /** * @var array, mixed[]>> */ private $ruleConfigurations = []; + /** + * @var string[] + */ + private $autotagInterfaces = [Command::class]; /** * @param string[] $paths */ @@ -311,6 +311,13 @@ 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 @@ -318,7 +325,7 @@ final class RectorConfig extends Container public function singleton($abstract, $concrete = null) : void { parent::singleton($abstract, $concrete); - foreach (self::AUTOTAG_INTERFACES as $autotagInterface) { + foreach ($this->autotagInterfaces as $autotagInterface) { if (!\is_a($abstract, $autotagInterface, \true)) { continue; }