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
ResolvedPhpDocBlock: fix parent return tag merging #2803
Conversation
$parentType, | ||
static function (Type $type, callable $traverse) use ($classReflection): Type { | ||
if ($type instanceof StaticType) { | ||
return $type->changeBaseClass($classReflection); |
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.
Great, I'd fix this the same way so 👍
I just hate adding new properties to this class but I didn't figure out a better solution. yet. Merging this.
it seems the change fixes more stuff, see https://github.com/phpstan/phpstan-src/actions/runs/7100699219?pr=2803 |
Regression tests for all fixed issues would be good. Sorry I did not mention it earlier |
@staabm All those look the same. But we can add them to be sure.. |
@staabm Added |
Thank you! |
This should resolve:
@return $this
on interface causes covariant error phpstan#6462/** @return static */
doesn't work properly with extended abstract class phpstan#4396Current failure: https://phpstan.org/r/f8871cfa-7e74-48a3-854f-cb64495aabea