mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-13 20:11:54 +02:00
Updated Rector to commit a2c12ab0db6bb7d6207ea5a5c63ef5e6426cf0f0
a2c12ab0db
Bump to PHPStan 1.10.26 (#4546)
This commit is contained in:
parent
14039a45c6
commit
12f401a463
@ -8,7 +8,7 @@
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.2|^8.0",
|
||||
"phpstan/phpstan": "^1.10.20"
|
||||
"phpstan/phpstan": "^1.10.26"
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
|
@ -146,7 +146,6 @@ final class PHPStanNodeScopeResolver
|
||||
*/
|
||||
public function processNodes(array $stmts, string $filePath, ?MutatingScope $formerMutatingScope = null) : array
|
||||
{
|
||||
$isScopeRefreshing = $formerMutatingScope instanceof MutatingScope;
|
||||
/**
|
||||
* The stmts must be array of Stmt, or it will be silently skipped by PHPStan
|
||||
* @see vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:282
|
||||
@ -155,7 +154,7 @@ final class PHPStanNodeScopeResolver
|
||||
$this->nodeTraverser->traverse($stmts);
|
||||
$scope = $formerMutatingScope ?? $this->scopeFactory->createFromFile($filePath);
|
||||
// skip chain method calls, performance issue: https://github.com/phpstan/phpstan/issues/254
|
||||
$nodeCallback = function (Node $node, MutatingScope $mutatingScope) use(&$nodeCallback, $isScopeRefreshing, $filePath) : void {
|
||||
$nodeCallback = function (Node $node, MutatingScope $mutatingScope) use(&$nodeCallback, $filePath) : void {
|
||||
if ($node instanceof FileWithoutNamespace) {
|
||||
$this->nodeScopeResolver->processNodes($node->stmts, $mutatingScope, $nodeCallback);
|
||||
return;
|
||||
@ -241,7 +240,7 @@ final class PHPStanNodeScopeResolver
|
||||
// so we need to get it from the first after this one
|
||||
if ($node instanceof Class_ || $node instanceof Interface_ || $node instanceof Enum_) {
|
||||
/** @var MutatingScope $mutatingScope */
|
||||
$mutatingScope = $this->resolveClassOrInterfaceScope($node, $mutatingScope, $isScopeRefreshing);
|
||||
$mutatingScope = $this->resolveClassOrInterfaceScope($node, $mutatingScope);
|
||||
}
|
||||
// special case for unreachable nodes
|
||||
if ($node instanceof UnreachableStatementNode) {
|
||||
@ -386,7 +385,7 @@ final class PHPStanNodeScopeResolver
|
||||
/**
|
||||
* @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_|\PhpParser\Node\Stmt\Enum_ $classLike
|
||||
*/
|
||||
private function resolveClassOrInterfaceScope($classLike, MutatingScope $mutatingScope, bool $isScopeRefreshing) : MutatingScope
|
||||
private function resolveClassOrInterfaceScope($classLike, MutatingScope $mutatingScope) : MutatingScope
|
||||
{
|
||||
$className = $this->resolveClassName($classLike);
|
||||
$isAnonymous = $this->classAnalyzer->isAnonymousClass($classLike);
|
||||
@ -398,9 +397,11 @@ final class PHPStanNodeScopeResolver
|
||||
} else {
|
||||
$classReflection = $this->reflectionProvider->getClass($className);
|
||||
}
|
||||
// on refresh, remove entered class avoid entering the class again
|
||||
if ($isScopeRefreshing && $mutatingScope->isInClass() && !$isAnonymous) {
|
||||
$context = $this->privatesAccessor->getPrivateProperty($mutatingScope, 'context');
|
||||
$context = $this->privatesAccessor->getPrivateProperty($mutatingScope, 'context');
|
||||
try {
|
||||
$this->privatesAccessor->setPrivateProperty($context, 'classReflection', $classReflection);
|
||||
return $mutatingScope->enterClass($classReflection);
|
||||
} catch (\PHPStan\ShouldNotHappenException $exception) {
|
||||
$this->privatesAccessor->setPrivateProperty($context, 'classReflection', null);
|
||||
}
|
||||
return $mutatingScope->enterClass($classReflection);
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '3b6671cb18097b9d2a2c3859ca6e59a75f641292';
|
||||
public const PACKAGE_VERSION = 'a2c12ab0db6bb7d6207ea5a5c63ef5e6426cf0f0';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-07-19 13:02:34';
|
||||
public const RELEASE_DATE = '2023-07-20 07:54:14';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitf2fa8fe8b19681fc54b7d41bb2883e2f::getLoader();
|
||||
return ComposerAutoloaderInit21c4afe8327ea31dba51e0a196af480e::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitf2fa8fe8b19681fc54b7d41bb2883e2f
|
||||
class ComposerAutoloaderInit21c4afe8327ea31dba51e0a196af480e
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInitf2fa8fe8b19681fc54b7d41bb2883e2f
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitf2fa8fe8b19681fc54b7d41bb2883e2f', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit21c4afe8327ea31dba51e0a196af480e', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitf2fa8fe8b19681fc54b7d41bb2883e2f', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit21c4afe8327ea31dba51e0a196af480e', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f
|
||||
class ComposerStaticInit21c4afe8327ea31dba51e0a196af480e
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3023,9 +3023,9 @@ class ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
12
vendor/composer/installed.json
vendored
12
vendor/composer/installed.json
vendored
@ -976,17 +976,17 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan\/phpstan",
|
||||
"version": "1.10.25",
|
||||
"version_normalized": "1.10.25.0",
|
||||
"version": "1.10.26",
|
||||
"version_normalized": "1.10.26.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
|
||||
"reference": "578f4e70d117f9a90699324c555922800ac38d8c"
|
||||
"reference": "5d660cbb7e1b89253a47147ae44044f49832351f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/578f4e70d117f9a90699324c555922800ac38d8c",
|
||||
"reference": "578f4e70d117f9a90699324c555922800ac38d8c",
|
||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/5d660cbb7e1b89253a47147ae44044f49832351f",
|
||||
"reference": "5d660cbb7e1b89253a47147ae44044f49832351f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -995,7 +995,7 @@
|
||||
"conflict": {
|
||||
"phpstan\/phpstan-shim": "*"
|
||||
},
|
||||
"time": "2023-07-06T12:11:37+00:00",
|
||||
"time": "2023-07-19T12:44:37+00:00",
|
||||
"bin": [
|
||||
"phpstan",
|
||||
"phpstan.phar"
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
BIN
vendor/phpstan/phpstan/phpstan.phar
vendored
BIN
vendor/phpstan/phpstan/phpstan.phar
vendored
Binary file not shown.
26
vendor/phpstan/phpstan/phpstan.phar.asc
vendored
26
vendor/phpstan/phpstan/phpstan.phar.asc
vendored
@ -1,16 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5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
|
||||
n91WOCApDnVCygzEhBbhkwA/xklJnUxkRJX3AlbbCwES9K64ELyGd0BqJ1Ohy2a7
|
||||
4cFjwRJq9/tXf99fyncamN8xyBdvYBXSNRNMPYcjKqKIZCOePlR8Q3b7nt154w+e
|
||||
w2qnAevOB4dYzJaSjwJlaVQYR1YIQ7NlYkGboONq/lrtJlEejDdiRmGvgHZ8nSYW
|
||||
Ob2JwqgYDfUPfsnXAwXM+whpUNJi30MDB7MSw3SiDlyw690HheT/DCKOJ9yNUiOB
|
||||
TSGkbIGW/ASett78gowjwniYdryE5ufUPwZbkSaFC3CDysHfs6Jgc+lxe3wnOHtD
|
||||
WyPl1TqDRNuLOZ26TgxI3gGEYqMcVDYQfmuiOakoebHx6j0bpvyEaP51j0/JFpu6
|
||||
okKulXgC1DUluKFWMPhobPQRZ8zC29macnU74JvmJIiUhfiP2Pl16D+XcjFW++zH
|
||||
EDEghcCdgz0pIF6UI5j02rbNAfu7Oo685pnYeXq0DexgXjqoFOE=
|
||||
=NF4z
|
||||
-----END PGP SIGNATURE-----
|
||||
|
Loading…
x
Reference in New Issue
Block a user