Skip to content

Commit

Permalink
Updated Rector to commit 3751c94d26dc1bd8a7a1699f64d0c983dfd11a9f
Browse files Browse the repository at this point in the history
rectorphp/rector-src@3751c94 Revert "[DX] Make command default autotag" (#5442)
  • Loading branch information
TomasVotruba committed Jan 7, 2024
1 parent 816ddfc commit 33f8d9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
17 changes: 12 additions & 5 deletions src/Config/RectorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
*/
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 = [Command::class];
/**
* @param string[] $paths
*/
Expand Down Expand Up @@ -311,14 +311,21 @@ public function disableCollectors() : void
{
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
*/
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;
}
Expand Down

0 comments on commit 33f8d9f

Please sign in to comment.