spaze / phpstan-disallowed-calls

PHPStan rules to detect disallowed method & function calls, constant, namespace, attribute & superglobal usages
MIT License
255 stars 17 forks source link

Make sure `new` calls are also filtered by definedIn #203

Closed BackEndTea closed 1 year ago

BackEndTea commented 1 year ago

Ran into some issues with the new definedIn (#198), where it would report all new calls, to built in classes, as it had no definedIn, and since it wasn't passed along.

spaze commented 1 year ago

Hey, nice catch and nice fix, thank you! I have moved the added iterator return types into a separate commit and removed an empty line here and added it there and have also removed the if from DisallowedCallsRuleErrors because after rebasing this branch after #204 has been merged it was not covered by a test so I think it serves no purpose (and all tests were passing).

spaze commented 1 year ago

Now released in 2.15.1, thanks again!