Skip to content

ResolvedPhpDocBlock: fix parent return tag merging - #2803

Merged
ondrejmirtes merged 7 commits into
phpstan:1.10.xfrom
janedbal:return-base-fix
Dec 8, 2023
Merged

ResolvedPhpDocBlock: fix parent return tag merging#2803
ondrejmirtes merged 7 commits into
phpstan:1.10.xfrom
janedbal:return-base-fix

Conversation

$parentType,
static function (Type $type, callable $traverse) use ($classReflection): Type {
if ($type instanceof StaticType) {
return $type->changeBaseClass($classReflection);

Copy link
Copy Markdown
Member

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.

@staabm

staabm commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

it seems the change fixes more stuff, see https://github.com/phpstan/phpstan-src/actions/runs/7100699219?pr=2803

@staabm

staabm commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

Regression tests for all fixed issues would be good. Sorry I did not mention it earlier

@janedbal

janedbal commented Dec 5, 2023

Copy link
Copy Markdown
Contributor Author

@staabm All those look the same. But we can add them to be sure..

@janedbal

janedbal commented Dec 5, 2023

Copy link
Copy Markdown
Contributor Author

@staabm Added

Comment thread tests/PHPStan/Rules/Methods/MethodSignatureRuleTest.php Outdated
@janedbal
janedbal requested a review from ondrejmirtes December 6, 2023 08:36
Comment thread tests/PHPStan/Rules/Methods/MethodSignatureRuleTest.php
@janedbal
janedbal requested a review from ondrejmirtes December 8, 2023 08:57
@ondrejmirtes
ondrejmirtes merged commit c445490 into phpstan:1.10.x Dec 8, 2023
@ondrejmirtes

Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants