phpstan / phpstan-phpunit

PHPUnit extensions and rules for PHPStan
MIT License
468 stars 47 forks source link

AssertTypeSpecifyingExtensionHelper: rootExpr with unknown variable to avoid always-true false positives #197

Closed janedbal closed 1 year ago

janedbal commented 1 year ago

This should fix https://github.com/phpstan/phpstan-phpunit/issues/193.

janedbal commented 1 year ago

Optionally, we might do this hack only for those resolvers where false-positive is at risk (like the assertContains with Traversable).

Edit: done, it breaks stuff without that.

ondrejmirtes commented 1 year ago

Thank you!