Skip to content

Commit 8b62880

Browse files
authored
Fix issue with downgraded PHP (#93)
1 parent 00bbfb3 commit 8b62880

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/downgraded_release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
- uses: "ramsey/composer-install@v2"
2727

2828
# downgrade /src to PHP 7.2
29-
- run: vendor/bin/rector process src --config build/rector-downgrade-php-72.php --ansi
30-
- run: vendor/bin/ecs check src --fix --ansi
29+
- run: vendor/bin/rector process src config --config build/rector-downgrade-php-72.php --ansi
30+
- run: vendor/bin/ecs check src config --fix --ansi
3131

3232
# copy PHP 7.2 composer
3333
- run: cp build/composer-php-72.json composer.json

src/Rector/StaticCall/RequestStaticValidateToInjectRector.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ private function shouldSkip(StaticCall|FuncCall $node): bool
125125
$classMethod = $this->betterNodeFinder->findParentType($node, ClassMethod::class);
126126
if ($classMethod instanceof ClassMethod) {
127127
$classMethodReflection = $this->reflectionResolver->resolveMethodReflectionFromClassMethod($classMethod);
128-
if ($classMethodReflection?->getPrototype()?->getDeclaringClass()?->getName() !== $class->namespacedName?->toString()
129-
) {
128+
$classMethodNamespaceName = $classMethodReflection?->getPrototype()?->getDeclaringClass()?->getName();
129+
$classNamespaceName = $class->namespacedName?->toString();
130+
if ($classMethodNamespaceName !== $classNamespaceName) {
130131
return true;
131132
}
132133
}

0 commit comments

Comments
 (0)