Updated Rector to commit f6c99820dc0852cc2c9f92f94aaae188b4b6aeae

f6c99820dc Bump to PHPStan ^2.1.8 and change deprecated ClassReflection::isSubClassOf() to ClassReflection::is() (#6775)
This commit is contained in:
Tomas Votruba 2025-03-09 20:55:29 +00:00
parent 169b108144
commit 24d48c8abb
19 changed files with 36 additions and 36 deletions

View File

@ -1748,12 +1748,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "6dba10960d71bdd442b5ebe54dbbf2c4a72b263d"
"reference": "b55c3bc2acedcf25ebc9b38ddb6ebdad451f42e7"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/6dba10960d71bdd442b5ebe54dbbf2c4a72b263d",
"reference": "6dba10960d71bdd442b5ebe54dbbf2c4a72b263d",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/b55c3bc2acedcf25ebc9b38ddb6ebdad451f42e7",
"reference": "b55c3bc2acedcf25ebc9b38ddb6ebdad451f42e7",
"shasum": ""
},
"require": {
@ -1761,7 +1761,7 @@
},
"require-dev": {
"phpstan\/extension-installer": "^1.3",
"phpstan\/phpstan": "^2.0",
"phpstan\/phpstan": "^2.1.8",
"phpstan\/phpstan-webmozart-assert": "^2.0",
"phpunit\/phpunit": "^11.4",
"rector\/rector-src": "dev-main",
@ -1771,7 +1771,7 @@
"tomasvotruba\/class-leak": "^1.0",
"tracy\/tracy": "^2.10"
},
"time": "2025-01-27T16:10:20+00:00",
"time": "2025-03-09T20:52:35+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -1804,12 +1804,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "19250313eb0dd965c34e96c9da0d16785f344c51"
"reference": "757cd1f46f71f33c665a85a26e2aed320cd88795"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/19250313eb0dd965c34e96c9da0d16785f344c51",
"reference": "19250313eb0dd965c34e96c9da0d16785f344c51",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/757cd1f46f71f33c665a85a26e2aed320cd88795",
"reference": "757cd1f46f71f33c665a85a26e2aed320cd88795",
"shasum": ""
},
"require": {
@ -1821,7 +1821,7 @@
"require-dev": {
"phpecs\/phpecs": "^2.0",
"phpstan\/extension-installer": "^1.4",
"phpstan\/phpstan": "^2.1",
"phpstan\/phpstan": "^2.1.8",
"phpstan\/phpstan-webmozart-assert": "^2.0",
"phpunit\/phpunit": "^11.5",
"rector\/rector-src": "dev-main",
@ -1830,7 +1830,7 @@
"tomasvotruba\/class-leak": "^1.2",
"tracy\/tracy": "^2.10"
},
"time": "2025-03-04T16:18:47+00:00",
"time": "2025-03-09T20:51:17+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -1866,12 +1866,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "dcb8a8896bf6c5cd220c84dd9dac66293fc985e3"
"reference": "578d314f0cfdf7289f4e73b82cdf7809da73c250"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/dcb8a8896bf6c5cd220c84dd9dac66293fc985e3",
"reference": "dcb8a8896bf6c5cd220c84dd9dac66293fc985e3",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/578d314f0cfdf7289f4e73b82cdf7809da73c250",
"reference": "578d314f0cfdf7289f4e73b82cdf7809da73c250",
"shasum": ""
},
"require": {
@ -1880,7 +1880,7 @@
},
"require-dev": {
"phpstan\/extension-installer": "^1.4",
"phpstan\/phpstan": "^2.0",
"phpstan\/phpstan": "^2.1.8",
"phpstan\/phpstan-webmozart-assert": "^2.0",
"phpunit\/phpunit": "^11.4",
"rector\/rector-src": "dev-main",
@ -1896,7 +1896,7 @@
"tomasvotruba\/class-leak": "^1.0",
"tracy\/tracy": "^2.10"
},
"time": "2025-03-06T14:38:21+00:00",
"time": "2025-03-09T20:50:15+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/
final class GeneratedConfig
{
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 70e2881'), '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 6dba109'), '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 1925031'), '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 dcb8a88'));
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 70e2881'), '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 b55c3bc'), '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 757cd1f'), '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 578d314'));
private function __construct()
{
}

View File

@ -8,7 +8,7 @@
},
"require-dev": {
"phpstan\/extension-installer": "^1.3",
"phpstan\/phpstan": "^2.0",
"phpstan\/phpstan": "^2.1.8",
"phpstan\/phpstan-webmozart-assert": "^2.0",
"phpunit\/phpunit": "^11.4",
"rector\/rector-src": "dev-main",

View File

@ -206,7 +206,7 @@ CODE_SAMPLE
if (!$this->isNames($classMethod, $unsafeMethods)) {
continue;
}
if ($classReflection->isSubclassOf($unsafeType)) {
if ($classReflection->is($unsafeType)) {
return \false;
}
// skip self too

View File

@ -184,7 +184,7 @@ final class PhpDocFromTypeDeclarationDecorator
if ($classMethodWillChangeReturnType->getMethodName() !== $methodName) {
continue;
}
if (!$classReflection->isSubclassOf($classMethodWillChangeReturnType->getClassName())) {
if (!$classReflection->is($classMethodWillChangeReturnType->getClassName())) {
continue;
}
if ($this->phpAttributeAnalyzer->hasPhpAttribute($classMethod, 'ReturnTypeWillChange')) {

View File

@ -9,7 +9,7 @@
"require-dev": {
"rector\/rector-src": "dev-main",
"phpunit\/phpunit": "^11.5",
"phpstan\/phpstan": "^2.1",
"phpstan\/phpstan": "^2.1.8",
"phpecs\/phpecs": "^2.0",
"phpstan\/extension-installer": "^1.4",
"symplify\/vendor-patches": "^11.3",

View File

@ -50,7 +50,7 @@ final class TestsNodeAnalyzer
return \false;
}
foreach (self::TEST_CASE_OBJECT_CLASSES as $testCaseObjectClass) {
if ($classReflection->isSubclassOf($testCaseObjectClass)) {
if ($classReflection->is($testCaseObjectClass)) {
return \true;
}
}

View File

@ -9,7 +9,7 @@
},
"require-dev": {
"phpstan\/extension-installer": "^1.4",
"phpstan\/phpstan": "^2.0",
"phpstan\/phpstan": "^2.1.8",
"phpstan\/phpstan-webmozart-assert": "^2.0",
"phpunit\/phpunit": "^11.4",
"rector\/rector-src": "dev-main",

View File

@ -125,6 +125,6 @@ CODE_SAMPLE
if (!$classReflection instanceof ClassReflection) {
return \true;
}
return !$classReflection->isSubclassOf(SymfonyClass::CONTAINER_AWARE_COMMAND);
return !$classReflection->is(SymfonyClass::CONTAINER_AWARE_COMMAND);
}
}

View File

@ -118,6 +118,6 @@ CODE_SAMPLE
if (!$classReflection instanceof ClassReflection) {
return \true;
}
return !$classReflection->isSubclassOf(SymfonyClass::CONTROLLER);
return !$classReflection->is(SymfonyClass::CONTROLLER);
}
}

View File

@ -121,9 +121,9 @@ CODE_SAMPLE
if (!$classReflection instanceof ClassReflection) {
return \true;
}
if ($classReflection->isSubclassOf(SymfonyClass::CONTAINER_AWARE_COMMAND)) {
if ($classReflection->is(SymfonyClass::CONTAINER_AWARE_COMMAND)) {
return \false;
}
return !$classReflection->isSubclassOf(SymfonyClass::CONTROLLER);
return !$classReflection->is(SymfonyClass::CONTROLLER);
}
}

