DEVSENSE / phptools-docs

PHP Tools public content
Apache License 2.0
83 stars 10 forks source link

False positive with `self` in cache #673

Closed ging-dev closed 1 month ago

ging-dev commented 2 months ago

Argument '1' passed to stream() is expected to be of type Symfony\Component\HttpClient\Response\self[]|Traversable, Symfony\Contracts\HttpClient\ResponseInterface givenPHP(PHP0406)

Maybe cache in vendor not resolve self correctly, (maybe include static)

jakubmisek commented 2 months ago

Thanks! Right, self[] gets corrupted in cache. Do you know what file has this definition? (https://github.com/symfony/http-client/tree/7.2/Response)

ging-dev commented 2 months ago

Thanks! Right, self[] gets corrupted in cache. Do you know what file has this definition? (https://github.com/symfony/http-client/tree/7.2/Response)

This line, i guess: https://github.com/symfony/http-client/blob/7f387663bf3d3418d41950a663bf1375960c830c/Response/TransportResponseTrait.php#L138

jakubmisek commented 1 month ago

Fixed, we'll prepare pre-release soon!