New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document GuzzleHttp\Client::__construct()
parameters at type level?
#3194
Comments
Also noticed: defaults are not really 100% clear, so I had a project where the timeout was Not sure if we can document that at type level, somehow. |
Yeh, I agree we should do this. I'm looking to add better generic and shape typing in Guzzle 8. I am a little hesitant to make too many changes to Guzzle 7, as the blast radius can be large for even changes that we could argue are not really breaking, but can change the outputs of static analyzers. |
Eh, that's kinda normal, TBH: there's a ton of SA shifts at every single tool upgrade regardless |
Description
I just happened to stumble upon
guzzle/src/Client.php
Lines 26 to 57 in 41042bc
Client
.One thing I noticed here is that the docblock mentions:
I'm wondering if we could add type-level documentation for this constructor for PHPStan, Psalm and IntelliJ, such as:
Then, in
RequestOptions
:Note how the 3 dots at the end are necessary to allow options to expand over time.
This kind of addition would be a massive ergonomic improvement, IMO.
Similar to getsentry/sentry-php#1656
The text was updated successfully, but these errors were encountered: