Repository navigation
Conversation
staabm
left a comment
There was a problem hiding this comment.
only one of the reproducers of the referenced issue is fixed. therefore this PR does not close the issue.
|
|
||
| declare(strict_types = 1); | ||
|
|
||
| namespace Bug11507; |
There was a problem hiding this comment.
it seems this snippet was adopted and does not reflect 1:1 the reported reproducer of phpstan/phpstan#11507 (comment) ?
There was a problem hiding this comment.
which of the snippets in the referenced issue contains this code-example. I was not able to find it. it still looks like it was adopted
There was a problem hiding this comment.
I think it is the snippet from the opening description. Although I don't think that it passes yet anyway. I suspect (haven't investigated) that as a result, the test in question isn't behaving as intended?
Incase it saves anyone any time, the comment at the end of my issue reporting that 2.3.x now has a different report was for another snippet (which does now pass).
There was a problem hiding this comment.
Fair, my snippet was adapted. I replaced bug-11507.php with the exact code from this playground (the last comment on the issue), the test expects no errors and it passes. The PR body says Refs now, the issue stays open.
There was a problem hiding this comment.
Thanks @liamduckett, that clears it up. The test data is now the snippet from your last comment, which passes on 2.3.x, and the opening-description one is not covered, since it still fails.
291aff8 to
278e88b
Compare
|
Thanks @staabm, you're right. I changed |
278e88b to
8dcecaf
Compare
Adds a regression test for phpstan/phpstan#11507, reported by @liamduckett. The test data is the snippet from the last comment on the issue (playground), copied 1:1. It no longer reports "Function foo() should return Collection<non-empty-array> but returns Collection<non-empty-array>" on 2.3.x (playground), so the test expects no errors.
Refs phpstan/phpstan#11507. This does not close it: the reproducer from the opening description (playground) still reports the error.