mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-11 05:32:23 +00:00
Updated Rector to commit 827b364d7e72e17b5903c368bc82b8b9cf3faec6
827b364d7e
add commands optinally
This commit is contained in:
parent
c1c2677bef
commit
9b000bfc6d
|
@ -129,8 +129,12 @@ return static function (RectorConfig $rectorConfig) : void {
|
|||
$services->set(ScopeFactory::class)->factory([service(PHPStanServicesFactory::class), 'createScopeFactory']);
|
||||
$services->set(TypeNodeResolver::class)->factory([service(PHPStanServicesFactory::class), 'createTypeNodeResolver']);
|
||||
$services->set(DynamicSourceLocatorProvider::class)->factory([service(PHPStanServicesFactory::class), 'createDynamicSourceLocatorProvider']);
|
||||
$services->set(MissingInSetCommand::class);
|
||||
$services->set(OutsideAnySetCommand::class);
|
||||
// add commands optinally
|
||||
if (\class_exists(MissingInSetCommand::class)) {
|
||||
$services->set(Application::class)->call('add', [service(MissingInSetCommand::class)])->call('add', [service(OutsideAnySetCommand::class)]);
|
||||
$services->set(MissingInSetCommand::class);
|
||||
$services->set(OutsideAnySetCommand::class);
|
||||
}
|
||||
// phpdoc parser
|
||||
$services->set(SmartPhpParser::class)->factory([service(SmartPhpParserFactory::class), 'create']);
|
||||
$services->set(ConstExprEvaluator::class);
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '3c7cba308f87667ee2c54b8d1673b64ae2cacf26';
|
||||
public const PACKAGE_VERSION = '827b364d7e72e17b5903c368bc82b8b9cf3faec6';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-08 21:00:41';
|
||||
public const RELEASE_DATE = '2023-06-08 21:11:50';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
|
@ -11,12 +11,7 @@ use Rector\Core\Console\Command\ListRulesCommand;
|
|||
use Rector\Core\Console\Command\ProcessCommand;
|
||||
use Rector\Core\Console\Command\SetupCICommand;
|
||||
use Rector\Core\Console\Command\WorkerCommand;
|
||||
use Rector\RectorGenerator\Command\GenerateCommand;
|
||||
use Rector\RectorGenerator\Command\InitRecipeCommand;
|
||||
use Rector\Utils\Command\MissingInSetCommand;
|
||||
use Rector\Utils\Command\OutsideAnySetCommand;
|
||||
use RectorPrefix202306\Symfony\Component\Console\Application;
|
||||
use RectorPrefix202306\Symfony\Component\Console\Command\Command;
|
||||
use RectorPrefix202306\Symfony\Component\Console\Input\InputDefinition;
|
||||
use RectorPrefix202306\Symfony\Component\Console\Input\InputInterface;
|
||||
use RectorPrefix202306\Symfony\Component\Console\Input\InputOption;
|
||||
|
@ -27,32 +22,10 @@ final class ConsoleApplication extends Application
|
|||
* @var string
|
||||
*/
|
||||
private const NAME = 'Rector';
|
||||
public function __construct(
|
||||
ProcessCommand $processCommand,
|
||||
WorkerCommand $workerCommand,
|
||||
SetupCICommand $setupCICommand,
|
||||
ListRulesCommand $listRulesCommand,
|
||||
// dev
|
||||
MissingInSetCommand $missingInSetCommand = null,
|
||||
OutsideAnySetCommand $outsideAnySetCommand = null,
|
||||
GenerateCommand $generateCommand = null,
|
||||
InitRecipeCommand $initRecipeCommand = null
|
||||
)
|
||||
public function __construct(ProcessCommand $processCommand, WorkerCommand $workerCommand, SetupCICommand $setupCICommand, ListRulesCommand $listRulesCommand)
|
||||
{
|
||||
parent::__construct(self::NAME, VersionResolver::PACKAGE_VERSION);
|
||||
$this->addCommands([$processCommand, $workerCommand, $setupCICommand, $listRulesCommand]);
|
||||
if ($missingInSetCommand instanceof Command) {
|
||||
$this->add($missingInSetCommand);
|
||||
}
|
||||
if ($outsideAnySetCommand instanceof Command) {
|
||||
$this->add($outsideAnySetCommand);
|
||||
}
|
||||
if ($generateCommand instanceof Command) {
|
||||
$this->add($generateCommand);
|
||||
}
|
||||
if ($initRecipeCommand instanceof Command) {
|
||||
$this->add($initRecipeCommand);
|
||||
}
|
||||
$this->setDefaultCommand('process');
|
||||
}
|
||||
public function doRun(InputInterface $input, OutputInterface $output) : int
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit1839f8e7053234d976af76d19f4a4916::getLoader();
|
||||
return ComposerAutoloaderInit3237cb53037f57b8ea8d007484de28fc::getLoader();
|
||||
|
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit1839f8e7053234d976af76d19f4a4916
|
||||
class ComposerAutoloaderInit3237cb53037f57b8ea8d007484de28fc
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInit1839f8e7053234d976af76d19f4a4916
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit1839f8e7053234d976af76d19f4a4916', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit3237cb53037f57b8ea8d007484de28fc', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit1839f8e7053234d976af76d19f4a4916', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit3237cb53037f57b8ea8d007484de28fc', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit1839f8e7053234d976af76d19f4a4916::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit3237cb53037f57b8ea8d007484de28fc::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit1839f8e7053234d976af76d19f4a4916::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit3237cb53037f57b8ea8d007484de28fc::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit1839f8e7053234d976af76d19f4a4916
|
||||
class ComposerStaticInit3237cb53037f57b8ea8d007484de28fc
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3156,9 +3156,9 @@ class ComposerStaticInit1839f8e7053234d976af76d19f4a4916
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit1839f8e7053234d976af76d19f4a4916::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit1839f8e7053234d976af76d19f4a4916::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit1839f8e7053234d976af76d19f4a4916::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit3237cb53037f57b8ea8d007484de28fc::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit3237cb53037f57b8ea8d007484de28fc::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit3237cb53037f57b8ea8d007484de28fc::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user