* Update Curl is_resource() to work with PHP 8 Curl(Multi)Handle objects
Updates `is_resource()` calls for curl handlers to properly work with PHP 8's `\CurlHandle` and `\CurlMultiHandle` objects.
See https://php.watch/versions/8.0/resource-CurlHandle
PHPDoc comments are updated to indicate that the variable/property can be either a resource or a Curl object.
* Updated baselines
Co-authored-by: Nyholm <tobias.nyholm@gmail.com>
* Test on windows
* Update .github/workflows/ci.yml
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
* Use 3.0
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
* Handle exceptions during response creation
Catches exceptions thrown during the createResponse method of the easy handler to avoid crashes during the headers method.
* Add test with helper method on server.php to allow enqueing a raw response
* Fixing static analysis
* Fixing PHP-CS-Fixer issues
* Update Server.php
* Fixing PHP-CS-Fixer issues
* Updating Exception to match Guzzle Exception thrown
* Remove deprecated call to rejection_for()
* Consistently use `\sys_get_temp_dir()` for `\tempnam()` in tests
This is required for Windows CI.
* Make CurlFactoryTest::testEmitsDebugInfoToStream() compatible with Windows
1) GuzzleHttp\Test\Handler\CurlFactoryTest::testEmitsDebugInfoToStream
curl_setopt_array(): cannot represent a stream of type MEMORY as a STDIO FILE*
D:\a\guzzle\guzzle\tests\bootstrap.php:27
D:\a\guzzle\guzzle\src\Handler\CurlFactory.php:72
D:\a\guzzle\guzzle\src\Handler\CurlMultiHandler.php:122
D:\a\guzzle\guzzle\tests\Handler\CurlFactoryTest.php:265
* Add Windows CI build
* [PHPStan] Use docker image instead of github action shortcut
* Syntax fix
* Bump some version
* Update .github/workflows/static.yml
Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
* MessageFormatterInterface added
* Middleware::log accepts MessageFormatterInterface
* log format constants moved back into MessageFormatter. Annotation `@deprecated log format constants will be moved into MessageFormatterInterface in guzzlehttp/guzzle:8.0` added.
* MessageFormatter remove @deprecated constants annotation
* Make the chage in a BC way
* Revert config
Co-authored-by: Nyholm <tobias.nyholm@gmail.com>
* Fix the empty response body when logging {res_body}
This only fixes the issue with {res_body} variable.
When logging with {res_body} the Stream goes to the eof.
This fix will make to return:
- `NULL` when response is null
- `RESPONSE_NOT_LOGGEABLE` when the Stream is not seekable.
- Body to String and rewind if possible
To fix the {response} I would tackle into Psr7\str class
Also found on the following issues #1262 and #1582
* fixes
* cs
Co-authored-by: Nyholm <tobias.nyholm@gmail.com>