Closed gndk closed 2 years ago
Hi, thank you for the PR. I've been moving few packages here to make all template-related PHPStan rules in one place :)
Could I ask you to rebase this PR? What can I help you with?
I'm checking the test and it seems they report false positive for success.
It seems there is no activity and will to continue. Closing for lack of feedback. Feel free to re-open with a fix :+1:
Without these two fixes, the test cases cause exceptions.
Unfortunately, the nested test case has a wrong result.
This now causes an
Call to an undefined method $other->method
error, which is wrong, but at least more helpful than aShouldNotHappenException
and can be refactored to pass the rules.I think the correct result should be:
I worked on it for hours but I can't manage to achieve the recursive nesting 😞 . I was getting frustrated, so I thought I'd start the PR and discussion 😄 .
The nesting could also be an additional rule, like "max X levels of nesting/chained call". I'll add some thoughts on it in an issue.
With these and the refactoring from the other PR I can at least run the rules without exceptions in my project, so I think its a small step forward 🙂 . There seem to be few false positives so I use some ignore rules, but I think overall this will become a really cool package!