Skip to content

Commit f7d04bd

Browse files
committed
Updated Rector to commit b84fe9524aa20e200f743f13f6925d93225c6280
rectorphp/rector-src@b84fe95 [Php56] Reduce origNode check on UndefinedVariableResolver (#4033)
1 parent 089eca6 commit f7d04bd

8 files changed

Lines changed: 35 additions & 21 deletions

File tree

vendor/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222

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

25-
return ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e::getLoader();
25+
return ComposerAutoloaderInit1f2f780a746bd4ed47698aadad0bf6cd::getLoader();

vendor/composer/autoload_real.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// autoload_real.php @generated by Composer
44

5-
class ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e
5+
class ComposerAutoloaderInit1f2f780a746bd4ed47698aadad0bf6cd
66
{
77
private static $loader;
88

@@ -22,17 +22,17 @@ public static function getLoader()
2222
return self::$loader;
2323
}
2424

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

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

3232
$loader->setClassMapAuthoritative(true);
3333
$loader->register(true);
3434

35-
$filesToLoad = \Composer\Autoload\ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$files;
35+
$filesToLoad = \Composer\Autoload\ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::$files;
3636
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
3737
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
3838
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

vendor/composer/autoload_static.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Composer\Autoload;
66

7-
class ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e
7+
class ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd
88
{
99
public static $files = array (
1010
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@@ -3069,9 +3069,9 @@ class ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e
30693069
public static function getInitializer(ClassLoader $loader)
30703070
{
30713071
return \Closure::bind(function () use ($loader) {
3072-
$loader->prefixLengthsPsr4 = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$prefixLengthsPsr4;
3073-
$loader->prefixDirsPsr4 = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$prefixDirsPsr4;
3074-
$loader->classMap = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$classMap;
3072+
$loader->prefixLengthsPsr4 = ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::$prefixLengthsPsr4;
3073+
$loader->prefixDirsPsr4 = ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::$prefixDirsPsr4;
3074+
$loader->classMap = ComposerStaticInit1f2f780a746bd4ed47698aadad0bf6cd::$classMap;
30753075

30763076
}, null, ClassLoader::class);
30773077
}

vendor/composer/installed.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,12 +1920,12 @@
19201920
"source": {
19211921
"type": "git",
19221922
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
1923-
"reference": "b9b87e1cc777a055d6e1c883a6fb541384f43da1"
1923+
"reference": "f4b61e5dba41bc71810e2e2069ef6921cf1a1f77"
19241924
},
19251925
"dist": {
19261926
"type": "zip",
1927-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/b9b87e1cc777a055d6e1c883a6fb541384f43da1",
1928-
"reference": "b9b87e1cc777a055d6e1c883a6fb541384f43da1",
1927+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/f4b61e5dba41bc71810e2e2069ef6921cf1a1f77",
1928+
"reference": "f4b61e5dba41bc71810e2e2069ef6921cf1a1f77",
19291929
"shasum": ""
19301930
},
19311931
"require": {
@@ -1949,7 +1949,7 @@
19491949
"tomasvotruba\/type-coverage": "^0.2",
19501950
"tomasvotruba\/unused-public": "^0.1"
19511951
},
1952-
"time": "2023-05-31T00:12:23+00:00",
1952+
"time": "2023-05-31T02:33:58+00:00",
19531953
"default-branch": true,
19541954
"type": "rector-extension",
19551955
"extra": {

vendor/composer/installed.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

vendor/rector/extension-installer/src/GeneratedConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
final class GeneratedConfig
1111
{
12-
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'));
12+
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'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-downgrade-php/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,22 @@ public function refactor(Node $node)
103103
}
104104
return null;
105105
}
106+
private function processInsertFuncCallExpression(StmtsAwareInterface $stmtsAware, Expression $expression, FuncCall $funcCall) : StmtsAwareInterface
107+
{
108+
if ($stmtsAware->stmts === null) {
109+
return $stmtsAware;
110+
}
111+
foreach ($stmtsAware->stmts as $key => $stmt) {
112+
$hasFuncCall = $this->betterNodeFinder->findFirst($stmt, static function (Node $node) use($funcCall) : bool {
113+
return $node === $funcCall;
114+
});
115+
if ($hasFuncCall instanceof Node) {
116+
\array_splice($stmtsAware->stmts, $key, 0, [$expression]);
117+
return $stmtsAware;
118+
}
119+
}
120+
return $stmtsAware;
121+
}
106122
/**
107123
* @return Stmt[]|StmtsAwareInterface|null
108124
* @param \PhpParser\Node\Stmt\Expression|\Rector\Core\Contract\PhpParser\Node\StmtsAwareInterface $stmt
@@ -126,8 +142,7 @@ private function refactorArrayKeyFirst(FuncCall $funcCall, $stmt, bool $isPartOf
126142
$firstArg->value = $array;
127143
}
128144
if ($stmt instanceof StmtsAwareInterface && $isPartOfCond === \false) {
129-
$stmt->stmts = \array_merge([$resetFuncCallExpression], (array) $stmt->stmts);
130-
return $stmt;
145+
return $this->processInsertFuncCallExpression($stmt, $resetFuncCallExpression, $funcCall);
131146
}
132147
$newStmts[] = $resetFuncCallExpression;
133148
$newStmts[] = $stmt;
@@ -157,8 +172,7 @@ private function refactorArrayKeyLast(FuncCall $funcCall, $stmt, bool $isPartOfC
157172
$firstArg->value = $array;
158173
}
159174
if ($stmt instanceof StmtsAwareInterface && $isPartOfCond === \false) {
160-
$stmt->stmts = \array_merge([$endFuncCallExpression], (array) $stmt->stmts);
161-
return $stmt;
175+
return $this->processInsertFuncCallExpression($stmt, $endFuncCallExpression, $funcCall);
162176
}
163177
$newStmts[] = $stmt;
164178
return $newStmts;

vendor/symfony/console/Input/ArgvInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ private function parseArgument(string $token) : void
159159
$this->arguments[$arg->getName()][] = $token;
160160
// unexpected argument
161161
} else {
162-
\reset($all);
163162
$all = $this->definition->getArguments();
164163
$symfonyCommandName = null;
164+
\reset($all);
165165
if (($inputArgument = $all[$key = \key($all)] ?? null) && 'command' === $inputArgument->getName()) {
166166
$symfonyCommandName = $this->arguments['command'] ?? null;
167167
unset($all[$key]);

0 commit comments

Comments
 (0)