1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-03-15 19:59:52 +01:00

3556 Commits

Author SHA1 Message Date
Graham Campbell
6179dd0f61
Update CI, use better integration with psalm, phpstan and php-ci-fixer (also fix one deprecated call) (#2825)
* Replaced call to deprecated function

* Re-worked static analysis

* Removed unnecessary tools entries

* Use --no-progress to hide broken progress bars
2021-03-21 13:09:11 +01:00
Graham Campbell
01129f635f
Bumped branch alias (#2868) 2021-03-15 08:56:29 +01:00
Razvan Grigore
9687c73518
add support for DER and P12 certs (#2411) (#2413)
* add support for DER and P12 certs (#2411)

https://curl.haxx.se/libcurl/c/CURLOPT_SSLCERTTYPE.html

* add test for P12/DER cert types

* dont fail test because of cleanup error

Co-authored-by: Razvan Grigore <razvan.grigore@aboutyou.com>
2021-03-10 13:46:33 +01:00
Tobias Nyholm
da94ef2e43
Fixed wrong parameter order in explode() (#2866) 2021-03-07 12:07:08 +00:00
Tim Düsterhus
2793fe24bf
Support the cURL (http://) scheme for StreamHandler proxies (#2850)
* 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()
2021-03-07 10:21:23 +01:00
Márk Sági-Kazár
55d46a8ba3
Update stale.yml 2021-02-09 08:52:03 +01:00
Steff Missot
3a0543e4f5
[Doc] ConnectException extends TransferException (#2819) 2021-01-30 09:43:14 +01:00
Joachim
34bc199aef
Removed outdated version number. (#2820) 2020-11-15 12:44:59 +01:00
homersimpsons
18b5ccb551
Middleware httpErrors: fix option name typo (#2817) 2020-11-10 11:00:48 +01:00
Gerd R
25486bffcf
Correct tree of exceptions (#2813)
The ConnectException extends the TransferException not the RequestException
2020-10-25 23:25:00 +01:00
Bryan
c71ec26fd2
Update docs to reflect correct exception when using timeout option (#2812) 2020-10-20 21:07:23 +02:00
Graham Campbell
1165f319d9
Test on Windows PHP 8.0 (#2793) 2020-10-19 14:38:56 +02:00
Graham Campbell
0aa74dfb41
Release 7.2.0 (#2808)
* Release 7.2.0

* Update CHANGELOG.md

Co-authored-by: Tobias Nyholm <tobias.nyholm@gmail.com>

Co-authored-by: Tobias Nyholm <tobias.nyholm@gmail.com>
7.2.0
2020-10-10 13:47:56 +02:00
YoakeSakura
368bf4db70
Fix CURLOPT_ENCODING not to be overwritten (#2595)
* Fix CURLOPT_ENCODING not to be overwritten

* Added Header test
2020-10-09 22:04:19 +02:00
Graham Campbell
957b0a0941
Support setting truncateBodyAt param in the http errors middleware (#2795)
* Support setting truncate_body_at option for use by the http errors middleware

* Tweaked variable name

* Remove handler stack options

* Refactor to use an interface instead of a callable

* Removed unused imports

* Update Middleware.php

* Update MiddlewareTest.php
2020-10-09 22:03:10 +02:00
Tobias Nyholm
c8c99e3fe4
Adding some highly opinionated CS fixes (#2797) 2020-10-09 15:47:46 +02:00
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