-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DowngradePHP74] Fix parent removal regression #1081
Conversation
@TomasVotruba this is same with failing PR #1080 . The use case is different, as in the |
I think this happens in cascade by the next rule taking over alraedy broken code. |
The |
9434076
to
505c40c
Compare
566c09e
to
c06e257
Compare
return new ParentStaticType($classReflection); | ||
$parentClassReflection = $classReflection->getParentClass(); | ||
if (! $parentClassReflection instanceof ClassReflection) { | ||
throw new ShouldNotHappenException(); | ||
} | ||
|
||
return new ParentStaticType($parentClassReflection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samsonasik Here was the bug probably. The parent
did not refere to parent class, but self class.
-return new ParentStaticType($classReflection);
+return new ParentStaticType($parentClassReflection);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomasVotruba thank you 👍
b2d7089
to
2215b0e
Compare
@TomasVotruba I tried locally, it seems still not working, with different error: ➜ rector-src git:(tv-keep-parent-reference) ✗ cd rector-prefixed-downgraded
➜ rector-prefixed-downgraded git:(tv-keep-parent-reference) ✗ cp ../build/target-repository/bootstrap.php .
➜ rector-prefixed-downgraded git:(tv-keep-parent-reference) ✗ cp ../preload.php .
➜ rector-prefixed-downgraded git:(tv-keep-parent-reference) ✗ bin/rector list --ansi
Rector 2215b0e85570ca53d450bf83c20cf3629e3d7680
Usage:
command [options] [arguments]
PHP Fatal error: Declaration of RectorPrefix20211027\Symfony\Component\String\UnicodeString::join($strings, $lastGlue = null) must be compatible with RectorPrefix20211027\Symfony\Component\String\AbstractUnicodeString::join($strings, $lastGlue = null): RectorPrefix20211027\Symfony\Component\String\AbstractString in /Users/samsonasik/www/rector-src/rector-prefixed-downgraded/vendor/symfony/string/UnicodeString.php on line 169
Fatal error: Declaration of RectorPrefix20211027\Symfony\Component\String\UnicodeString::join($strings, $lastGlue = null) must be compatible with RectorPrefix20211027\Symfony\Component\String\AbstractUnicodeString::join($strings, $lastGlue = null): RectorPrefix20211027\Symfony\Component\String\AbstractString in /Users/samsonasik/www/rector-src/rector-prefixed-downgraded/vendor/symfony/string/UnicodeString.php on line 169 |
it still error in CI build as well https://github.com/rectorphp/rector-src/runs/4021163113?check_suite_focus=true#step:18:11 |
@TomasVotruba the |
Fixed regression in
parent
type resolution in #1071Closes rectorphp/rector#6772 bug