Skip to content

Commit 19f968e

Browse files
committed
Updated Rector to commit c4b68d5fd646875fa96f68941e4b2b643a06d1f8
rectorphp/rector-src@c4b68d5 [Php70] Handle class named Pool on Php4ConstructorRector (#6887)
1 parent 7be85c5 commit 19f968e

11 files changed

Lines changed: 205 additions & 83 deletions

File tree

vendor/composer/autoload_classmap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,6 +2329,7 @@
23292329
'Rector\\Symfony\\NodeAnalyzer\\SymfonyClosureExtensionMatcher' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyClosureExtensionMatcher.php',
23302330
'Rector\\Symfony\\NodeAnalyzer\\SymfonyPhpClosureDetector' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyPhpClosureDetector.php',
23312331
'Rector\\Symfony\\NodeAnalyzer\\SymfonyTestCaseAnalyzer' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyTestCaseAnalyzer.php',
2332+
'Rector\\Symfony\\NodeFactory\\Annotations\\AnnotationOrAttributeValueResolver' => $vendorDir . '/rector/rector-symfony/src/NodeFactory/Annotations/AnnotationOrAttributeValueResolver.php',
23322333
'Rector\\Symfony\\NodeFactory\\Annotations\\DoctrineAnnotationFromNewFactory' => $vendorDir . '/rector/rector-symfony/src/NodeFactory/Annotations/DoctrineAnnotationFromNewFactory.php',
23332334
'Rector\\Symfony\\NodeFactory\\Annotations\\DoctrineAnnotationKeyToValuesResolver' => $vendorDir . '/rector/rector-symfony/src/NodeFactory/Annotations/DoctrineAnnotationKeyToValuesResolver.php',
23342335
'Rector\\Symfony\\NodeFactory\\Annotations\\StringValueQuoteWrapper' => $vendorDir . '/rector/rector-symfony/src/NodeFactory/Annotations/StringValueQuoteWrapper.php',

vendor/composer/autoload_static.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2548,6 +2548,7 @@ class ComposerStaticInit85a5c971754a67e64efb2b2dadc9a1fe
25482548
'Rector\\Symfony\\NodeAnalyzer\\SymfonyClosureExtensionMatcher' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyClosureExtensionMatcher.php',
25492549
'Rector\\Symfony\\NodeAnalyzer\\SymfonyPhpClosureDetector' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyPhpClosureDetector.php',
25502550
'Rector\\Symfony\\NodeAnalyzer\\SymfonyTestCaseAnalyzer' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/SymfonyTestCaseAnalyzer.php',
2551+
'Rector\\Symfony\\NodeFactory\\Annotations\\AnnotationOrAttributeValueResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeFactory/Annotations/AnnotationOrAttributeValueResolver.php',
25512552
'Rector\\Symfony\\NodeFactory\\Annotations\\DoctrineAnnotationFromNewFactory' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeFactory/Annotations/DoctrineAnnotationFromNewFactory.php',
25522553
'Rector\\Symfony\\NodeFactory\\Annotations\\DoctrineAnnotationKeyToValuesResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeFactory/Annotations/DoctrineAnnotationKeyToValuesResolver.php',
25532554
'Rector\\Symfony\\NodeFactory\\Annotations\\StringValueQuoteWrapper' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeFactory/Annotations/StringValueQuoteWrapper.php',

vendor/composer/installed.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,12 +1804,12 @@
18041804
"source": {
18051805
"type": "git",
18061806
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
1807-
"reference": "48203503078e4224c91eba3ba038a575c9c25586"
1807+
"reference": "96b3565483d88525d338c57eddae43a930aa6db2"
18081808
},
18091809
"dist": {
18101810
"type": "zip",
1811-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/48203503078e4224c91eba3ba038a575c9c25586",
1812-
"reference": "48203503078e4224c91eba3ba038a575c9c25586",
1811+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/96b3565483d88525d338c57eddae43a930aa6db2",
1812+
"reference": "96b3565483d88525d338c57eddae43a930aa6db2",
18131813
"shasum": ""
18141814
},
18151815
"require": {
@@ -1833,7 +1833,7 @@
18331833
"tomasvotruba\/class-leak": "^1.2",
18341834
"tracy\/tracy": "^2.10"
18351835
},
1836-
"time": "2025-05-05T17:05:33+00:00",
1836+
"time": "2025-05-07T08:27:03+00:00",
18371837
"default-branch": true,
18381838
"type": "rector-extension",
18391839
"extra": {
@@ -1866,12 +1866,12 @@
18661866
"source": {
18671867
"type": "git",
18681868
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
1869-
"reference": "b719ac773f34f01f08f2d571c64d047c3517b75f"
1869+
"reference": "fdcb6e2d5c4ebd8c4b82b6cfbc3aa22d5fc9ad85"
18701870
},
18711871
"dist": {
18721872
"type": "zip",
1873-
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/b719ac773f34f01f08f2d571c64d047c3517b75f",
1874-
"reference": "b719ac773f34f01f08f2d571c64d047c3517b75f",
1873+
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/fdcb6e2d5c4ebd8c4b82b6cfbc3aa22d5fc9ad85",
1874+
"reference": "fdcb6e2d5c4ebd8c4b82b6cfbc3aa22d5fc9ad85",
18751875
"shasum": ""
18761876
},
18771877
"require": {
@@ -1900,7 +1900,7 @@
19001900
"tomasvotruba\/unused-public": "^2.0",
19011901
"tracy\/tracy": "^2.10"
19021902
},
1903-
"time": "2025-05-07T04:07:34+00:00",
1903+
"time": "2025-05-07T10:50:35+00:00",
19041904
"default-branch": true,
19051905
"type": "rector-extension",
19061906
"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/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 826f808'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 2b141c8'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 4820350'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main b719ac7'));
12+
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 826f808'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 2b141c8'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 96b3565'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main fdcb6e2'));
1313
private function __construct()
1414
{
1515
}

