mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-22 08:25:02 +02:00
Updated Rector to commit ac7666a4c943cf0fd8ad3b8a2ccc7541883d987c
ac7666a4c9
[FEATURE] Use OutputFormatter for show command (#147)
This commit is contained in:
parent
cac240a178
commit
a748b6716e
@ -9,6 +9,7 @@ use Rector\ChangesReporting\Contract\Output\OutputFormatterInterface;
|
||||
use Rector\Core\Configuration\Configuration;
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\Contract\Console\OutputStyleInterface;
|
||||
use Rector\Core\Contract\Rector\RectorInterface;
|
||||
use Rector\Core\ValueObject\Application\RectorError;
|
||||
use Rector\Core\ValueObject\ProcessResult;
|
||||
use Rector\Core\ValueObject\Reporting\FileDiff;
|
||||
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\ListReporting\Contract\Output;
|
||||
|
||||
use Rector\Core\Contract\Rector\RectorInterface;
|
||||
interface ShowOutputFormatterInterface
|
||||
{
|
||||
/**
|
||||
* @param RectorInterface[] $rectors
|
||||
*/
|
||||
public function list(array $rectors) : void;
|
||||
public function getName() : string;
|
||||
}
|
36
packages/ListReporting/Output/ConsoleOutputFormatter.php
Normal file
36
packages/ListReporting/Output/ConsoleOutputFormatter.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\ListReporting\Output;
|
||||
|
||||
use Rector\Core\Contract\Console\OutputStyleInterface;
|
||||
use Rector\ListReporting\Contract\Output\ShowOutputFormatterInterface;
|
||||
final class ConsoleOutputFormatter implements \Rector\ListReporting\Contract\Output\ShowOutputFormatterInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const NAME = 'console';
|
||||
/**
|
||||
* @var \Rector\Core\Contract\Console\OutputStyleInterface
|
||||
*/
|
||||
private $outputStyle;
|
||||
public function __construct(\Rector\Core\Contract\Console\OutputStyleInterface $outputStyle)
|
||||
{
|
||||
$this->outputStyle = $outputStyle;
|
||||
}
|
||||
public function list(array $rectors) : void
|
||||
{
|
||||
$rectorCount = \count($rectors);
|
||||
$this->outputStyle->title('Loaded Rector rules');
|
||||
foreach ($rectors as $rector) {
|
||||
$this->outputStyle->writeln(' * ' . \get_class($rector));
|
||||
}
|
||||
$message = \sprintf('%d loaded Rectors', $rectorCount);
|
||||
$this->outputStyle->success($message);
|
||||
}
|
||||
public function getName() : string
|
||||
{
|
||||
return self::NAME;
|
||||
}
|
||||
}
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '4f33f3f3ecf85daecdc001c8e71e1e096d9f60bc';
|
||||
public const PACKAGE_VERSION = 'ac7666a4c943cf0fd8ad3b8a2ccc7541883d987c';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-06-04 20:34:17';
|
||||
public const RELEASE_DATE = '2021-06-04 22:09:20';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210604\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
@ -3,19 +3,27 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Core\Console\Command;
|
||||
|
||||
use Rector\ChangesReporting\Output\ConsoleOutputFormatter;
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\Console\Output\ShowOutputFormatterCollector;
|
||||
use Rector\Core\Contract\Console\OutputStyleInterface;
|
||||
use Rector\Core\Contract\Rector\RectorInterface;
|
||||
use Rector\PostRector\Contract\Rector\PostRectorInterface;
|
||||
use RectorPrefix20210604\Symfony\Component\Console\Command\Command;
|
||||
use RectorPrefix20210604\Symfony\Component\Console\Input\InputInterface;
|
||||
use RectorPrefix20210604\Symfony\Component\Console\Input\InputOption;
|
||||
use RectorPrefix20210604\Symfony\Component\Console\Output\OutputInterface;
|
||||
use RectorPrefix20210604\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use RectorPrefix20210604\Symplify\PackageBuilder\Console\ShellCode;
|
||||
final class ShowCommand extends \RectorPrefix20210604\Symfony\Component\Console\Command\Command
|
||||
{
|
||||
/**
|
||||
* @var \Symfony\Component\Console\Style\SymfonyStyle
|
||||
* @var \Rector\Core\Contract\Console\OutputStyleInterface
|
||||
*/
|
||||
private $symfonyStyle;
|
||||
private $outputStyle;
|
||||
/**
|
||||
* @var \Rector\Core\Console\Output\ShowOutputFormatterCollector
|
||||
*/
|
||||
private $showOutputFormatterCollector;
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
@ -23,37 +31,38 @@ final class ShowCommand extends \RectorPrefix20210604\Symfony\Component\Console\
|
||||
/**
|
||||
* @param RectorInterface[] $rectors
|
||||
*/
|
||||
public function __construct(\RectorPrefix20210604\Symfony\Component\Console\Style\SymfonyStyle $symfonyStyle, array $rectors)
|
||||
public function __construct(\Rector\Core\Contract\Console\OutputStyleInterface $outputStyle, \Rector\Core\Console\Output\ShowOutputFormatterCollector $showOutputFormatterCollector, array $rectors)
|
||||
{
|
||||
$this->symfonyStyle = $symfonyStyle;
|
||||
$this->outputStyle = $outputStyle;
|
||||
$this->showOutputFormatterCollector = $showOutputFormatterCollector;
|
||||
$this->rectors = $rectors;
|
||||
parent::__construct();
|
||||
}
|
||||
protected function configure() : void
|
||||
{
|
||||
$this->setDescription('Show loaded Rectors with their configuration');
|
||||
$names = $this->showOutputFormatterCollector->getNames();
|
||||
$description = \sprintf('Select output format: "%s".', \implode('", "', $names));
|
||||
$this->addOption(\Rector\Core\Configuration\Option::OPTION_OUTPUT_FORMAT, 'o', \RectorPrefix20210604\Symfony\Component\Console\Input\InputOption::VALUE_OPTIONAL, $description, \Rector\ChangesReporting\Output\ConsoleOutputFormatter::NAME);
|
||||
}
|
||||
protected function execute(\RectorPrefix20210604\Symfony\Component\Console\Input\InputInterface $input, \RectorPrefix20210604\Symfony\Component\Console\Output\OutputInterface $output) : int
|
||||
{
|
||||
$this->reportLoadedRectors();
|
||||
$outputFormat = (string) $input->getOption(\Rector\Core\Configuration\Option::OPTION_OUTPUT_FORMAT);
|
||||
$this->reportLoadedRectors($outputFormat);
|
||||
return \RectorPrefix20210604\Symplify\PackageBuilder\Console\ShellCode::SUCCESS;
|
||||
}
|
||||
private function reportLoadedRectors() : void
|
||||
private function reportLoadedRectors(string $outputFormat) : void
|
||||
{
|
||||
$rectors = \array_filter($this->rectors, function (\Rector\Core\Contract\Rector\RectorInterface $rector) : bool {
|
||||
return !$rector instanceof \Rector\PostRector\Contract\Rector\PostRectorInterface;
|
||||
});
|
||||
$rectorCount = \count($rectors);
|
||||
if ($rectorCount > 0) {
|
||||
$this->symfonyStyle->title('Loaded Rector rules');
|
||||
foreach ($rectors as $rector) {
|
||||
$this->symfonyStyle->writeln(' * ' . \get_class($rector));
|
||||
}
|
||||
$message = \sprintf('%d loaded Rectors', $rectorCount);
|
||||
$this->symfonyStyle->success($message);
|
||||
} else {
|
||||
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->symfonyStyle->warning($warningMessage);
|
||||
$this->outputStyle->warning($warningMessage);
|
||||
return;
|
||||
}
|
||||
$outputFormatter = $this->showOutputFormatterCollector->getByName($outputFormat);
|
||||
$outputFormatter->list($rectors);
|
||||
}
|
||||
}
|
||||
|
42
src/Console/Output/ShowOutputFormatterCollector.php
Normal file
42
src/Console/Output/ShowOutputFormatterCollector.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Core\Console\Output;
|
||||
|
||||
use Rector\ListReporting\Contract\Output\ShowOutputFormatterInterface;
|
||||
use RectorPrefix20210604\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
|
||||
final class ShowOutputFormatterCollector
|
||||
{
|
||||
/**
|
||||
* @var ShowOutputFormatterInterface[]
|
||||
*/
|
||||
private $outputFormatters = [];
|
||||
/**
|
||||
* @param ShowOutputFormatterInterface[] $showOutputFormatters
|
||||
*/
|
||||
public function __construct(array $showOutputFormatters)
|
||||
{
|
||||
foreach ($showOutputFormatters as $showOutputFormatter) {
|
||||
$this->outputFormatters[$showOutputFormatter->getName()] = $showOutputFormatter;
|
||||
}
|
||||
}
|
||||
public function getByName(string $name) : \Rector\ListReporting\Contract\Output\ShowOutputFormatterInterface
|
||||
{
|
||||
$this->ensureOutputFormatExists($name);
|
||||
return $this->outputFormatters[$name];
|
||||
}
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getNames() : array
|
||||
{
|
||||
return \array_keys($this->outputFormatters);
|
||||
}
|
||||
private function ensureOutputFormatExists(string $name) : void
|
||||
{
|
||||
if (isset($this->outputFormatters[$name])) {
|
||||
return;
|
||||
}
|
||||
throw new \RectorPrefix20210604\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException(\sprintf('Output formatter "%s" was not found. Pick one of "%s".', $name, \implode('", "', $this->getNames())));
|
||||
}
|
||||
}
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20::getLoader();
|
||||
return ComposerAutoloaderInitda7e531b42f505ff3cdb7834df37d635::getLoader();
|
||||
|
3
vendor/composer/autoload_classmap.php
vendored
3
vendor/composer/autoload_classmap.php
vendored
@ -1809,6 +1809,7 @@ return array(
|
||||
'Rector\\Core\\Console\\ConsoleApplication' => $baseDir . '/src/Console/ConsoleApplication.php',
|
||||
'Rector\\Core\\Console\\Output\\OutputFormatterCollector' => $baseDir . '/src/Console/Output/OutputFormatterCollector.php',
|
||||
'Rector\\Core\\Console\\Output\\RectorOutputStyle' => $baseDir . '/src/Console/Output/RectorOutputStyle.php',
|
||||
'Rector\\Core\\Console\\Output\\ShowOutputFormatterCollector' => $baseDir . '/src/Console/Output/ShowOutputFormatterCollector.php',
|
||||
'Rector\\Core\\Console\\Style\\SymfonyStyleFactory' => $baseDir . '/src/Console/Style/SymfonyStyleFactory.php',
|
||||
'Rector\\Core\\Contract\\Application\\FileDecoratorInterface' => $baseDir . '/src/Contract/Application/FileDecoratorInterface.php',
|
||||
'Rector\\Core\\Contract\\Console\\OutputStyleInterface' => $baseDir . '/src/Contract/Console/OutputStyleInterface.php',
|
||||
@ -2235,6 +2236,8 @@ return array(
|
||||
'Rector\\Laravel\\ValueObject\\ServiceNameTypeAndVariableName' => $vendorDir . '/rector/rector-laravel/src/ValueObject/ServiceNameTypeAndVariableName.php',
|
||||
'Rector\\Laravel\\ValueObject\\TypeToTimeMethodAndPosition' => $vendorDir . '/rector/rector-laravel/src/ValueObject/TypeToTimeMethodAndPosition.php',
|
||||
'Rector\\LeagueEvent\\Rector\\MethodCall\\DispatchStringToObjectRector' => $baseDir . '/rules/LeagueEvent/Rector/MethodCall/DispatchStringToObjectRector.php',
|
||||
'Rector\\ListReporting\\Contract\\Output\\ShowOutputFormatterInterface' => $baseDir . '/packages/ListReporting/Contract/Output/ShowOutputFormatterInterface.php',
|
||||
'Rector\\ListReporting\\Output\\ConsoleOutputFormatter' => $baseDir . '/packages/ListReporting/Output/ConsoleOutputFormatter.php',
|
||||
'Rector\\MockeryToProphecy\\Collector\\MockVariableCollector' => $baseDir . '/rules/MockeryToProphecy/Collector/MockVariableCollector.php',
|
||||
'Rector\\MockeryToProphecy\\Rector\\ClassMethod\\MockeryCreateMockToProphizeRector' => $baseDir . '/rules/MockeryToProphecy/Rector/ClassMethod/MockeryCreateMockToProphizeRector.php',
|
||||
'Rector\\MockeryToProphecy\\Rector\\StaticCall\\MockeryCloseRemoveRector' => $baseDir . '/rules/MockeryToProphecy/Rector/StaticCall/MockeryCloseRemoveRector.php',
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20
|
||||
class ComposerAutoloaderInitda7e531b42f505ff3cdb7834df37d635
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitda7e531b42f505ff3cdb7834df37d635', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitda7e531b42f505ff3cdb7834df37d635', '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\ComposerStaticInitabdf37ef715dd84687a740f568e53b20::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitda7e531b42f505ff3cdb7834df37d635::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitabdf37ef715dd84687a740f568e53b20::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitda7e531b42f505ff3cdb7834df37d635::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequireabdf37ef715dd84687a740f568e53b20($fileIdentifier, $file);
|
||||
composerRequireda7e531b42f505ff3cdb7834df37d635($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequireabdf37ef715dd84687a740f568e53b20($fileIdentifier, $file)
|
||||
function composerRequireda7e531b42f505ff3cdb7834df37d635($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
11
vendor/composer/autoload_static.php
vendored
11
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitabdf37ef715dd84687a740f568e53b20
|
||||
class ComposerStaticInitda7e531b42f505ff3cdb7834df37d635
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
@ -2164,6 +2164,7 @@ class ComposerStaticInitabdf37ef715dd84687a740f568e53b20
|
||||
'Rector\\Core\\Console\\ConsoleApplication' => __DIR__ . '/../..' . '/src/Console/ConsoleApplication.php',
|
||||
'Rector\\Core\\Console\\Output\\OutputFormatterCollector' => __DIR__ . '/../..' . '/src/Console/Output/OutputFormatterCollector.php',
|
||||
'Rector\\Core\\Console\\Output\\RectorOutputStyle' => __DIR__ . '/../..' . '/src/Console/Output/RectorOutputStyle.php',
|
||||
'Rector\\Core\\Console\\Output\\ShowOutputFormatterCollector' => __DIR__ . '/../..' . '/src/Console/Output/ShowOutputFormatterCollector.php',
|
||||
'Rector\\Core\\Console\\Style\\SymfonyStyleFactory' => __DIR__ . '/../..' . '/src/Console/Style/SymfonyStyleFactory.php',
|
||||
'Rector\\Core\\Contract\\Application\\FileDecoratorInterface' => __DIR__ . '/../..' . '/src/Contract/Application/FileDecoratorInterface.php',
|
||||
'Rector\\Core\\Contract\\Console\\OutputStyleInterface' => __DIR__ . '/../..' . '/src/Contract/Console/OutputStyleInterface.php',
|
||||
@ -2590,6 +2591,8 @@ class ComposerStaticInitabdf37ef715dd84687a740f568e53b20
|
||||
'Rector\\Laravel\\ValueObject\\ServiceNameTypeAndVariableName' => __DIR__ . '/..' . '/rector/rector-laravel/src/ValueObject/ServiceNameTypeAndVariableName.php',
|
||||
'Rector\\Laravel\\ValueObject\\TypeToTimeMethodAndPosition' => __DIR__ . '/..' . '/rector/rector-laravel/src/ValueObject/TypeToTimeMethodAndPosition.php',
|
||||
'Rector\\LeagueEvent\\Rector\\MethodCall\\DispatchStringToObjectRector' => __DIR__ . '/../..' . '/rules/LeagueEvent/Rector/MethodCall/DispatchStringToObjectRector.php',
|
||||
'Rector\\ListReporting\\Contract\\Output\\ShowOutputFormatterInterface' => __DIR__ . '/../..' . '/packages/ListReporting/Contract/Output/ShowOutputFormatterInterface.php',
|
||||
'Rector\\ListReporting\\Output\\ConsoleOutputFormatter' => __DIR__ . '/../..' . '/packages/ListReporting/Output/ConsoleOutputFormatter.php',
|
||||
'Rector\\MockeryToProphecy\\Collector\\MockVariableCollector' => __DIR__ . '/../..' . '/rules/MockeryToProphecy/Collector/MockVariableCollector.php',
|
||||
'Rector\\MockeryToProphecy\\Rector\\ClassMethod\\MockeryCreateMockToProphizeRector' => __DIR__ . '/../..' . '/rules/MockeryToProphecy/Rector/ClassMethod/MockeryCreateMockToProphizeRector.php',
|
||||
'Rector\\MockeryToProphecy\\Rector\\StaticCall\\MockeryCloseRemoveRector' => __DIR__ . '/../..' . '/rules/MockeryToProphecy/Rector/StaticCall/MockeryCloseRemoveRector.php',
|
||||
@ -3869,9 +3872,9 @@ class ComposerStaticInitabdf37ef715dd84687a740f568e53b20
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitabdf37ef715dd84687a740f568e53b20::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitabdf37ef715dd84687a740f568e53b20::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitabdf37ef715dd84687a740f568e53b20::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitda7e531b42f505ff3cdb7834df37d635::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitda7e531b42f505ff3cdb7834df37d635::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitda7e531b42f505ff3cdb7834df37d635::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
14
vendor/composer/installed.json
vendored
14
vendor/composer/installed.json
vendored
@ -1625,17 +1625,17 @@
|
||||
},
|
||||
{
|
||||
"name": "rector\/rector-symfony",
|
||||
"version": "0.11.4",
|
||||
"version_normalized": "0.11.4.0",
|
||||
"version": "0.11.5",
|
||||
"version_normalized": "0.11.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
|
||||
"reference": "897139e6e1321ea2de50e9473e63cd1958c799b3"
|
||||
"reference": "9cb6595e25899dc01a4641816ffadc4c8e9a14f1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/897139e6e1321ea2de50e9473e63cd1958c799b3",
|
||||
"reference": "897139e6e1321ea2de50e9473e63cd1958c799b3",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/9cb6595e25899dc01a4641816ffadc4c8e9a14f1",
|
||||
"reference": "9cb6595e25899dc01a4641816ffadc4c8e9a14f1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1658,7 +1658,7 @@
|
||||
"symplify\/phpstan-rules": "^9.3",
|
||||
"symplify\/rule-doc-generator": "^9.3"
|
||||
},
|
||||
"time": "2021-06-01T12:54:15+00:00",
|
||||
"time": "2021-06-04T19:57:11+00:00",
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -1683,7 +1683,7 @@
|
||||
"description": "Rector upgrades rules for Symfony Framework",
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/rectorphp\/rector-symfony\/issues",
|
||||
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.4"
|
||||
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.5"
|
||||
},
|
||||
"install-path": "..\/rector\/rector-symfony"
|
||||
},
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
||||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.2'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.3'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.1'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.4'), 'rector/rector-nette-to-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette-to-symfony', 'relative_install_path' => '../../rector-nette-to-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.3'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.1'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.4'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'v0.11.14'));
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.2'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.3'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.1'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.4'), 'rector/rector-nette-to-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette-to-symfony', 'relative_install_path' => '../../rector-nette-to-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.3'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.1'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => '0.11.5'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'v0.11.14'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
@ -130,6 +130,10 @@ CODE_SAMPLE
|
||||
}
|
||||
$routeAttributes = $this->nodeRepository->findAttributes('Symfony\\Component\\Routing\\Annotation\\Route');
|
||||
$constantNameAndValues = $this->constantNameAndValueResolver->resolveFromAttributes($routeAttributes, 'ROUTE_');
|
||||
// do not create empty file
|
||||
if ($constantNameAndValues === []) {
|
||||
return;
|
||||
}
|
||||
$namespace = $this->routeNameClassFactory->create($constantNameAndValues, $routeNameFilePath);
|
||||
$addedFileWithNodes = new \Rector\FileSystemRector\ValueObject\AddedFileWithNodes($routeNameFilePath, [$namespace]);
|
||||
$this->removedAndAddedFilesCollector->addAddedFile($addedFileWithNodes);
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -21,8 +21,8 @@ if (!class_exists('SomeTestCase', false) && !interface_exists('SomeTestCase', fa
|
||||
if (!class_exists('CheckoutEntityFactory', false) && !interface_exists('CheckoutEntityFactory', false) && !trait_exists('CheckoutEntityFactory', false)) {
|
||||
spl_autoload_call('RectorPrefix20210604\CheckoutEntityFactory');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20', false) && !interface_exists('ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20', false) && !trait_exists('ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20', false)) {
|
||||
spl_autoload_call('RectorPrefix20210604\ComposerAutoloaderInitabdf37ef715dd84687a740f568e53b20');
|
||||
if (!class_exists('ComposerAutoloaderInitda7e531b42f505ff3cdb7834df37d635', false) && !interface_exists('ComposerAutoloaderInitda7e531b42f505ff3cdb7834df37d635', false) && !trait_exists('ComposerAutoloaderInitda7e531b42f505ff3cdb7834df37d635', false)) {
|
||||
spl_autoload_call('RectorPrefix20210604\ComposerAutoloaderInitda7e531b42f505ff3cdb7834df37d635');
|
||||
}
|
||||
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
|
||||
spl_autoload_call('RectorPrefix20210604\Doctrine\Inflector\Inflector');
|
||||
@ -3323,9 +3323,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20210604\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequireabdf37ef715dd84687a740f568e53b20')) {
|
||||
function composerRequireabdf37ef715dd84687a740f568e53b20() {
|
||||
return \RectorPrefix20210604\composerRequireabdf37ef715dd84687a740f568e53b20(...func_get_args());
|
||||
if (!function_exists('composerRequireda7e531b42f505ff3cdb7834df37d635')) {
|
||||
function composerRequireda7e531b42f505ff3cdb7834df37d635() {
|
||||
return \RectorPrefix20210604\composerRequireda7e531b42f505ff3cdb7834df37d635(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user