Skip to content

Commit 3ccdce2

Browse files
committed
raise
1 parent 56c7697 commit 3ccdce2

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
"license": "MIT",
55
"description": "Rector upgrades rules for Symfony Framework",
66
"require": {
7-
"php": ">=8.2",
7+
"php": ">=8.3",
88
"ext-xml": "*"
99
},
1010
"require-dev": {
11-
"phpecs/phpecs": "^2.2",
11+
"symplify/easy-coding-standard": "^13.0.4",
1212
"phpstan/extension-installer": "^1.4",
1313
"phpstan/phpstan": "^2.1.32",
1414
"phpstan/phpstan-deprecation-rules": "^2.0",
1515
"phpstan/phpstan-webmozart-assert": "^2.0",
1616
"phpunit/phpunit": "^11.5",
17-
"rector/jack": "^0.4",
17+
"rector/jack": "^0.5",
1818
"rector/rector-src": "dev-main",
1919
"rector/swiss-knife": "^2.3",
2020
"rector/type-perfect": "^2.1",
@@ -31,7 +31,7 @@
3131
"symplify/vendor-patches": "^11.5",
3232
"tomasvotruba/class-leak": "^2.1",
3333
"tomasvotruba/type-coverage": "^2.1",
34-
"tomasvotruba/unused-public": "^2.1",
34+
"tomasvotruba/unused-public": "^2.2",
3535
"tracy/tracy": "^2.11"
3636
},
3737
"autoload": {

rules/Symfony30/Rector/ClassMethod/FormTypeGetParentRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use PhpParser\Node\Stmt\Return_;
1313
use PHPStan\Type\ObjectType;
1414
use Rector\Rector\AbstractRector;
15+
use Rector\Symfony\Enum\SymfonyClass;
1516
use Rector\Symfony\FormHelper\FormTypeStringToTypeProvider;
1617
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
1718
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@@ -139,7 +140,7 @@ private function isClassAndMethodMatch(Class_ $class, ClassMethod $classMethod):
139140
}
140141

141142
if ($this->isName($classMethod->name, 'getExtendedType')) {
142-
return $this->isObjectType($class, new ObjectType('Symfony\Component\Form\AbstractTypeExtension'));
143+
return $this->isObjectType($class, new ObjectType(SymfonyClass::ABSTRACT_TYPE_EXTENSION));
143144
}
144145

145146
return false;

src/Enum/SymfonyClass.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,6 @@ final class SymfonyClass
228228
public const KERNEL = 'Symfony\Component\HttpKernel\Kernel';
229229

230230
public const CONTAINER = 'Symfony\Component\DependencyInjection\Container';
231+
232+
public const ABSTRACT_TYPE_EXTENSION = 'Symfony\Component\Form\AbstractTypeExtension';
231233
}

0 commit comments

Comments
 (0)