Skip to content

Commit cbfdee3

Browse files
committed
Updated Rector to commit 59585ae75aafa8c5e2666b047a84f13ab35fb59f
rectorphp/rector-src@59585ae [Experiment] [NodeTypeResolver] Remove no longer needed deep Expr visitor ExprScopeFromStmtNodeVisitor (#6223)
1 parent d40c7c4 commit cbfdee3

21 files changed

+271
-115
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"require": {
1010
"php": "^7.2|^8.0",
11-
"phpstan/phpstan": "^1.11.8"
11+
"phpstan/phpstan": "^1.11.9"
1212
},
1313
"autoload": {
1414
"files": [

src/Application/VersionResolver.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'e4708c58a4ddb167511d61dff636d9edcdd0e805';
22+
public const PACKAGE_VERSION = '59585ae75aafa8c5e2666b047a84f13ab35fb59f';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2024-08-06 21:18:42';
27+
public const RELEASE_DATE = '2024-08-07 08:05:18';
2828
/**
2929
* @var int
3030
*/

src/NodeTypeResolver/Node/AttributeKey.php

-4
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ final class AttributeKey
162162
* @var string
163163
*/
164164
public const STATEMENT_DEPTH = 'statementDepth';
165-
/**
166-
* @var string
167-
*/
168-
public const EXPRESSION_DEPTH = 'expressionDepth';
169165
/**
170166
* @var string
171167
*/

src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php

-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
use Rector\NodeTypeResolver\Node\AttributeKey;
5959
use Rector\NodeTypeResolver\PHPStan\Scope\Contract\NodeVisitor\ScopeResolverNodeVisitorInterface;
6060
use Rector\PhpParser\Node\CustomNode\FileWithoutNamespace;
61-
use Rector\PHPStan\NodeVisitor\ExprScopeFromStmtNodeVisitor;
6261
use Rector\PHPStan\NodeVisitor\UnreachableStatementNodeVisitor;
6362
use Rector\PHPStan\NodeVisitor\WrappedNodeRestoringNodeVisitor;
6463
use Rector\Util\Reflection\PrivatesAccessor;
@@ -137,7 +136,6 @@ public function processNodes(array $stmts, string $filePath, ?MutatingScope $for
137136
Assert::allIsInstanceOf($stmts, Stmt::class);
138137
$this->nodeTraverser->traverse($stmts);
139138
$scope = $formerMutatingScope ?? $this->scopeFactory->createFromFile($filePath);
140-
// skip chain method calls, performance issue: https://github.com/phpstan/phpstan/issues/254
141139
$hasUnreachableStatementNode = \false;
142140
$nodeCallback = function (Node $node, MutatingScope $mutatingScope) use(&$nodeCallback, $filePath, &$hasUnreachableStatementNode) : void {
143141
// the class reflection is resolved AFTER entering to class node
@@ -257,7 +255,6 @@ public function processNodes(array $stmts, string $filePath, ?MutatingScope $for
257255
$this->nodeScopeResolverProcessNodes($stmts, $scope, $nodeCallback);
258256
$nodeTraverser = new NodeTraverser();
259257
$nodeTraverser->addVisitor(new WrappedNodeRestoringNodeVisitor());
260-
$nodeTraverser->addVisitor(new ExprScopeFromStmtNodeVisitor($this, $filePath, $scope));
261258
if ($hasUnreachableStatementNode) {
262259
$nodeTraverser->addVisitor(new UnreachableStatementNodeVisitor($this, $filePath, $scope));
263260
}

src/PHPStan/NodeVisitor/ExprScopeFromStmtNodeVisitor.php

-79
This file was deleted.

vendor/autoload.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222

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

25-
return ComposerAutoloaderInite9e62f8370526a5f08ea47a490713455::getLoader();
25+
return ComposerAutoloaderInit4bcaef4da4b0314c67dae59e30837b25::getLoader();

vendor/composer/autoload_classmap.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,15 @@
447447
'RectorPrefix202408\\Fidry\\CpuCoreCounter\\Finder\\WmicPhysicalFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/WmicPhysicalFinder.php',
448448
'RectorPrefix202408\\Fidry\\CpuCoreCounter\\Finder\\_NProcessorFinder' => $vendorDir . '/fidry/cpu-core-counter/src/Finder/_NProcessorFinder.php',
449449
'RectorPrefix202408\\Fidry\\CpuCoreCounter\\NumberOfCpuCoreNotFound' => $vendorDir . '/fidry/cpu-core-counter/src/NumberOfCpuCoreNotFound.php',
450+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Auth' => $vendorDir . '/illuminate/container/Attributes/Auth.php',
451+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Authenticated' => $vendorDir . '/illuminate/container/Attributes/Authenticated.php',
452+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Cache' => $vendorDir . '/illuminate/container/Attributes/Cache.php',
450453
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Config' => $vendorDir . '/illuminate/container/Attributes/Config.php',
454+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\CurrentUser' => $vendorDir . '/illuminate/container/Attributes/CurrentUser.php',
455+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\DB' => $vendorDir . '/illuminate/container/Attributes/DB.php',
456+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Database' => $vendorDir . '/illuminate/container/Attributes/Database.php',
457+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Log' => $vendorDir . '/illuminate/container/Attributes/Log.php',
458+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Storage' => $vendorDir . '/illuminate/container/Attributes/Storage.php',
451459
'RectorPrefix202408\\Illuminate\\Container\\BoundMethod' => $vendorDir . '/illuminate/container/BoundMethod.php',
452460
'RectorPrefix202408\\Illuminate\\Container\\Container' => $vendorDir . '/illuminate/container/Container.php',
453461
'RectorPrefix202408\\Illuminate\\Container\\ContextualBindingBuilder' => $vendorDir . '/illuminate/container/ContextualBindingBuilder.php',
@@ -506,6 +514,7 @@
506514
'RectorPrefix202408\\Illuminate\\Contracts\\Database\\Query\\ConditionExpression' => $vendorDir . '/illuminate/contracts/Database/Query/ConditionExpression.php',
507515
'RectorPrefix202408\\Illuminate\\Contracts\\Database\\Query\\Expression' => $vendorDir . '/illuminate/contracts/Database/Query/Expression.php',
508516
'RectorPrefix202408\\Illuminate\\Contracts\\Debug\\ExceptionHandler' => $vendorDir . '/illuminate/contracts/Debug/ExceptionHandler.php',
517+
'RectorPrefix202408\\Illuminate\\Contracts\\Debug\\ShouldntReport' => $vendorDir . '/illuminate/contracts/Debug/ShouldntReport.php',
509518
'RectorPrefix202408\\Illuminate\\Contracts\\Encryption\\DecryptException' => $vendorDir . '/illuminate/contracts/Encryption/DecryptException.php',
510519
'RectorPrefix202408\\Illuminate\\Contracts\\Encryption\\EncryptException' => $vendorDir . '/illuminate/contracts/Encryption/EncryptException.php',
511520
'RectorPrefix202408\\Illuminate\\Contracts\\Encryption\\Encrypter' => $vendorDir . '/illuminate/contracts/Encryption/Encrypter.php',
@@ -1722,7 +1731,6 @@
17221731
'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\UnionTypeMapper' => $baseDir . '/src/PHPStanStaticTypeMapper/TypeMapper/UnionTypeMapper.php',
17231732
'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\VoidTypeMapper' => $baseDir . '/src/PHPStanStaticTypeMapper/TypeMapper/VoidTypeMapper.php',
17241733
'Rector\\PHPStanStaticTypeMapper\\Utils\\TypeUnwrapper' => $baseDir . '/src/PHPStanStaticTypeMapper/Utils/TypeUnwrapper.php',
1725-
'Rector\\PHPStan\\NodeVisitor\\ExprScopeFromStmtNodeVisitor' => $baseDir . '/src/PHPStan/NodeVisitor/ExprScopeFromStmtNodeVisitor.php',
17261734
'Rector\\PHPStan\\NodeVisitor\\UnreachableStatementNodeVisitor' => $baseDir . '/src/PHPStan/NodeVisitor/UnreachableStatementNodeVisitor.php',
17271735
'Rector\\PHPStan\\NodeVisitor\\WrappedNodeRestoringNodeVisitor' => $baseDir . '/src/PHPStan/NodeVisitor/WrappedNodeRestoringNodeVisitor.php',
17281736
'Rector\\PHPUnit\\AnnotationsToAttributes\\Rector\\ClassMethod\\DataProviderAnnotationToAttributeRector' => $vendorDir . '/rector/rector-phpunit/rules/AnnotationsToAttributes/Rector/ClassMethod/DataProviderAnnotationToAttributeRector.php',

vendor/composer/autoload_real.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// autoload_real.php @generated by Composer
44

5-
class ComposerAutoloaderInite9e62f8370526a5f08ea47a490713455
5+
class ComposerAutoloaderInit4bcaef4da4b0314c67dae59e30837b25
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('ComposerAutoloaderInite9e62f8370526a5f08ea47a490713455', 'loadClassLoader'), true, true);
25+
spl_autoload_register(array('ComposerAutoloaderInit4bcaef4da4b0314c67dae59e30837b25', 'loadClassLoader'), true, true);
2626
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27-
spl_autoload_unregister(array('ComposerAutoloaderInite9e62f8370526a5f08ea47a490713455', 'loadClassLoader'));
27+
spl_autoload_unregister(array('ComposerAutoloaderInit4bcaef4da4b0314c67dae59e30837b25', 'loadClassLoader'));
2828

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

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

35-
$filesToLoad = \Composer\Autoload\ComposerStaticInite9e62f8370526a5f08ea47a490713455::$files;
35+
$filesToLoad = \Composer\Autoload\ComposerStaticInit4bcaef4da4b0314c67dae59e30837b25::$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

+13-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Composer\Autoload;
66

7-
class ComposerStaticInite9e62f8370526a5f08ea47a490713455
7+
class ComposerStaticInit4bcaef4da4b0314c67dae59e30837b25
88
{
99
public static $files = array (
1010
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@@ -666,7 +666,15 @@ class ComposerStaticInite9e62f8370526a5f08ea47a490713455
666666
'RectorPrefix202408\\Fidry\\CpuCoreCounter\\Finder\\WmicPhysicalFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/WmicPhysicalFinder.php',
667667
'RectorPrefix202408\\Fidry\\CpuCoreCounter\\Finder\\_NProcessorFinder' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/Finder/_NProcessorFinder.php',
668668
'RectorPrefix202408\\Fidry\\CpuCoreCounter\\NumberOfCpuCoreNotFound' => __DIR__ . '/..' . '/fidry/cpu-core-counter/src/NumberOfCpuCoreNotFound.php',
669+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Auth' => __DIR__ . '/..' . '/illuminate/container/Attributes/Auth.php',
670+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Authenticated' => __DIR__ . '/..' . '/illuminate/container/Attributes/Authenticated.php',
671+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Cache' => __DIR__ . '/..' . '/illuminate/container/Attributes/Cache.php',
669672
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Config' => __DIR__ . '/..' . '/illuminate/container/Attributes/Config.php',
673+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\CurrentUser' => __DIR__ . '/..' . '/illuminate/container/Attributes/CurrentUser.php',
674+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\DB' => __DIR__ . '/..' . '/illuminate/container/Attributes/DB.php',
675+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Database' => __DIR__ . '/..' . '/illuminate/container/Attributes/Database.php',
676+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Log' => __DIR__ . '/..' . '/illuminate/container/Attributes/Log.php',
677+
'RectorPrefix202408\\Illuminate\\Container\\Attributes\\Storage' => __DIR__ . '/..' . '/illuminate/container/Attributes/Storage.php',
670678
'RectorPrefix202408\\Illuminate\\Container\\BoundMethod' => __DIR__ . '/..' . '/illuminate/container/BoundMethod.php',
671679
'RectorPrefix202408\\Illuminate\\Container\\Container' => __DIR__ . '/..' . '/illuminate/container/Container.php',
672680
'RectorPrefix202408\\Illuminate\\Container\\ContextualBindingBuilder' => __DIR__ . '/..' . '/illuminate/container/ContextualBindingBuilder.php',
@@ -725,6 +733,7 @@ class ComposerStaticInite9e62f8370526a5f08ea47a490713455
725733
'RectorPrefix202408\\Illuminate\\Contracts\\Database\\Query\\ConditionExpression' => __DIR__ . '/..' . '/illuminate/contracts/Database/Query/ConditionExpression.php',
726734
'RectorPrefix202408\\Illuminate\\Contracts\\Database\\Query\\Expression' => __DIR__ . '/..' . '/illuminate/contracts/Database/Query/Expression.php',
727735
'RectorPrefix202408\\Illuminate\\Contracts\\Debug\\ExceptionHandler' => __DIR__ . '/..' . '/illuminate/contracts/Debug/ExceptionHandler.php',
736+
'RectorPrefix202408\\Illuminate\\Contracts\\Debug\\ShouldntReport' => __DIR__ . '/..' . '/illuminate/contracts/Debug/ShouldntReport.php',
728737
'RectorPrefix202408\\Illuminate\\Contracts\\Encryption\\DecryptException' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/DecryptException.php',
729738
'RectorPrefix202408\\Illuminate\\Contracts\\Encryption\\EncryptException' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/EncryptException.php',
730739
'RectorPrefix202408\\Illuminate\\Contracts\\Encryption\\Encrypter' => __DIR__ . '/..' . '/illuminate/contracts/Encryption/Encrypter.php',
@@ -1941,7 +1950,6 @@ class ComposerStaticInite9e62f8370526a5f08ea47a490713455
19411950
'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\UnionTypeMapper' => __DIR__ . '/../..' . '/src/PHPStanStaticTypeMapper/TypeMapper/UnionTypeMapper.php',
19421951
'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\VoidTypeMapper' => __DIR__ . '/../..' . '/src/PHPStanStaticTypeMapper/TypeMapper/VoidTypeMapper.php',
19431952
'Rector\\PHPStanStaticTypeMapper\\Utils\\TypeUnwrapper' => __DIR__ . '/../..' . '/src/PHPStanStaticTypeMapper/Utils/TypeUnwrapper.php',
1944-
'Rector\\PHPStan\\NodeVisitor\\ExprScopeFromStmtNodeVisitor' => __DIR__ . '/../..' . '/src/PHPStan/NodeVisitor/ExprScopeFromStmtNodeVisitor.php',
19451953
'Rector\\PHPStan\\NodeVisitor\\UnreachableStatementNodeVisitor' => __DIR__ . '/../..' . '/src/PHPStan/NodeVisitor/UnreachableStatementNodeVisitor.php',
19461954
'Rector\\PHPStan\\NodeVisitor\\WrappedNodeRestoringNodeVisitor' => __DIR__ . '/../..' . '/src/PHPStan/NodeVisitor/WrappedNodeRestoringNodeVisitor.php',
19471955
'Rector\\PHPUnit\\AnnotationsToAttributes\\Rector\\ClassMethod\\DataProviderAnnotationToAttributeRector' => __DIR__ . '/..' . '/rector/rector-phpunit/rules/AnnotationsToAttributes/Rector/ClassMethod/DataProviderAnnotationToAttributeRector.php',
@@ -2789,9 +2797,9 @@ class ComposerStaticInite9e62f8370526a5f08ea47a490713455
27892797
public static function getInitializer(ClassLoader $loader)
27902798
{
27912799
return \Closure::bind(function () use ($loader) {
2792-
$loader->prefixLengthsPsr4 = ComposerStaticInite9e62f8370526a5f08ea47a490713455::$prefixLengthsPsr4;
2793-
$loader->prefixDirsPsr4 = ComposerStaticInite9e62f8370526a5f08ea47a490713455::$prefixDirsPsr4;
2794-
$loader->classMap = ComposerStaticInite9e62f8370526a5f08ea47a490713455::$classMap;
2800+
$loader->prefixLengthsPsr4 = ComposerStaticInit4bcaef4da4b0314c67dae59e30837b25::$prefixLengthsPsr4;
2801+
$loader->prefixDirsPsr4 = ComposerStaticInit4bcaef4da4b0314c67dae59e30837b25::$prefixDirsPsr4;
2802+
$loader->classMap = ComposerStaticInit4bcaef4da4b0314c67dae59e30837b25::$classMap;
27952803

27962804
}, null, ClassLoader::class);
27972805
}

vendor/composer/installed.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -512,17 +512,17 @@
512512
},
513513
{
514514
"name": "illuminate\/container",
515-
"version": "v11.19.0",
516-
"version_normalized": "11.19.0.0",
515+
"version": "v11.20.0",
516+
"version_normalized": "11.20.0.0",
517517
"source": {
518518
"type": "git",
519519
"url": "https:\/\/github.com\/illuminate\/container.git",
520-
"reference": "122c62229b209678013c0833793d7cf94d14bbbd"
520+
"reference": "f47be671981a4438257c4fbfc3ad257f4e3e929a"
521521
},
522522
"dist": {
523523
"type": "zip",
524-
"url": "https:\/\/api.github.com\/repos\/illuminate\/container\/zipball\/122c62229b209678013c0833793d7cf94d14bbbd",
525-
"reference": "122c62229b209678013c0833793d7cf94d14bbbd",
524+
"url": "https:\/\/api.github.com\/repos\/illuminate\/container\/zipball\/f47be671981a4438257c4fbfc3ad257f4e3e929a",
525+
"reference": "f47be671981a4438257c4fbfc3ad257f4e3e929a",
526526
"shasum": ""
527527
},
528528
"require": {
@@ -533,7 +533,7 @@
533533
"provide": {
534534
"psr\/container-implementation": "1.1|2.0"
535535
},
536-
"time": "2024-07-26T06:12:27+00:00",
536+
"time": "2024-08-05T15:04:01+00:00",
537537
"type": "library",
538538
"extra": {
539539
"branch-alias": {
@@ -569,25 +569,25 @@
569569
},
570570
{
571571
"name": "illuminate\/contracts",
572-
"version": "v11.19.0",
573-
"version_normalized": "11.19.0.0",
572+
"version": "v11.20.0",
573+
"version_normalized": "11.20.0.0",
574574
"source": {
575575
"type": "git",
576576
"url": "https:\/\/github.com\/illuminate\/contracts.git",
577-
"reference": "ebe2b8d69b8fb1c07111e3500d464e77dfab3202"
577+
"reference": "34ead9385e0eab7e947807d77da66faf9bdf95ff"
578578
},
579579
"dist": {
580580
"type": "zip",
581-
"url": "https:\/\/api.github.com\/repos\/illuminate\/contracts\/zipball\/ebe2b8d69b8fb1c07111e3500d464e77dfab3202",
582-
"reference": "ebe2b8d69b8fb1c07111e3500d464e77dfab3202",
581+
"url": "https:\/\/api.github.com\/repos\/illuminate\/contracts\/zipball\/34ead9385e0eab7e947807d77da66faf9bdf95ff",
582+
"reference": "34ead9385e0eab7e947807d77da66faf9bdf95ff",
583583
"shasum": ""
584584
},
585585
"require": {
586586
"php": "^8.2",
587587
"psr\/container": "^1.1.1|^2.0.1",
588588
"psr\/simple-cache": "^1.0|^2.0|^3.0"
589589
},
590-
"time": "2024-07-29T06:48:51+00:00",
590+
"time": "2024-08-01T19:08:33+00:00",
591591
"type": "library",
592592
"extra": {
593593
"branch-alias": {

0 commit comments

Comments
 (0)