Fix stale result cache for require-extends/require-implements#2866
Fix stale result cache for require-extends/require-implements#2866ondrejmirtes merged 28 commits intophpstan:1.10.xfrom
Conversation
|
This pull request has been marked as ready for review. |
.github/workflows/e2e-tests.yml
Outdated
There was a problem hiding this comment.
I tried result-cache-8 after removing changes from src/ and it does not fail for me locally. Please first submit a draft PR with just the E2E tests so it's obvious they fail.
There was a problem hiding this comment.
after having slept about it, I think the situation is as follows:
we only need to support require-extends for result-cache invalidation because thats the only new part in the reflection hierarchy.
require-implements works with reflection information which was available before, we just added some rules arround it.
Update Baz.php
This reverts commit 181a12b5f3607b2d9bdf2a28c24f21cdbdb7a682.
ondrejmirtes
left a comment
There was a problem hiding this comment.
I just figured out when @phpstan-require-implements has to be handled in DependencyResolver.
/** @phpstan-require-implements Bar */
trait Foo
{
}When the file with Bar changes, we need to reanalyse trait Foo, because the RequireImplementsRule might find some new error, or get rid of an existing error. Like for example when Foo changes type from interface to class and so on.
Please write a failing E2E test number 7 with this use-case, make sure it fails, then fix it in DependencyResolver. Thanks :)
|
Thank you, I will have a look until monday |
|
took me a few attempts.. :-/. failling test in https://github.com/phpstan/phpstan-src/actions/runs/7518819436/job/20466608449?pr=2866 I think its ready for another round of review |
|
Thank you! |
refs #2856 (comment)