guzzle / promises

Promises/A+ library for PHP with synchronous support
MIT License
7.61k stars 116 forks source link

Add generic type annotations #157

Closed jtojnar closed 1 year ago

jtojnar commented 1 year ago

This will make it nicer to use with PHPStan.

jtojnar commented 1 year ago

Looks like the code is too dynamic to be able to make use of static type checking to the level I wanted. So I have decided to just add a PHPStan stub locally:

https://github.com/fossar/guzzle-transcoder/blob/bdcaf57645cacced9ba7663c5467223a7ff08abe/utils/PHPStan/Stubs/GuzzlePromises.stub