Skip to content

Commit

Permalink
Updated Rector to commit b84fe9524aa20e200f743f13f6925d93225c6280
Browse files Browse the repository at this point in the history
rectorphp/rector-src@b84fe95 [Php56] Reduce origNode check on UndefinedVariableResolver (#4033)
  • Loading branch information
TomasVotruba committed May 31, 2023
1 parent 089eca6 commit f7d04bd
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 21 deletions.
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e::getLoader();
return ComposerAutoloaderInit1f2f780a746bd4ed47698aadad0bf6cd::getLoader();
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e
class ComposerAutoloaderInit1f2f780a746bd4ed47698aadad0bf6cd
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit1f2f780a746bd4ed47698aadad0bf6cd', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit1f2f780a746bd4ed47698aadad0bf6cd', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e
class ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3069,9 +3069,9 @@ class ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::$classMap;

}, null, ClassLoader::class);
}
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1920,12 +1920,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "b9b87e1cc777a055d6e1c883a6fb541384f43da1"
"reference": "f4b61e5dba41bc71810e2e2069ef6921cf1a1f77"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/b9b87e1cc777a055d6e1c883a6fb541384f43da1",
"reference": "b9b87e1cc777a055d6e1c883a6fb541384f43da1",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/f4b61e5dba41bc71810e2e2069ef6921cf1a1f77",
"reference": "f4b61e5dba41bc71810e2e2069ef6921cf1a1f77",
"shasum": ""
},
"require": {
Expand All @@ -1949,7 +1949,7 @@
"tomasvotruba\/type-coverage": "^0.2",
"tomasvotruba\/unused-public": "^0.1"
},
"time": "2023-05-31T00:12:23+00:00",
"time": "2023-05-31T02:33:58+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/installed.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vendor/rector/extension-installer/src/GeneratedConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
final class GeneratedConfig
{
public const EXTENSIONS = array('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 7f0656f'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b9b87e1'), '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 e276dee'), '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 2348d4f'));
public const EXTENSIONS = array('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 7f0656f'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f4b61e5'), '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 e276dee'), '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 2348d4f'));
private function __construct()
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@ public function refactor(Node $node)
}
return null;
}
private function processInsertFuncCallExpression(StmtsAwareInterface $stmtsAware, Expression $expression, FuncCall $funcCall) : StmtsAwareInterface
{
if ($stmtsAware->stmts === null) {
return $stmtsAware;
}
foreach ($stmtsAware->stmts as $key => $stmt) {
$hasFuncCall = $this->betterNodeFinder->findFirst($stmt, static function (Node $node) use($funcCall) : bool {
return $node === $funcCall;
});
if ($hasFuncCall instanceof Node) {
\array_splice($stmtsAware->stmts, $key, 0, [$expression]);
return $stmtsAware;
}
}
return $stmtsAware;
}
/**
* @return Stmt[]|StmtsAwareInterface|null
* @param \PhpParser\Node\Stmt\Expression|\Rector\Core\Contract\PhpParser\Node\StmtsAwareInterface $stmt
Expand All @@ -126,8 +142,7 @@ private function refactorArrayKeyFirst(FuncCall $funcCall, $stmt, bool $isPartOf
$firstArg->value = $array;
}
if ($stmt instanceof StmtsAwareInterface && $isPartOfCond === \false) {
$stmt->stmts = \array_merge([$resetFuncCallExpression], (array) $stmt->stmts);
return $stmt;
return $this->processInsertFuncCallExpression($stmt, $resetFuncCallExpression, $funcCall);
}
$newStmts[] = $resetFuncCallExpression;
$newStmts[] = $stmt;
Expand Down Expand Up @@ -157,8 +172,7 @@ private function refactorArrayKeyLast(FuncCall $funcCall, $stmt, bool $isPartOfC
$firstArg->value = $array;
}
if ($stmt instanceof StmtsAwareInterface && $isPartOfCond === \false) {
$stmt->stmts = \array_merge([$endFuncCallExpression], (array) $stmt->stmts);
return $stmt;
return $this->processInsertFuncCallExpression($stmt, $endFuncCallExpression, $funcCall);
}
$newStmts[] = $stmt;
return $newStmts;
Expand Down
2 changes: 1 addition & 1 deletion vendor/symfony/console/Input/ArgvInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ private function parseArgument(string $token) : void
$this->arguments[$arg->getName()][] = $token;
// unexpected argument
} else {
\reset($all);
$all = $this->definition->getArguments();
$symfonyCommandName = null;
\reset($all);
if (($inputArgument = $all[$key = \key($all)] ?? null) && 'command' === $inputArgument->getName()) {
$symfonyCommandName = $this->arguments['command'] ?? null;
unset($all[$key]);
Expand Down

0 comments on commit f7d04bd

Please sign in to comment.