Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Jun 1, 2022

@staabm staabm mentioned this pull request Sep 23, 2022
@staabm staabm changed the base branch from 1.7.x to 1.8.x September 23, 2022 12:37
@clxmstaab clxmstaab force-pushed the bug5552 branch 3 times, most recently from 63c70d3 to 823c7d0 Compare September 26, 2022 15:28
Comment on lines 337 to 338
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works arround the type error:

grafik

which is a separate bug, see #1396

Copy link
Contributor Author

@staabm staabm Sep 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fb01d17 I factored out the existing logic into 2 new private methods.

that way we don't run into the #1396 bug and don't need the is_string based workaround

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi @rvanvelzen, the refactoring might conflict with your existing #1761 PR.

@staabm staabm marked this pull request as ready for review September 26, 2022 15:47
@clxmstaab clxmstaab force-pushed the bug5552 branch 2 times, most recently from 3e7a923 to e91e1f1 Compare September 27, 2022 09:24
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this if block is the only new logic of this PR.

everything else is pre-existing logic which was just factored out into new private methods

@staabm staabm force-pushed the bug5552 branch 2 times, most recently from fb01d17 to eae128c Compare October 1, 2022 16:14
@staabm
Copy link
Contributor Author

staabm commented Oct 4, 2022

@ondrejmirtes if we could land this one it would unblock some of the already opened PRs for more TypeSpecifier goodness.

@ondrejmirtes ondrejmirtes changed the title specify types on get_parent_class() Specify types on get_parent_class() Oct 5, 2022
@ondrejmirtes ondrejmirtes merged commit 0b8b337 into phpstan:1.8.x Oct 5, 2022
@ondrejmirtes
Copy link
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.

Support get_parent_class() in type specifier

3 participants