From 7e8a9be5d437bae19ceb9dce6e62c32241f2aa5d Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 8 Apr 2026 02:42:16 +0700 Subject: [PATCH 1/2] Fix typo cause error in return statement Ref https://github.com/rectorphp/rector-symfony/commit/7e762047bb3bbd6d6fdacb1afa8fa274a784a908#diff-9a0550d9d66fe528e4abdae40f66d7ad52032c1efa68f97b05490454e168cb7c --- .../ConvertRenderTemplateShortNotationToBundleSyntaxRector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/Symfony43/Rector/MethodCall/ConvertRenderTemplateShortNotationToBundleSyntaxRector.php b/rules/Symfony43/Rector/MethodCall/ConvertRenderTemplateShortNotationToBundleSyntaxRector.php index 972db6e0..e64b6145 100644 --- a/rules/Symfony43/Rector/MethodCall/ConvertRenderTemplateShortNotationToBundleSyntaxRector.php +++ b/rules/Symfony43/Rector/MethodCall/ConvertRenderTemplateShortNotationToBundleSyntaxRector.php @@ -112,7 +112,7 @@ public function refactor(Node $node): ?Node } if (! isset($matches[0])) { - return null;t + return null; } $newValue = '@' . From 06601eb8574f4f14b2f691c339ebb24443da447d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 7 Apr 2026 19:43:21 +0000 Subject: [PATCH 2/2] [rector] Rector fixes --- .../Closure/ServiceSettersToSettersAutodiscoveryRector.php | 2 +- .../Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php | 1 - .../Rector/ClassMethod/ConsoleExecuteReturnIntRector.php | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/rules/Configs/Rector/Closure/ServiceSettersToSettersAutodiscoveryRector.php b/rules/Configs/Rector/Closure/ServiceSettersToSettersAutodiscoveryRector.php index 92af8194..14aec101 100644 --- a/rules/Configs/Rector/Closure/ServiceSettersToSettersAutodiscoveryRector.php +++ b/rules/Configs/Rector/Closure/ServiceSettersToSettersAutodiscoveryRector.php @@ -218,7 +218,7 @@ private function createAbsolutePathConcat(string $classFilePath): Concat { $relativeDirectoryPath = $this->filesystem->makePathRelative( dirname($classFilePath), - dirname($this->getFile()->getFilePath()) + dirname((string) $this->getFile()->getFilePath()) ); $distConstFetch = new ConstFetch(new Name('__DIR__')); diff --git a/rules/Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php b/rules/Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php index bc7f0f3f..98987db4 100644 --- a/rules/Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php +++ b/rules/Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php @@ -73,7 +73,6 @@ public function refactor(Node $node): ?Node return null; } - /** @var String_ $stringNode */ $stringNode = $firstArg->value; // not a form type string diff --git a/rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php b/rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php index 7878bfa6..e574117e 100644 --- a/rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php +++ b/rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php @@ -163,13 +163,11 @@ private function isReturnIntegerType(?Expr $expr): bool private function isIntegerTernaryIfElse(Ternary $ternary): bool { - /** @var Expr|null $if */ $if = $ternary->if; if (! $if instanceof Expr) { $if = $ternary->cond; } - /** @var Expr $else */ $else = $ternary->else; $ifType = $this->getType($if); $elseType = $this->getType($else);