1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-12 03:24:26 +01:00

3540 Commits

Author SHA1 Message Date
Graham Campbell
8d850e620d
Upgrade to phpstan 0.12.48 (#2794) 2020-10-09 15:44:30 +02:00
Tobias Nyholm
17428d7501
Merge pull request #2804 from Nyholm/head-request-fix
Make sure the Request always has a body object
2020-10-09 15:37:55 +02:00
Nyholm
d48af55e18
Make sure the request always has a body object.
Even HEAD requests.
2020-10-09 15:30:24 +02:00
Tim Düsterhus
3d87fb8404
Fix handling of HEAD requests with Accept-Encoding header
Fixes guzzle/guzzle#2799
Resolves guzzle/guzzle#2800
2020-10-09 14:50:10 +02:00
Sam Reed
c3927bc669
Add psalm xml files to export-ignore (#2802) 2020-10-07 10:13:01 +02:00
Tobias Nyholm
d5a2b0338e
Added changelog for 7.2 (#2792) 2020-10-06 20:45:11 +02:00
Tobias Nyholm
b22ead0a39
Test on PHP8 (#2789) 2020-10-01 13:31:51 +02:00
Ayesh Karunaratne
33e12c0ab6
Update Curl is_resource() to work with PHP 8 CurlHandle and CurlMultiHandle objects (#2715)
* 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>
2020-10-01 13:21:51 +02:00
Tobias Nyholm
fa121c2e4d
[Windows][CI] Fixed workaround with http_test_server (#2790)
* 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>
2020-10-01 13:08:42 +02:00
William Julian-Vicary
616288af85
Handle exceptions during response creation (#2591)
* 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()
2020-09-30 17:03:52 +02:00
David Grayston
48fa032336
Pass response to TooManyRedirectsException (#2660)
* Pass response to TooManyRedirectsException

* Add test for TooManyRedirectsException response
2020-09-30 16:30:49 +02:00
Tobias Nyholm
977b0deb89
Deprecate GUZZLE_CURL_SELECT_TIMEOUT (#2786) 2020-09-30 14:35:04 +02:00
Graham Campbell
702a359bcb
Removed unnecessary leading import slashes (#2788) 2020-09-30 12:02:39 +02:00
Graham Campbell
3d17892590
Avoid "functions" from dependencies (#2712)
* Avoid "functions" from dependencies

* Added change log entry
2020-09-30 11:50:52 +02:00
Tobias Nyholm
7427d6f99d
Prepare 7.1.1 (#2785)
* Prepare 7.1.1

* update dete
7.1.1
2020-09-30 10:51:17 +02:00
Tobias Nyholm
4618ba9a74
6.x will only get security fixes (#2787) 2020-09-30 10:38:39 +02:00
Tim Düsterhus
fe7556b952
Fix response body streams in Windows (#2741)
* Fix response body streams in Windows

Fixes #2735

* Add CurlFactoryTest::testBodyEofOnWindows()
2020-09-30 09:18:48 +02:00
Tim Düsterhus
4552f37ba6
Do not connect a sink for HEAD requests (#2778) 2020-09-29 17:46:32 +02:00
Tobias Nyholm
2890bde08e
Add some labels as “keep open” 2020-09-25 19:02:12 +02:00
Tobias Nyholm
1657c580e3
Added Stale application (#2779)
* Added Stale application

* Update stale.yml
2020-09-25 16:28:35 +02:00
Tobias Nyholm
7881628c7f
Fix test randomly fails on Windows (#2776) 2020-09-25 12:05:43 +02:00
Tim Düsterhus
aec11522a3
Add Windows CI build (#2773)
* 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
2020-09-23 11:35:29 +02:00
Graham Campbell
dbd420893c
Removed PHP 5 work arounds and fix PHP 8 call_user_* issues (#2721)
* Removed PHP 5 work arounds

* Update phpstan-baseline.neon
2020-09-22 11:14:58 +02:00
Tobias Nyholm
7edeaa528f
Adding Changelog for 7.1.0 (#2759)
* Adding Changelog for 7.1.0

* Fixed typo

* Optimistically updated the date
7.1.0
2020-09-22 11:10:04 +02:00
Márk Sági-Kazár
546ae64590
Remove composer normalize dependency (#2770)
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2020-09-21 23:16:54 +03:00
Graham Campbell
07f597ed6a
Merge 6.5 -> 7.1 (#2768) 2020-09-20 13:11:06 +02:00
Tobias Nyholm
09c6dd35e0
Psalm fix (#2766) 2020-09-20 13:05:26 +02:00
Tobias Nyholm
b5edb54223
[PHPStan] Use docker image instead of github action shortcut (#2767)
* [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>
2020-09-20 12:58:39 +02:00
Tobias Nyholm
bb0d3a8831
Remove "tag" from make file (#2764) 2020-09-20 12:56:24 +02:00
Mponos George
c2c9d72f8b
Use final annotation to mark classes as final (#2726)
* Use final annotation to mark classes as final

* Add final to handlers

* Fix phpstan
2020-09-19 15:35:02 +02:00
Václav Vaník
1fd5e8d7f4
Add MessageFormatterInterface (#2729)
* 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>
2020-09-19 15:34:35 +02:00
Tobias Nyholm
a99fb2f007
PHPStan fix (#2760)
* PHPStan fix

* Fix
2020-09-19 15:32:30 +02:00
KITAGAWA Yasutaka
f999bc73d3
Update Guzzle version in documentation (#2746) 2020-09-19 15:02:23 +02:00
Matheus Batista
74b6e54268
[Doc] Fix PSR-7 namespace (#2747)
Missing `Message` in the `RequestInterface` namespace.
2020-09-19 15:01:21 +02:00
Hannes Van De Vreken
33ddb580d0
Throwing errors because mark is not enrolled in github sponsors (#2731) 2020-08-13 21:25:56 +02:00
Graham Campbell
7464d1506e
[7.0] Fixed type error (#2724) (#2737)
* Fixed type error

* Update phpstan-baseline.neon
2020-07-23 14:23:18 +03:00
Edwin van de Pol
c6fec1ee3b
Updated PHP version in documentation (#2730)
As composer states, the minimum version is 7.2.5.
2020-07-23 07:24:39 +02:00
Tobias Nyholm
d713940b86
Make sure MessageFormatter::format returns string (#2723) 2020-07-10 10:45:10 +03:00
perico
9b776cfe79
Fix the empty response body when logging {res_body} (#1872)
* 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>
2020-07-10 09:42:09 +02:00
Guilliam Xavier
c19f9e2493
Fix "curl error msg for low version" (#2661)
* Fix incomplete version_compare

* Deduplicate code

* Check message, deprecate LOW_CURL_VERSION_NUMBER
2020-07-10 09:33:15 +02:00
Tobias Nyholm
59dada79e0
Adding Psalm (#2706)
* Adding Psalm

* Do composer install

* Install psalm phar

* typo

* typo

* Test psalm

* Added make file

* remove from composer.json

* minor

* revert order
2020-07-10 09:31:21 +02:00
Tobias Nyholm
a88a06be44
Added funding (#2713) 2020-07-01 09:37:56 +03:00
Graham Campbell
1101907810
Fixed error in tests (#2716) 2020-06-29 08:35:07 +03:00
Graham Campbell
4894248e0a
Test coverage of Utils (#2708) 2020-06-27 17:51:48 +03:00
Graham Campbell
ad459f6bfa
Fixed up stream handler tests (#2711) 2020-06-27 17:49:04 +03:00
Graham Campbell
0675a1aa71
[7.1] Ensure methods are spaced correctly (#2709)
* Ensure methods are spaced correctly

* Applied CS fixes
2020-06-27 17:41:55 +03:00
Graham Campbell
2d763e4682
[7.1] Tweaked CI (#2705)
* Tweaked CI

* Update static.yml

* Update Makefile
2020-06-27 13:52:26 +02:00
Tobias Nyholm
ee76d61e6d
Minor CI cleanup (#2704)
* Minor CI cleanup

* Use composer:v2
2020-06-27 14:21:39 +03:00
Tobias Nyholm
1d28c34637
Added BC test (#2703) 2020-06-27 13:14:48 +02:00
Graham Campbell
7c46c410f6
Clean up set cookie implementation (#2687) 2020-06-27 13:06:21 +02:00