Updated Rector to commit 67e44eff26

67e44eff26 [Scoped] Fix build standalone and along other package on rector/rector (#1091)
This commit is contained in:
Tomas Votruba 2021-10-28 12:05:09 +00:00
parent ecd1a481cf
commit 984561f522
7 changed files with 28 additions and 22 deletions

View File

@ -7,7 +7,7 @@
],
"require": {
"php": "^7.1|^8.0",
"phpstan/phpstan": "1.0"
"phpstan/phpstan": "^1.0"
},
"autoload": {
"files": [

View File

@ -178,14 +178,20 @@ final class AnonymousFunctionFactory
return (string) $this->nodeNameResolver->getName($use->var);
}, $uses, []);
$variableNames = \array_unique($variableNames);
return \array_map(function ($variableName) : ClosureUse {
return \array_map(static function ($variableName) : ClosureUse {
return new \PhpParser\Node\Expr\ClosureUse(new \PhpParser\Node\Expr\Variable($variableName));
}, $variableNames, []);
}
private function applyNestedUses(\PhpParser\Node\Expr\Closure $anonymousFunctionNode, \PhpParser\Node\Expr\Variable $useVariable) : \PhpParser\Node\Expr\Closure
{
$anonymousFunctionNode = clone $anonymousFunctionNode;
$parent = $this->betterNodeFinder->findParentType($useVariable, \PhpParser\Node\Expr\Closure::class);
if ($parent instanceof \PhpParser\Node\Expr\Closure) {
$paramNames = $this->nodeNameResolver->getNames($parent->params);
if ($this->nodeNameResolver->isNames($useVariable, $paramNames)) {
return $anonymousFunctionNode;
}
}
$anonymousFunctionNode = clone $anonymousFunctionNode;
while ($parent instanceof \PhpParser\Node\Expr\Closure) {
$parentOfParent = $this->betterNodeFinder->findParentType($parent, \PhpParser\Node\Expr\Closure::class);
$uses = [];

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '6a6dc6b6bfd1f664ac2bddaf92304a3da9170a69';
public const PACKAGE_VERSION = '67e44eff2634077627176a23c923fb9a40753bdb';
/**
* @var string
*/
public const RELEASE_DATE = '2021-10-28 13:44:05';
public const RELEASE_DATE = '2021-10-28 13:46:20';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211028\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

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

View File

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

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitc964d0a4165d4a197cd09132e08a419d
class ComposerStaticInit8a9202f6c1585c321785049a7e6562f1
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3894,9 +3894,9 @@ class ComposerStaticInitc964d0a4165d4a197cd09132e08a419d
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitc964d0a4165d4a197cd09132e08a419d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc964d0a4165d4a197cd09132e08a419d::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitc964d0a4165d4a197cd09132e08a419d::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit8a9202f6c1585c321785049a7e6562f1::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8a9202f6c1585c321785049a7e6562f1::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8a9202f6c1585c321785049a7e6562f1::$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('RectorPrefix20211028\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitc964d0a4165d4a197cd09132e08a419d', false) && !interface_exists('ComposerAutoloaderInitc964d0a4165d4a197cd09132e08a419d', false) && !trait_exists('ComposerAutoloaderInitc964d0a4165d4a197cd09132e08a419d', false)) {
spl_autoload_call('RectorPrefix20211028\ComposerAutoloaderInitc964d0a4165d4a197cd09132e08a419d');
if (!class_exists('ComposerAutoloaderInit8a9202f6c1585c321785049a7e6562f1', false) && !interface_exists('ComposerAutoloaderInit8a9202f6c1585c321785049a7e6562f1', false) && !trait_exists('ComposerAutoloaderInit8a9202f6c1585c321785049a7e6562f1', false)) {
spl_autoload_call('RectorPrefix20211028\ComposerAutoloaderInit8a9202f6c1585c321785049a7e6562f1');
}
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('RectorPrefix20211028\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -3306,9 +3306,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211028\print_node(...func_get_args());
}
}
if (!function_exists('composerRequirec964d0a4165d4a197cd09132e08a419d')) {
function composerRequirec964d0a4165d4a197cd09132e08a419d() {
return \RectorPrefix20211028\composerRequirec964d0a4165d4a197cd09132e08a419d(...func_get_args());
if (!function_exists('composerRequire8a9202f6c1585c321785049a7e6562f1')) {
function composerRequire8a9202f6c1585c321785049a7e6562f1() {
return \RectorPrefix20211028\composerRequire8a9202f6c1585c321785049a7e6562f1(...func_get_args());
}
}
if (!function_exists('parseArgs')) {