Updated Rector to commit 232257df31359040912eecd9045a7f75d90e7b7d

232257df31 [DowngradePhp81] Add DowngradeArrayIsListRector (#1996)
This commit is contained in:
Tomas Votruba 2022-04-02 13:16:57 +00:00
parent 22b0d1cc15
commit e2b5720d6b
6 changed files with 22 additions and 32 deletions

View File

@ -13,8 +13,6 @@ use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\PhpParser\Parser\InlineCodeParser;
use Rector\Core\Rector\AbstractRector;
use Rector\DowngradePhp72\NodeAnalyzer\FunctionExistsFunCallAnalyzer;
use Rector\Naming\Naming\VariableNaming;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
@ -34,16 +32,10 @@ final class DowngradeStreamIsattyRector extends \Rector\Core\Rector\AbstractRect
* @var \Rector\DowngradePhp72\NodeAnalyzer\FunctionExistsFunCallAnalyzer
*/
private $functionExistsFunCallAnalyzer;
/**
* @readonly
* @var \Rector\Naming\Naming\VariableNaming
*/
private $variableNaming;
public function __construct(\Rector\Core\PhpParser\Parser\InlineCodeParser $inlineCodeParser, \Rector\DowngradePhp72\NodeAnalyzer\FunctionExistsFunCallAnalyzer $functionExistsFunCallAnalyzer, \Rector\Naming\Naming\VariableNaming $variableNaming)
public function __construct(\Rector\Core\PhpParser\Parser\InlineCodeParser $inlineCodeParser, \Rector\DowngradePhp72\NodeAnalyzer\FunctionExistsFunCallAnalyzer $functionExistsFunCallAnalyzer)
{
$this->inlineCodeParser = $inlineCodeParser;
$this->functionExistsFunCallAnalyzer = $functionExistsFunCallAnalyzer;
$this->variableNaming = $variableNaming;
}
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
{
@ -105,11 +97,9 @@ CODE_SAMPLE
return null;
}
$function = $this->createClosure();
$scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE);
$variable = new \PhpParser\Node\Expr\Variable($this->variableNaming->createCountedValueName('streamIsatty', $scope));
$assign = new \PhpParser\Node\Expr\Assign($variable, $function);
$assign = new \PhpParser\Node\Expr\Assign(new \PhpParser\Node\Expr\Variable('streamIsatty'), $function);
$this->nodesToAddCollector->addNodeBeforeNode($assign, $node);
return new \PhpParser\Node\Expr\FuncCall($variable, $node->args);
return new \PhpParser\Node\Expr\FuncCall(new \PhpParser\Node\Expr\Variable('streamIsatty'), $node->args);
}
private function createClosure() : \PhpParser\Node\Expr\Closure
{

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'e077d7c3fb9cc4204857a80d587f23a75ddf6665';
public const PACKAGE_VERSION = '232257df31359040912eecd9045a7f75d90e7b7d';
/**
* @var string
*/
public const RELEASE_DATE = '2022-04-02 15:09:17';
public const RELEASE_DATE = '2022-04-02 15:08:53';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220402\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 ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3::getLoader();
return ComposerAutoloaderInit6ef6db4d39ecc1f3de28fc92e0ccffe4::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3
class ComposerAutoloaderInit6ef6db4d39ecc1f3de28fc92e0ccffe4
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit6ef6db4d39ecc1f3de28fc92e0ccffe4', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit6ef6db4d39ecc1f3de28fc92e0ccffe4', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
\Composer\Autoload\ComposerStaticInitaa8e843b8b9a56fae00580486a5711d3::getInitializer($loader)();
\Composer\Autoload\ComposerStaticInit6ef6db4d39ecc1f3de28fc92e0ccffe4::getInitializer($loader)();
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInitaa8e843b8b9a56fae00580486a5711d3::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit6ef6db4d39ecc1f3de28fc92e0ccffe4::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireaa8e843b8b9a56fae00580486a5711d3($fileIdentifier, $file);
composerRequire6ef6db4d39ecc1f3de28fc92e0ccffe4($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3
* @param string $file
* @return void
*/
function composerRequireaa8e843b8b9a56fae00580486a5711d3($fileIdentifier, $file)
function composerRequire6ef6db4d39ecc1f3de28fc92e0ccffe4($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 ComposerStaticInitaa8e843b8b9a56fae00580486a5711d3
class ComposerStaticInit6ef6db4d39ecc1f3de28fc92e0ccffe4
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@ -3839,9 +3839,9 @@ class ComposerStaticInitaa8e843b8b9a56fae00580486a5711d3
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitaa8e843b8b9a56fae00580486a5711d3::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitaa8e843b8b9a56fae00580486a5711d3::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitaa8e843b8b9a56fae00580486a5711d3::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit6ef6db4d39ecc1f3de28fc92e0ccffe4::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit6ef6db4d39ecc1f3de28fc92e0ccffe4::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit6ef6db4d39ecc1f3de28fc92e0ccffe4::$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('RectorPrefix20220402\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3', false) && !interface_exists('ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3', false) && !trait_exists('ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3', false)) {
spl_autoload_call('RectorPrefix20220402\ComposerAutoloaderInitaa8e843b8b9a56fae00580486a5711d3');
if (!class_exists('ComposerAutoloaderInit6ef6db4d39ecc1f3de28fc92e0ccffe4', false) && !interface_exists('ComposerAutoloaderInit6ef6db4d39ecc1f3de28fc92e0ccffe4', false) && !trait_exists('ComposerAutoloaderInit6ef6db4d39ecc1f3de28fc92e0ccffe4', false)) {
spl_autoload_call('RectorPrefix20220402\ComposerAutoloaderInit6ef6db4d39ecc1f3de28fc92e0ccffe4');
}
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('RectorPrefix20220402\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220402\print_node(...func_get_args());
}
}
if (!function_exists('composerRequireaa8e843b8b9a56fae00580486a5711d3')) {
function composerRequireaa8e843b8b9a56fae00580486a5711d3() {
return \RectorPrefix20220402\composerRequireaa8e843b8b9a56fae00580486a5711d3(...func_get_args());
if (!function_exists('composerRequire6ef6db4d39ecc1f3de28fc92e0ccffe4')) {
function composerRequire6ef6db4d39ecc1f3de28fc92e0ccffe4() {
return \RectorPrefix20220402\composerRequire6ef6db4d39ecc1f3de28fc92e0ccffe4(...func_get_args());
}
}
if (!function_exists('scanPath')) {