vendor/rector/rector-phpunit/rules/CodeQuality/Rector/Class_/ConstructClassMethodToSetUpTestCaseRector.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ public function refactor(Node $node) : ?Node
107107
if (!$this->testsNodeAnalyzer->isInTestClass($node)) {
108108
return null;
109109
}
110-
$constructClassMethod = $node->getMethod(MethodName::CONSTRUCT);
111-
if (!$constructClassMethod instanceof ClassMethod) {
110+
if ($this->shouldSkipClass($node)) {
112111
return null;
113112
}
114-
if ($this->classAnalyzer->isAnonymousClass($node)) {
113+
$constructClassMethod = $node->getMethod(MethodName::CONSTRUCT);
114+
if (!$constructClassMethod instanceof ClassMethod) {
115115
return null;
116116
}
117117
if ($this->shouldSkip($node, $constructClassMethod)) {
@@ -197,4 +197,13 @@ private function isParentCallNamed(Node $node, string $desiredMethodName) : bool
197197
}
198198
return $this->nodeNameResolver->isName($node->name, $desiredMethodName);
199199
}
200+
private function shouldSkipClass(Class_ $class) : bool
201+
{
202+
$className = $this->getName($class);
203+
// probably helper class with access to protected methods like createMock()
204+
if (\substr_compare((string) $className, 'Test', -\strlen('Test')) !== 0 && \substr_compare((string) $className, 'TestCase', -\strlen('TestCase')) !== 0) {
205+
return \true;
206+
}
207+
return $this->classAnalyzer->isAnonymousClass($class);
208+
}
200209
}

vendor/rector/rector-phpunit/rules/CodeQuality/Rector/Class_/TypeWillReturnCallableArrowFunctionRector.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ function (string $arg): string {
101101
);
102102
}
103103
}
104+
105+
final class SomeClass
106+
{
107+
public function someMethod(string $arg): string
108+
{
109+
return $arg . ' !';
110+
}
111+
}
104112
CODE_SAMPLE
105113
)]);
106114
}

0 commit comments

Comments
 (0)