Updated Rector to commit f068fd9859

f068fd9859 Fix bug with single configuration item unwrap (#1443)
This commit is contained in:
Tomas Votruba 2021-12-09 20:19:42 +00:00
parent a65233ea4f
commit 61782ced2a
9 changed files with 38 additions and 27 deletions

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '0c695e2e0589c17bb607ec7c5fe0c49740ef5317';
public const PACKAGE_VERSION = 'f068fd98590a7ece4bee280ebb13224562b6cff3';
/**
* @var string
*/
public const RELEASE_DATE = '2021-12-09 17:45:08';
public const RELEASE_DATE = '2021-12-09 20:06:42';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211209\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -4,6 +4,8 @@ declare (strict_types=1);
namespace Rector\Core\DependencyInjection\Collector;
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
use ReflectionClass;
use ReflectionClassConstant;
use RectorPrefix20211209\Symfony\Component\DependencyInjection\Definition;
use RectorPrefix20211209\Symplify\PackageBuilder\Yaml\ParametersMerger;
final class ConfigureCallValuesCollector
@ -51,8 +53,17 @@ final class ConfigureCallValuesCollector
if (\is_array($configureValue) && \count($configureValue) === 1) {
\reset($configureValue);
$firstKey = \key($configureValue);
if (\is_array($configureValue[$firstKey])) {
$configureValue = $configureValue[$firstKey];
if (\is_string($firstKey) && \is_array($configureValue[$firstKey])) {
// has class some public constants?
// fixes bug when 1 item is unwrapped and treated as constant key, without rule having public constant
$classReflection = new \ReflectionClass($rectorClass);
$constantNamesToValues = $classReflection->getConstants(\ReflectionClassConstant::IS_PUBLIC);
foreach ($constantNamesToValues as $constantNameToValue) {
if ($constantNameToValue === $firstKey) {
$configureValue = $configureValue[$firstKey];
break;
}
}
}
}
if (!isset($this->configureCallValuesByRectorClass[$rectorClass])) {

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d
class ComposerAutoloaderInit11d4a8fdefcdf16260d276ad8f8a0003
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit11d4a8fdefcdf16260d276ad8f8a0003', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit11d4a8fdefcdf16260d276ad8f8a0003', '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\ComposerStaticInit2b4e877593f8f88c3998a9357665b46d::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit11d4a8fdefcdf16260d276ad8f8a0003::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit2b4e877593f8f88c3998a9357665b46d::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit11d4a8fdefcdf16260d276ad8f8a0003::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire2b4e877593f8f88c3998a9357665b46d($fileIdentifier, $file);
composerRequire11d4a8fdefcdf16260d276ad8f8a0003($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire2b4e877593f8f88c3998a9357665b46d($fileIdentifier, $file)
function composerRequire11d4a8fdefcdf16260d276ad8f8a0003($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit2b4e877593f8f88c3998a9357665b46d
class ComposerStaticInit11d4a8fdefcdf16260d276ad8f8a0003
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@ -3794,9 +3794,9 @@ class ComposerStaticInit2b4e877593f8f88c3998a9357665b46d
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit2b4e877593f8f88c3998a9357665b46d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit2b4e877593f8f88c3998a9357665b46d::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit2b4e877593f8f88c3998a9357665b46d::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit11d4a8fdefcdf16260d276ad8f8a0003::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit11d4a8fdefcdf16260d276ad8f8a0003::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit11d4a8fdefcdf16260d276ad8f8a0003::$classMap;
}, null, ClassLoader::class);
}

View File

@ -2660,12 +2660,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/sabbelasichon\/typo3-rector.git",
"reference": "107492ce2ba30020c4a49f3919dc77962080c062"
"reference": "7c6312406c81e1cdc1384270e8fb34662bf26dad"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/sabbelasichon\/typo3-rector\/zipball\/107492ce2ba30020c4a49f3919dc77962080c062",
"reference": "107492ce2ba30020c4a49f3919dc77962080c062",
"url": "https:\/\/api.github.com\/repos\/sabbelasichon\/typo3-rector\/zipball\/7c6312406c81e1cdc1384270e8fb34662bf26dad",
"reference": "7c6312406c81e1cdc1384270e8fb34662bf26dad",
"shasum": ""
},
"require": {
@ -2696,7 +2696,7 @@
"symplify\/vendor-patches": "^10.0",
"tracy\/tracy": "^2.8"
},
"time": "2021-12-09T09:49:35+00:00",
"time": "2021-12-09T20:01:07+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -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' => 'dev-main 584d84b'), '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' => 'dev-main 16548a2'), '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' => 'dev-main 4fb1137'), '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' => 'dev-main 1e3b3ab'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5b6de7c'), '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' => 'dev-main ed23e61'), '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' => 'dev-main 0a50dc4'), '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' => 'dev-main 107492c'));
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' => 'dev-main 584d84b'), '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' => 'dev-main 16548a2'), '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' => 'dev-main 4fb1137'), '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' => 'dev-main 1e3b3ab'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5b6de7c'), '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' => 'dev-main ed23e61'), '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' => 'dev-main 0a50dc4'), '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' => 'dev-main 7c63124'));
private function __construct()
{
}

View File

@ -12,8 +12,8 @@ if (!class_exists('GenerateChangelogCommand', false) && !interface_exists('Gener
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20211209\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d', false) && !interface_exists('ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d', false) && !trait_exists('ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d', false)) {
spl_autoload_call('RectorPrefix20211209\ComposerAutoloaderInit2b4e877593f8f88c3998a9357665b46d');
if (!class_exists('ComposerAutoloaderInit11d4a8fdefcdf16260d276ad8f8a0003', false) && !interface_exists('ComposerAutoloaderInit11d4a8fdefcdf16260d276ad8f8a0003', false) && !trait_exists('ComposerAutoloaderInit11d4a8fdefcdf16260d276ad8f8a0003', false)) {
spl_autoload_call('RectorPrefix20211209\ComposerAutoloaderInit11d4a8fdefcdf16260d276ad8f8a0003');
}
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('RectorPrefix20211209\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -81,9 +81,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211209\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire2b4e877593f8f88c3998a9357665b46d')) {
function composerRequire2b4e877593f8f88c3998a9357665b46d() {
return \RectorPrefix20211209\composerRequire2b4e877593f8f88c3998a9357665b46d(...func_get_args());
if (!function_exists('composerRequire11d4a8fdefcdf16260d276ad8f8a0003')) {
function composerRequire11d4a8fdefcdf16260d276ad8f8a0003() {
return \RectorPrefix20211209\composerRequire11d4a8fdefcdf16260d276ad8f8a0003(...func_get_args());
}
}
if (!function_exists('scanPath')) {