Updated Rector to commit 8bf042b6ae9f02afa2aa0fe9bafeec1eecfd9e26

8bf042b6ae Remove deprecated show command (#1796)
This commit is contained in:
Tomas Votruba 2022-02-09 19:11:27 +00:00
parent 36b7270b94
commit 8ea047f3d5
7 changed files with 19 additions and 87 deletions

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '9953b6cab1b623cf7e0b3f6eb7105fc9b441afd0';
public const PACKAGE_VERSION = '8bf042b6ae9f02afa2aa0fe9bafeec1eecfd9e26';
/**
* @var string
*/
public const RELEASE_DATE = '2022-02-09 18:51:13';
public const RELEASE_DATE = '2022-02-09 19:05:13';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220209\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -1,66 +0,0 @@
<?php
declare (strict_types=1);
namespace Rector\Core\Console\Command;
use Rector\Core\Console\Output\RectorOutputStyle;
use Rector\Core\Contract\Rector\RectorInterface;
use Rector\PostRector\Contract\Rector\ComplementaryRectorInterface;
use Rector\PostRector\Contract\Rector\PostRectorInterface;
use RectorPrefix20220209\Symfony\Component\Console\Command\Command;
use RectorPrefix20220209\Symfony\Component\Console\Input\InputInterface;
use RectorPrefix20220209\Symfony\Component\Console\Output\OutputInterface;
use RectorPrefix20220209\Symplify\PackageBuilder\Console\Command\CommandNaming;
final class ShowCommand extends \RectorPrefix20220209\Symfony\Component\Console\Command\Command
{
/**
* @readonly
* @var \Rector\Core\Console\Output\RectorOutputStyle
*/
private $rectorOutputStyle;
/**
* @var RectorInterface[]
* @readonly
*/
private $rectors;
/**
* @param RectorInterface[] $rectors
*/
public function __construct(\Rector\Core\Console\Output\RectorOutputStyle $rectorOutputStyle, array $rectors)
{
$this->rectorOutputStyle = $rectorOutputStyle;
$this->rectors = $rectors;
parent::__construct();
}
protected function configure() : void
{
$this->setName(\RectorPrefix20220209\Symplify\PackageBuilder\Console\Command\CommandNaming::classToName(self::class));
$this->setDescription('Show loaded Rectors with their configuration');
}
protected function execute(\RectorPrefix20220209\Symfony\Component\Console\Input\InputInterface $input, \RectorPrefix20220209\Symfony\Component\Console\Output\OutputInterface $output) : int
{
$this->rectorOutputStyle->title('Loaded Rector rules');
$rectors = \array_filter($this->rectors, function (\Rector\Core\Contract\Rector\RectorInterface $rector) : bool {
if ($rector instanceof \Rector\PostRector\Contract\Rector\PostRectorInterface) {
return \false;
}
return !$rector instanceof \Rector\PostRector\Contract\Rector\ComplementaryRectorInterface;
});
$rectorCount = \count($rectors);
if ($rectorCount === 0) {
$warningMessage = \sprintf('No Rectors were loaded.%sAre sure your "rector.php" config is in the root?%sTry "--config <path>" option to include it.', \PHP_EOL . \PHP_EOL, \PHP_EOL);
$this->rectorOutputStyle->warning($warningMessage);
return self::FAILURE;
}
$rectorCount = \count($rectors);
foreach ($rectors as $rector) {
$this->rectorOutputStyle->writeln(' * ' . \get_class($rector));
}
$message = \sprintf('%d loaded Rectors', $rectorCount);
$this->rectorOutputStyle->success($message);
$this->rectorOutputStyle->error('The "show" command is deprecated and will be removed, as it was used only for more output on Rector run. Use the "--debug" option and process command for debugging output instead.');
// to spot the error message
\sleep(3);
return \RectorPrefix20220209\Symfony\Component\Console\Command\Command::FAILURE;
}
}

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83::getLoader();
return ComposerAutoloaderInit35176a441ddb465a079483c0e1133078::getLoader();

View File

@ -1656,7 +1656,6 @@ return array(
'Rector\\Core\\Console\\Command\\AbstractProcessCommand' => $baseDir . '/src/Console/Command/AbstractProcessCommand.php',
'Rector\\Core\\Console\\Command\\InitCommand' => $baseDir . '/src/Console/Command/InitCommand.php',
'Rector\\Core\\Console\\Command\\ProcessCommand' => $baseDir . '/src/Console/Command/ProcessCommand.php',
'Rector\\Core\\Console\\Command\\ShowCommand' => $baseDir . '/src/Console/Command/ShowCommand.php',
'Rector\\Core\\Console\\Command\\WorkerCommand' => $baseDir . '/src/Console/Command/WorkerCommand.php',
'Rector\\Core\\Console\\ConsoleApplication' => $baseDir . '/src/Console/ConsoleApplication.php',
'Rector\\Core\\Console\\Output\\OutputFormatterCollector' => $baseDir . '/src/Console/Output/OutputFormatterCollector.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83
class ComposerAutoloaderInit35176a441ddb465a079483c0e1133078
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit35176a441ddb465a079483c0e1133078', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit35176a441ddb465a079483c0e1133078', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit1521fe0f43dbd96f39968e86641e8a83::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit35176a441ddb465a079483c0e1133078::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,12 +42,12 @@ class ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit1521fe0f43dbd96f39968e86641e8a83::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit35176a441ddb465a079483c0e1133078::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire1521fe0f43dbd96f39968e86641e8a83($fileIdentifier, $file);
composerRequire35176a441ddb465a079483c0e1133078($fileIdentifier, $file);
}
return $loader;
@ -59,7 +59,7 @@ class ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83
* @param string $file
* @return void
*/
function composerRequire1521fe0f43dbd96f39968e86641e8a83($fileIdentifier, $file)
function composerRequire35176a441ddb465a079483c0e1133078($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit1521fe0f43dbd96f39968e86641e8a83
class ComposerStaticInit35176a441ddb465a079483c0e1133078
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -2051,7 +2051,6 @@ class ComposerStaticInit1521fe0f43dbd96f39968e86641e8a83
'Rector\\Core\\Console\\Command\\AbstractProcessCommand' => __DIR__ . '/../..' . '/src/Console/Command/AbstractProcessCommand.php',
'Rector\\Core\\Console\\Command\\InitCommand' => __DIR__ . '/../..' . '/src/Console/Command/InitCommand.php',
'Rector\\Core\\Console\\Command\\ProcessCommand' => __DIR__ . '/../..' . '/src/Console/Command/ProcessCommand.php',
'Rector\\Core\\Console\\Command\\ShowCommand' => __DIR__ . '/../..' . '/src/Console/Command/ShowCommand.php',
'Rector\\Core\\Console\\Command\\WorkerCommand' => __DIR__ . '/../..' . '/src/Console/Command/WorkerCommand.php',
'Rector\\Core\\Console\\ConsoleApplication' => __DIR__ . '/../..' . '/src/Console/ConsoleApplication.php',
'Rector\\Core\\Console\\Output\\OutputFormatterCollector' => __DIR__ . '/../..' . '/src/Console/Output/OutputFormatterCollector.php',
@ -3895,9 +3894,9 @@ class ComposerStaticInit1521fe0f43dbd96f39968e86641e8a83
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit1521fe0f43dbd96f39968e86641e8a83::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1521fe0f43dbd96f39968e86641e8a83::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1521fe0f43dbd96f39968e86641e8a83::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit35176a441ddb465a079483c0e1133078::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit35176a441ddb465a079483c0e1133078::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit35176a441ddb465a079483c0e1133078::$classMap;
}, null, ClassLoader::class);
}

