Closed tuomasva closed 8 months ago
This isn't a bug in PHPStan nor phpstan-symfony, but in Symfony PHPDocs. It says:
@psalm-return ($asResource is true ? resource : string)
(https://github.com/symfony/http-foundation/blob/47d72323200934694def5d57083899d774a2b110/Request.php#L1388C8-L1388C63)
If it can really ever be false
then this PHPDoc is wrong, and you should open a bug report for Symfony itself.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I see that this code from Symfony atleast 6.4/7.0
Request
(https://github.com/symfony/http-foundation/blob/7.0/Request.php#L1390):can indeed return
false
on eitherstream_get_content()
orfile_get_contents()
failing?