View File

@ -68,7 +68,7 @@ CODE_SAMPLE
if (!$classReflection instanceof ClassReflection) {
return null;
}
if (!$classReflection->isSubClassOf('Symfony\\Component\\Console\\Command\\Command')) {
if (!$classReflection->is('Symfony\\Component\\Console\\Command\\Command')) {
return null;
}
$resolveNameAndDescription = $this->resolveNameAndDescription($node);

View File

@ -76,7 +76,7 @@ CODE_SAMPLE
return null;
}
$classReflection = $scope->getClassReflection();
if (!$classReflection->isSubclassOf('Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface')) {
if (!$classReflection->is('Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface')) {
return null;
}
if (!$classReflection->getParentClass() instanceof ClassReflection) {

View File

@ -75,7 +75,7 @@ CODE_SAMPLE
if (!$classReflection instanceof ClassReflection) {
return null;
}
if (!$classReflection->isSubclassOf('Symfony\\Component\\Console\\Command\\Command')) {
if (!$classReflection->is('Symfony\\Component\\Console\\Command\\Command')) {
return null;
}
if (!$this->nodeNameResolver->isName($node, 'execute')) {

View File

@ -64,7 +64,7 @@ CODE_SAMPLE
if (!$classReflection instanceof ClassReflection) {
return null;
}
if (!$classReflection->isSubclassOf('Symfony\\Component\\Validator\\Constraint')) {
if (!$classReflection->is('Symfony\\Component\\Validator\\Constraint')) {
return null;
}
if (!$this->nodeNameResolver->isName($node->name, 'errorNames')) {

View File

@ -132,7 +132,7 @@ CODE_SAMPLE
if (!$classReflection instanceof ClassReflection) {
return \true;
}
if (!$classReflection->isSubclassOf('Twig_Extension')) {
if (!$classReflection->is('Twig_Extension')) {
return \true;
}
return !$this->nodeNameResolver->isNames($classMethod, ['getFunctions', 'getFilters']);

View File

@ -22,7 +22,7 @@ final class SymfonyTestCaseAnalyzer
if (!$classReflection instanceof ClassReflection) {
return \false;
}
return $classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase');
return $classReflection->is('Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase');
}
/**
* @api
@ -33,6 +33,6 @@ final class SymfonyTestCaseAnalyzer
if (!$classReflection instanceof ClassReflection) {
return \false;
}
return $classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase');
return $classReflection->is('Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase');
}
}

View File

@ -62,10 +62,10 @@ final class ControllerAnalyzer
}
private function isControllerClassReflection(ClassReflection $classReflection) : bool
{
if ($classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller')) {
if ($classReflection->is('Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller')) {
return \true;
}
return $classReflection->isSubclassOf('Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController');
return $classReflection->is('Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController');
}
private function isControllerClass(Class_ $class) : bool
{