View File

@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20220209\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83', false) && !interface_exists('ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83', false) && !trait_exists('ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83', false)) {
spl_autoload_call('RectorPrefix20220209\ComposerAutoloaderInit1521fe0f43dbd96f39968e86641e8a83');
if (!class_exists('ComposerAutoloaderInit35176a441ddb465a079483c0e1133078', false) && !interface_exists('ComposerAutoloaderInit35176a441ddb465a079483c0e1133078', false) && !trait_exists('ComposerAutoloaderInit35176a441ddb465a079483c0e1133078', false)) {
spl_autoload_call('RectorPrefix20220209\ComposerAutoloaderInit35176a441ddb465a079483c0e1133078');
}
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20220209\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -71,9 +71,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220209\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire1521fe0f43dbd96f39968e86641e8a83')) {
function composerRequire1521fe0f43dbd96f39968e86641e8a83() {
return \RectorPrefix20220209\composerRequire1521fe0f43dbd96f39968e86641e8a83(...func_get_args());
if (!function_exists('composerRequire35176a441ddb465a079483c0e1133078')) {
function composerRequire35176a441ddb465a079483c0e1133078() {
return \RectorPrefix20220209\composerRequire35176a441ddb465a079483c0e1133078(...func_get_args());
}
}
if (!function_exists('scanPath')) {