Skip to content

Conversation

@VincentLanglet
Copy link
Contributor

No description provided.

Copy link
Member

Choose a reason for hiding this comment

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

  1. Please just do assertType('Bug5336\Pager<Bug5336\ProxyQueryInterface&Bug5336\Stub>', new Pager($query));. Assigning new to properties has some extra behaviour that might hide bugs here.
  2. Please create another test for TypesAssignedToPropertiesRuleTest that actually shows that assignment to property no longer reports an error. If you're gonna use classes with the same names, change the namespace name slightly, like Bug5336Rule or something.

@ondrejmirtes ondrejmirtes merged commit 0577b11 into phpstan:1.5.x Mar 22, 2022
@ondrejmirtes
Copy link
Member

Awesome, thank you!

Can you please also send regression tests for phpstan/phpstan#3951 and phpstan/phpstan#6845? It'd mean a lot to me, thanks. Please also add "Closes #XY" in the body of the PR.

@VincentLanglet
Copy link
Contributor Author

Sure, I opened #1106

@VincentLanglet VincentLanglet deleted the bug5336 branch March 22, 2022 18:51
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.

2 participants