Updated Rector to commit 8eac546e111b9d2f4053c722a7552a2eba9e5836

8eac546e11 use generic patch for RectorConfig
This commit is contained in:
Tomas Votruba 2022-06-01 13:18:17 +00:00
parent 4e6c02bd87
commit 9116f9a534
8 changed files with 47 additions and 47 deletions

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '59445debbe801b58a993fa77b2907350cbb47f92';
public const PACKAGE_VERSION = '8eac546e111b9d2f4053c722a7552a2eba9e5836';
/**
* @var string
*/
public const RELEASE_DATE = '2022-06-01 14:58:30';
public const RELEASE_DATE = '2022-06-01 15:12:57';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit393885acae39e13961ac72f77ab44080::getLoader();
return ComposerAutoloaderInit12b79b18dd89cdd5167f5528c1474958::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit393885acae39e13961ac72f77ab44080
class ComposerAutoloaderInit12b79b18dd89cdd5167f5528c1474958
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit393885acae39e13961ac72f77ab44080
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit393885acae39e13961ac72f77ab44080', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit12b79b18dd89cdd5167f5528c1474958', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit393885acae39e13961ac72f77ab44080', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit12b79b18dd89cdd5167f5528c1474958', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit393885acae39e13961ac72f77ab44080::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit12b79b18dd89cdd5167f5528c1474958::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit393885acae39e13961ac72f77ab44080::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit12b79b18dd89cdd5167f5528c1474958::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire393885acae39e13961ac72f77ab44080($fileIdentifier, $file);
composerRequire12b79b18dd89cdd5167f5528c1474958($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit393885acae39e13961ac72f77ab44080
* @param string $file
* @return void
*/
function composerRequire393885acae39e13961ac72f77ab44080($fileIdentifier, $file)
function composerRequire12b79b18dd89cdd5167f5528c1474958($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 ComposerStaticInit393885acae39e13961ac72f77ab44080
class ComposerStaticInit12b79b18dd89cdd5167f5528c1474958
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -3782,9 +3782,9 @@ class ComposerStaticInit393885acae39e13961ac72f77ab44080
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit393885acae39e13961ac72f77ab44080::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit393885acae39e13961ac72f77ab44080::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit393885acae39e13961ac72f77ab44080::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit12b79b18dd89cdd5167f5528c1474958::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit12b79b18dd89cdd5167f5528c1474958::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit12b79b18dd89cdd5167f5528c1474958::$classMap;
}, null, ClassLoader::class);
}

View File

