* Throw `InvalidArgumentException` when an incorrect `headers` array is provided
As discussed in PR #2916 after it was merged an `InvalidArgumentException` is
more fitting, as passing an invalid `headers` array is a clear programming
error that needs to be fixed and not caught.
This is consistent with the validation of the other options, e.g. when using
`multipart` and `form_params` at the same time.
see #2916
see a2b8dd1ad7e733d50e9c7b80cb375e0883a7088d
* Remove obsolete import in Client.php / ClientTest.php
Unknown values of the progress called are filled with `0` by cURL and in fact
the `CURLOPT_PROGRESSFUNCTION` parameters are explicitly typed `int` in
CurlFactory.
StreamHandler always provided `null` as the upload progress, because the
progress is not known there. Adjust this to `0` for consistent behavior.
* Be more strict with types
Make sure getMaxAge() always returns null or int. Also trigger deprecations if wrong types are passed to SetCookie
* fix
* Update baseline
* Require version 2.2
While researching how the `decode_content` option is meant to be used and
looking into the Guzzle source code I stumbled over this part of the code,
because it was non-obvious to me that providing an empty string to
`CURLOPT_ENCODING` does not *disable* the decoding, but instead enables *all*
decoders.
* Add clarification on redirects and PSR-18
Using ``GuzzleHttp\Client::sendRequest()`` ignores the `allow_redirects` configuration option. This is discussed in [#2584][0].
This is not reflected in the documentation.
[0]: https://github.com/guzzle/guzzle/issues/2584
* Update docs/request-options.rst
Co-authored-by: Tobias Nyholm <tobias.nyholm@gmail.com>
* Robust handling of responses with invalid headers
Co-Authored-By: Tim Düsterhus <209270+TimWolla@users.noreply.github.com>
* Cleanup
Co-authored-by: Tim Düsterhus <209270+TimWolla@users.noreply.github.com>
* Test with guzzle/PSR7 2.0
* typo
* bugfix
* Allow dev packages
* Adding return type hints
* Test with the bleeding edge of guzzlehttp/psr7
* Test with stable/beta and dev.
* Test with dev-master for 1.x too
* Reorder.
* Dont test on beta
* Support the cURL (http://) scheme for StreamHandler proxies
* Remove 'proxy' workarounds in StreamHandlerTest
* Update documentation to use `http://` instead of `tcp://` for proxies
* Add StreamHandlerTest::testUsesProxy()
* Add CurlFactoryTest::testUsesProxy()