From 580a5566b1b8027b0206c95853b1ce8620f1ec4f Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 8 Aug 2023 01:59:11 +0000 Subject: [PATCH] Updated Rector to commit 211deb44af8953bc0e67095d64aa45ec0e17d157 https://github.com/rectorphp/rector-src/commit/211deb44af8953bc0e67095d64aa45ec0e17d157 [Console] Remove #[Required] on AbstractProcessCommand (#4713) --- src/Application/VersionResolver.php | 4 ++-- src/Console/Command/AbstractProcessCommand.php | 13 ------------- src/Console/Command/ProcessCommand.php | 9 ++++++++- src/Console/Command/WorkerCommand.php | 9 ++++++++- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 +++++----- vendor/composer/autoload_static.php | 8 ++++---- 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3046e58aafc..af79b0467f9 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 = '6e9378e3bf2a4ae78fb53d93e193be473ffcb5d4'; + public const PACKAGE_VERSION = '211deb44af8953bc0e67095d64aa45ec0e17d157'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-08-07 21:45:42'; + public const RELEASE_DATE = '2023-08-08 08:54:16'; /** * @var int */ diff --git a/src/Console/Command/AbstractProcessCommand.php b/src/Console/Command/AbstractProcessCommand.php index 115e80a7e7f..de99cd89403 100644 --- a/src/Console/Command/AbstractProcessCommand.php +++ b/src/Console/Command/AbstractProcessCommand.php @@ -4,25 +4,12 @@ declare (strict_types=1); namespace Rector\Core\Console\Command; use Rector\ChangesReporting\Output\ConsoleOutputFormatter; -use Rector\Core\Configuration\ConfigurationFactory; use Rector\Core\Configuration\Option; use RectorPrefix202308\Symfony\Component\Console\Command\Command; use RectorPrefix202308\Symfony\Component\Console\Input\InputArgument; use RectorPrefix202308\Symfony\Component\Console\Input\InputOption; -use RectorPrefix202308\Symfony\Contracts\Service\Attribute\Required; abstract class AbstractProcessCommand extends Command { - /** - * @var \Rector\Core\Configuration\ConfigurationFactory - */ - protected $configurationFactory; - /** - * @required - */ - public function autowire(ConfigurationFactory $configurationFactory) : void - { - $this->configurationFactory = $configurationFactory; - } protected function configure() : void { $this->addArgument(Option::SOURCE, InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Files or directories to be upgraded.'); diff --git a/src/Console/Command/ProcessCommand.php b/src/Console/Command/ProcessCommand.php index 1892677b360..c1351e0e285 100644 --- a/src/Console/Command/ProcessCommand.php +++ b/src/Console/Command/ProcessCommand.php @@ -8,6 +8,7 @@ use Rector\ChangesReporting\Output\JsonOutputFormatter; use Rector\Core\Application\ApplicationFileProcessor; use Rector\Core\Autoloading\AdditionalAutoloader; use Rector\Core\Configuration\ConfigInitializer; +use Rector\Core\Configuration\ConfigurationFactory; use Rector\Core\Configuration\Option; use Rector\Core\Console\ExitCode; use Rector\Core\Console\Output\OutputFormatterCollector; @@ -68,7 +69,12 @@ final class ProcessCommand extends \Rector\Core\Console\Command\AbstractProcessC * @var \Rector\Core\Util\MemoryLimiter */ private $memoryLimiter; - public function __construct(AdditionalAutoloader $additionalAutoloader, ChangedFilesDetector $changedFilesDetector, ConfigInitializer $configInitializer, ApplicationFileProcessor $applicationFileProcessor, ProcessResultFactory $processResultFactory, DynamicSourceLocatorDecorator $dynamicSourceLocatorDecorator, OutputFormatterCollector $outputFormatterCollector, SymfonyStyle $symfonyStyle, MemoryLimiter $memoryLimiter) + /** + * @readonly + * @var \Rector\Core\Configuration\ConfigurationFactory + */ + private $configurationFactory; + public function __construct(AdditionalAutoloader $additionalAutoloader, ChangedFilesDetector $changedFilesDetector, ConfigInitializer $configInitializer, ApplicationFileProcessor $applicationFileProcessor, ProcessResultFactory $processResultFactory, DynamicSourceLocatorDecorator $dynamicSourceLocatorDecorator, OutputFormatterCollector $outputFormatterCollector, SymfonyStyle $symfonyStyle, MemoryLimiter $memoryLimiter, ConfigurationFactory $configurationFactory) { $this->additionalAutoloader = $additionalAutoloader; $this->changedFilesDetector = $changedFilesDetector; @@ -79,6 +85,7 @@ final class ProcessCommand extends \Rector\Core\Console\Command\AbstractProcessC $this->outputFormatterCollector = $outputFormatterCollector; $this->symfonyStyle = $symfonyStyle; $this->memoryLimiter = $memoryLimiter; + $this->configurationFactory = $configurationFactory; parent::__construct(); } protected function configure() : void diff --git a/src/Console/Command/WorkerCommand.php b/src/Console/Command/WorkerCommand.php index 0ab55d4cba8..2f4020b1ecb 100644 --- a/src/Console/Command/WorkerCommand.php +++ b/src/Console/Command/WorkerCommand.php @@ -8,6 +8,7 @@ use RectorPrefix202308\Clue\React\NDJson\Encoder; use RectorPrefix202308\React\EventLoop\StreamSelectLoop; use RectorPrefix202308\React\Socket\ConnectionInterface; use RectorPrefix202308\React\Socket\TcpConnector; +use Rector\Core\Configuration\ConfigurationFactory; use Rector\Core\Util\MemoryLimiter; use Rector\Parallel\WorkerRunner; use RectorPrefix202308\Symfony\Component\Console\Input\InputInterface; @@ -33,10 +34,16 @@ final class WorkerCommand extends \Rector\Core\Console\Command\AbstractProcessCo * @var \Rector\Core\Util\MemoryLimiter */ private $memoryLimiter; - public function __construct(WorkerRunner $workerRunner, MemoryLimiter $memoryLimiter) + /** + * @readonly + * @var \Rector\Core\Configuration\ConfigurationFactory + */ + private $configurationFactory; + public function __construct(WorkerRunner $workerRunner, MemoryLimiter $memoryLimiter, ConfigurationFactory $configurationFactory) { $this->workerRunner = $workerRunner; $this->memoryLimiter = $memoryLimiter; + $this->configurationFactory = $configurationFactory; parent::__construct(); } protected function configure() : void diff --git a/vendor/autoload.php b/vendor/autoload.php index cefaaf21f38..6d9bd36004c 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit2de9e0e7fdbb90e14135faecd56343a6::getLoader(); +return ComposerAutoloaderInit24cd621939e1c0be213e3232a0d86dbd::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index b93bceae0ed..151dcfd49dc 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit2de9e0e7fdbb90e14135faecd56343a6 +class ComposerAutoloaderInit24cd621939e1c0be213e3232a0d86dbd { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInit2de9e0e7fdbb90e14135faecd56343a6 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit2de9e0e7fdbb90e14135faecd56343a6', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit24cd621939e1c0be213e3232a0d86dbd', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit2de9e0e7fdbb90e14135faecd56343a6', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit24cd621939e1c0be213e3232a0d86dbd', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit2de9e0e7fdbb90e14135faecd56343a6::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit24cd621939e1c0be213e3232a0d86dbd::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit2de9e0e7fdbb90e14135faecd56343a6::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit24cd621939e1c0be213e3232a0d86dbd::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 1ca57a6d053..fe9ab1ea1e6 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit2de9e0e7fdbb90e14135faecd56343a6 +class ComposerStaticInit24cd621939e1c0be213e3232a0d86dbd { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3009,9 +3009,9 @@ class ComposerStaticInit2de9e0e7fdbb90e14135faecd56343a6 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit2de9e0e7fdbb90e14135faecd56343a6::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit2de9e0e7fdbb90e14135faecd56343a6::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit2de9e0e7fdbb90e14135faecd56343a6::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit24cd621939e1c0be213e3232a0d86dbd::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit24cd621939e1c0be213e3232a0d86dbd::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit24cd621939e1c0be213e3232a0d86dbd::$classMap; }, null, ClassLoader::class); }