@ -2971,8 +2971,8 @@
"type": "library",
"extra": {
"patches_applied": [
"https:\/\/raw.githubusercontent.com\/rectorphp\/vendor-patches\/main\/patches\/symfony-dependency-injection.patch",
"https:\/\/raw.githubusercontent.com\/rectorphp\/vendor-patches\/main\/patches\/symfony-php-config-loader.patch"
"https:\/\/raw.githubusercontent.com\/symplify\/vendor-patch-files\/main\/patches\/generic-php-config-loader.patch",
"https:\/\/raw.githubusercontent.com\/rectorphp\/vendor-patches\/main\/patches\/symfony-dependency-injection.patch"
]
},
"installation-source": "dist",

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('RectorPrefix20220601\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit393885acae39e13961ac72f77ab44080', false) && !interface_exists('ComposerAutoloaderInit393885acae39e13961ac72f77ab44080', false) && !trait_exists('ComposerAutoloaderInit393885acae39e13961ac72f77ab44080', false)) {
spl_autoload_call('RectorPrefix20220601\ComposerAutoloaderInit393885acae39e13961ac72f77ab44080');
if (!class_exists('ComposerAutoloaderInit12b79b18dd89cdd5167f5528c1474958', false) && !interface_exists('ComposerAutoloaderInit12b79b18dd89cdd5167f5528c1474958', false) && !trait_exists('ComposerAutoloaderInit12b79b18dd89cdd5167f5528c1474958', false)) {
spl_autoload_call('RectorPrefix20220601\ComposerAutoloaderInit12b79b18dd89cdd5167f5528c1474958');
}
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('RectorPrefix20220601\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220601\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire393885acae39e13961ac72f77ab44080')) {
function composerRequire393885acae39e13961ac72f77ab44080() {
return \RectorPrefix20220601\composerRequire393885acae39e13961ac72f77ab44080(...func_get_args());
if (!function_exists('composerRequire12b79b18dd89cdd5167f5528c1474958')) {
function composerRequire12b79b18dd89cdd5167f5528c1474958() {
return \RectorPrefix20220601\composerRequire12b79b18dd89cdd5167f5528c1474958(...func_get_args());
}
}
if (!function_exists('scanPath')) {

View File

@ -10,7 +10,6 @@
*/
namespace RectorPrefix20220601\Symfony\Component\DependencyInjection\Loader;
use Rector\Config\RectorConfig;
use RectorPrefix20220601\Symfony\Component\Config\Builder\ConfigBuilderGenerator;
use RectorPrefix20220601\Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface;
use RectorPrefix20220601\Symfony\Component\Config\Builder\ConfigBuilderInterface;
@ -59,7 +58,10 @@ class PhpFileLoader extends \RectorPrefix20220601\Symfony\Component\DependencyIn
try {
$callback = $load($path, $this->env);
if (\is_object($callback) && \is_callable($callback)) {
$this->executeCallback($callback, new \Rector\Config\RectorConfig($this->container, $this, $this->instanceof, $path, $resource, $this->env), $path);
// generic solution
$reflectionFunction = new \ReflectionFunction($callback);
$containerConfiguratorClass = $reflectionFunction->getParameters()[0]->getType()->getName();
$this->executeCallback($callback, new $containerConfiguratorClass($this->container, $this, $this->instanceof, $path, $resource, $this->env), $path);
}
} finally {
$this->instanceof = [];
@ -108,28 +110,26 @@ class PhpFileLoader extends \RectorPrefix20220601\Symfony\Component\DependencyIn
throw new \InvalidArgumentException(\sprintf('Could not resolve argument "$%s" for "%s". You must typehint it (for example with "%s" or "%s").', $parameter->getName(), $path, \Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator::class, \RectorPrefix20220601\Symfony\Component\DependencyInjection\ContainerBuilder::class));
}
$type = $reflectionType->getName();
switch ($type) {
case \Rector\Config\RectorConfig::class:
$arguments[] = $containerConfigurator;
break;
case \Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator::class:
$arguments[] = $containerConfigurator;
break;
case \RectorPrefix20220601\Symfony\Component\DependencyInjection\ContainerBuilder::class:
$arguments[] = $this->container;
break;
case \RectorPrefix20220601\Symfony\Component\DependencyInjection\Loader\FileLoader::class:
case self::class:
$arguments[] = $this;
break;
default:
try {
$configBuilder = $this->configBuilder($type);
} catch (\RectorPrefix20220601\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException|\LogicException $e) {
throw new \InvalidArgumentException(\sprintf('Could not resolve argument "%s" for "%s".', $type . ' $' . $parameter->getName(), $path), 0, $e);
}
$configBuilders[] = $configBuilder;
$arguments[] = $configBuilder;
if (\is_a($type, \Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator::class, \true)) {
$arguments[] = $containerConfigurator;
} else {
switch ($type) {
case \RectorPrefix20220601\Symfony\Component\DependencyInjection\ContainerBuilder::class:
$arguments[] = $this->container;
break;
case \RectorPrefix20220601\Symfony\Component\DependencyInjection\Loader\FileLoader::class:
case self::class:
$arguments[] = $this;
break;
default:
try {
$configBuilder = $this->configBuilder($type);
} catch (\RectorPrefix20220601\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException|\LogicException $e) {
throw new \InvalidArgumentException(\sprintf('Could not resolve argument "%s" for "%s".', $type . ' $' . $parameter->getName(), $path), 0, $e);
}
$configBuilders[] = $configBuilder;
$arguments[] = $configBuilder;
}
}
}
// Force load ContainerConfigurator to make env(), param() etc available.

View File

@ -2,10 +2,10 @@ This file was automatically generated by Composer Patches (https://github.com/cw
Patches applied to this directory:
0
Source: https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/symfony-dependency-injection.patch
Source: https://raw.githubusercontent.com/symplify/vendor-patch-files/main/patches/generic-php-config-loader.patch
1
Source: https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/symfony-php-config-loader.patch
Source: https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/symfony-dependency-injection.patch