mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-03 09:50:49 +00: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": {
|
"require": {
|
||||||
"php": "^7.2|^8.0",
|
"php": "^7.2|^8.0",
|
||||||
"phpstan/phpstan": "^1.10.20"
|
"phpstan/phpstan": "^1.10.26"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -146,7 +146,6 @@ final class PHPStanNodeScopeResolver
|
||||||
*/
|
*/
|
||||||
public function processNodes(array $stmts, string $filePath, ?MutatingScope $formerMutatingScope = null) : array
|
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
|
* 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
|
* @see vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:282
|
||||||
|
@ -155,7 +154,7 @@ final class PHPStanNodeScopeResolver
|
||||||
$this->nodeTraverser->traverse($stmts);
|
$this->nodeTraverser->traverse($stmts);
|
||||||
$scope = $formerMutatingScope ?? $this->scopeFactory->createFromFile($filePath);
|
$scope = $formerMutatingScope ?? $this->scopeFactory->createFromFile($filePath);
|
||||||
// skip chain method calls, performance issue: https://github.com/phpstan/phpstan/issues/254
|
// 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) {
|
if ($node instanceof FileWithoutNamespace) {
|
||||||
$this->nodeScopeResolver->processNodes($node->stmts, $mutatingScope, $nodeCallback);
|
$this->nodeScopeResolver->processNodes($node->stmts, $mutatingScope, $nodeCallback);
|
||||||
return;
|
return;
|
||||||
|
@ -241,7 +240,7 @@ final class PHPStanNodeScopeResolver
|
||||||
// so we need to get it from the first after this one
|
// so we need to get it from the first after this one
|
||||||
if ($node instanceof Class_ || $node instanceof Interface_ || $node instanceof Enum_) {
|
if ($node instanceof Class_ || $node instanceof Interface_ || $node instanceof Enum_) {
|
||||||
/** @var MutatingScope $mutatingScope */
|
/** @var MutatingScope $mutatingScope */
|
||||||
$mutatingScope = $this->resolveClassOrInterfaceScope($node, $mutatingScope, $isScopeRefreshing);
|
$mutatingScope = $this->resolveClassOrInterfaceScope($node, $mutatingScope);
|
||||||
}
|
}
|
||||||
// special case for unreachable nodes
|
// special case for unreachable nodes
|
||||||
if ($node instanceof UnreachableStatementNode) {
|
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
|
* @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);
|
$className = $this->resolveClassName($classLike);
|
||||||
$isAnonymous = $this->classAnalyzer->isAnonymousClass($classLike);
|
$isAnonymous = $this->classAnalyzer->isAnonymousClass($classLike);
|
||||||
|
@ -398,9 +397,11 @@ final class PHPStanNodeScopeResolver
|
||||||
} else {
|
} else {
|
||||||
$classReflection = $this->reflectionProvider->getClass($className);
|
$classReflection = $this->reflectionProvider->getClass($className);
|
||||||
}
|
}
|
||||||
// on refresh, remove entered class avoid entering the class again
|
$context = $this->privatesAccessor->getPrivateProperty($mutatingScope, 'context');
|
||||||
if ($isScopeRefreshing && $mutatingScope->isInClass() && !$isAnonymous) {
|
try {
|
||||||
$context = $this->privatesAccessor->getPrivateProperty($mutatingScope, 'context');
|
$this->privatesAccessor->setPrivateProperty($context, 'classReflection', $classReflection);
|
||||||
|
return $mutatingScope->enterClass($classReflection);
|
||||||
|
} catch (\PHPStan\ShouldNotHappenException $exception) {
|
||||||
$this->privatesAccessor->setPrivateProperty($context, 'classReflection', null);
|
$this->privatesAccessor->setPrivateProperty($context, 'classReflection', null);
|
||||||
}
|
}
|
||||||
return $mutatingScope->enterClass($classReflection);
|
return $mutatingScope->enterClass($classReflection);
|
||||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = '3b6671cb18097b9d2a2c3859ca6e59a75f641292';
|
public const PACKAGE_VERSION = 'a2c12ab0db6bb7d6207ea5a5c63ef5e6426cf0f0';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2023-07-19 13:02:34';
|
public const RELEASE_DATE = '2023-07-20 07:54:14';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @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';
|
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
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInitf2fa8fe8b19681fc54b7d41bb2883e2f
|
class ComposerAutoloaderInit21c4afe8327ea31dba51e0a196af480e
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInitf2fa8fe8b19681fc54b7d41bb2883e2f
|
||||||
return self::$loader;
|
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__));
|
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';
|
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->setClassMapAuthoritative(true);
|
||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::$files;
|
$filesToLoad = \Composer\Autoload\ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::$files;
|
||||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
$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;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f
|
class ComposerStaticInit21c4afe8327ea31dba51e0a196af480e
|
||||||
{
|
{
|
||||||
public static $files = array (
|
public static $files = array (
|
||||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||||
|
@ -3023,9 +3023,9 @@ class ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitf2fa8fe8b19681fc54b7d41bb2883e2f::$classMap;
|
$loader->classMap = ComposerStaticInit21c4afe8327ea31dba51e0a196af480e::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
|
12
vendor/composer/installed.json
vendored
12
vendor/composer/installed.json
vendored
|
@ -976,17 +976,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan\/phpstan",
|
"name": "phpstan\/phpstan",
|
||||||
"version": "1.10.25",
|
"version": "1.10.26",
|
||||||
"version_normalized": "1.10.25.0",
|
"version_normalized": "1.10.26.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
|
"url": "https:\/\/github.com\/phpstan\/phpstan.git",
|
||||||
"reference": "578f4e70d117f9a90699324c555922800ac38d8c"
|
"reference": "5d660cbb7e1b89253a47147ae44044f49832351f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/578f4e70d117f9a90699324c555922800ac38d8c",
|
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan\/zipball\/5d660cbb7e1b89253a47147ae44044f49832351f",
|
||||||
"reference": "578f4e70d117f9a90699324c555922800ac38d8c",
|
"reference": "5d660cbb7e1b89253a47147ae44044f49832351f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -995,7 +995,7 @@
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"phpstan\/phpstan-shim": "*"
|
"phpstan\/phpstan-shim": "*"
|
||||||
},
|
},
|
||||||
"time": "2023-07-06T12:11:37+00:00",
|
"time": "2023-07-19T12:44:37+00:00",
|
||||||
"bin": [
|
"bin": [
|
||||||
"phpstan",
|
"phpstan",
|
||||||
"phpstan.phar"
|
"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-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmSmr1wACgkQUcZzBf/C
|
iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmS32poACgkQUcZzBf/C
|
||||||
5cD9aw//aNlxvXLBuH+1iir6cwjJU2Ij6BDV5RjRpQHFh0efqELI5h7q+V03cPWV
|
5cCvmg/+JJmyX663fa+FHy7ED2SexVuChivpbp82dyLx1gRAl15rtNG4zjxNRfnW
|
||||||
BhpzfBKvV+au808AOAX9zn7chufyehJ73Fz9qDtqAhZGgB7pklllmY2kRnwb0VsF
|
6GpsysMhKqrN7p6xur18ZkLqdFKAjeNnpTunnh/ADetcrs8wzLNyAy7luQtyXAuj
|
||||||
r0CqmZ9Or88DC4EirOapCf4VsqQBlGUmz5GiXZZcdi7RpzLlsz0flw9WHTVe/CGl
|
SOv5f/Yitg9yvZ2GHrbzchQuSjkbUR2KroBYsRhwVTH7pMIgdvysRBYiENfbz350
|
||||||
3WaSxuy6HjwEpLdz+1mrfSaj+dHMZ/1Azg+UKRSIyN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E-----
|
-----END PGP SIGNATURE-----
|
||||||
|
|
Loading…
Reference in New Issue
Block a user