1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-01-17 21:38:16 +01:00

40 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
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
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
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
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
Richard van Laak
c4c348a4f1
Reduce PHPStan baseline errors (#2677)
Co-authored-by: Richard van Laak <richard@scribbr.nl>
Co-authored-by: Tobias Nyholm <tobias.nyholm@gmail.com>
Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
2020-06-09 15:22:29 +03:00
Mponos George
d9f48fdd6e
Fix more issues about phpstan (#2670) 2020-06-06 13:09:15 +03:00
Mponos George
d2db8f533d
Set better callable documentation for phpstan (#2646) 2020-05-24 22:59:15 +03:00
Mponos George
8c3db254c5 Remove iterable errors from phpstan baseline 2020-05-23 23:38:29 +03:00
Graham Campbell
7953b1d64a Merge branch '6.5' into merge-changes 2020-05-23 20:25:21 +01:00
Graham Campbell
d3f2c17918
[6.5] Fix various intl icu issues (#2626)
* Fix issues when compiled against old intl icu

* Fixes

* Bumped minimum polyfill-intl-idn version

* Skip conversion for ASCII domains

* Lock version to symfony/polyfill-intl-idn:1.17.0

Co-authored-by: Nyholm <tobias.nyholm@gmail.com>
2020-05-23 20:57:25 +02:00
Guilliam Xavier
c8162bee93
Fix use and phpDoc for @throws GuzzleException/InvalidArgumentException (#2621) 2020-05-19 15:55:02 +03:00
Guilliam Xavier
351a213ba2
Fix "Fixed deprecation warning in node test server" (#2638)
* Fix "Fixed deprecation warning in node test server

* Ignore PHPStan error after review
2020-05-17 12:36:12 +03:00
David Grayston
6b77639250 PSR-18: Separate ConnectException from RequestException (#2541)
* Separate ConnectException from RequestException

* Remove deprecation annotations

* Remove unneeded ResponseAwareTrait

* Add breaking change to UPGRADING.md

* Split trait use statements into separate lines

* Remove use of traits
2020-01-19 20:31:20 +01:00
Graham Campbell
257ec5087d Avoid functions due to global install conflicts (#2546) 2020-01-19 09:16:12 +01:00
Graham Campbell
8ec66c1193 [7.0] Added real client methods (#2529)
* Added real client methods

* Added changelog entry and upgrading notes
2020-01-18 13:36:52 +01:00
Mponos George
db9e56915c Add object typehint to json_decode (#2527) 2020-01-02 15:13:09 +01:00
Graham Campbell
3cedbdfef9 Avoid the getenv function when unsafe (#2531)
Avoid the unsafe getenv function
2020-01-02 15:03:01 +01:00
Mponos George
67f3aa0157 Adding types on MockHandler fixes various issues (#2499)
* Making type of MockHandler strict fixes various issues

* Fix the tests of the MockHandler

* Fix expected exception on MockHandler tests
2019-12-28 13:18:48 +01:00
Mponos George
865ff35722 Method annotation is not enforcing return type argument (#2497)
* Remove annotation method in order to enforce return type

* Wrote tests about BadResponseException

* Added docblocks for BadResponseException

* update baseline and fix codestyle
2019-12-28 13:18:15 +01:00
Márk Sági-Kazár
8781cac0e4 Fix Roave BC check (#2490)
* Fix Roave BC checks

* Remove rule from baseline
2019-12-23 09:58:26 +02:00
Mponos George
f36a012f31 Fix phpstan complains about false errors (#2485)
* Fix phpstan complains about false errors

* Revert - set cookie to throw exception on array_replace

* Add to baseline a false report about comparison
2019-12-21 22:20:05 +01:00
Mponos George
ece8392e00 Be strict about array_replace that may return null (#2471)
* Be strict about array_replace that may return null

* revert cs changes
2019-12-21 09:36:23 +01:00
Mponos George
45b360e8cb Fixes from typehints of the code (#2466)
* Fixes from typehints of the code

* Remove ignored errors from baseline

* Fix the error thrown by phpstan

* Update code base on typehints

* Fix codestyle issues

* Revert some changes on baseline

* Added more return types and typehints to functions

* Remove a wrong typehint on a function

* Fix phpstan
2019-12-21 09:31:26 +01:00
Tyson Andre
6f0fbb9747 Remove an impossible condition (#2476)
The param type hint ensures the value is always a string inside the
method.
2019-12-19 22:49:37 +02:00
Jaik Dean
62881ec7dc Update phpstan baseline 2019-12-16 14:49:41 +00:00
Jaik Dean
4703d969ea Fix return type for GuzzleHttp\Pool::promise() 2019-12-16 13:39:11 +00:00
Mponos George
92d3e04ace Added return types to many anonymous functions (#2449)
* Added return types to many anonymous functions

* Fix the failign ci

* Fix failing ci

* Update HandlerStack.php
2019-12-11 21:46:55 +01:00
Tobias Nyholm
3d9079b5c3
Added type annotation (#2442)
* Added type annotation for Client

* Added annotations for cookie

* Annotations for exceptions

* Adding more annotations

* Added annotation of the rest

* cs
2019-12-10 08:40:26 +01:00
Tobias Nyholm
6d6d4563e8
Remove UriTemplate (#2440) 2019-12-08 21:04:12 +01:00
Tobias Nyholm
f83107032a
CS fixes (phpdoc_align) (#2435)
* CS fixes

* no_superfluous_phodoc_tags

* no_blank_lines_after_phpdoc

* phpdoc_trim_consecutive_blank_line_separation

* phpdoc_trim

* phpdoc_var_without_name

* phpdoc_scalar

* phpdoc_types

* phpdoc_single_line_var_spacing

* phpdoc_separation

* Updated PHPStan baseline
2019-12-08 17:56:15 +01:00
Jason Moore
4a106300e0 Remove unused exception class. Closes #2102 (#2162)
* Remove unused exception class. Closes #2102

* Removed PHPStan rules
2019-12-08 17:02:23 +01:00
Tobias Nyholm
977d2b1445
Removed CookieJar::getCookieValue() (#2433) 2019-12-08 16:09:44 +01:00
Mponos George
6800c91fe7 Disallow empty response on BadResponseException (#2427)
* Disallow empty response on BadResponseException

* Fix codestyle

* Added return type

* Added typehint

* Remove error from phpstan baseline
2019-12-08 16:01:12 +01:00
Tobias Nyholm
e5d0eb2fc5
Implement PSR-18 (#2421)
* Implement PSR-18

* CS

* Remove snapshot
2019-12-08 14:23:48 +01:00
Alexey Shokov
9d4716949a Internationalized domain name (IDN) support (#2286)
* Internationalized domain name (IDN) support

* Documentation fix

* Tests for base_uri

* PHPStan and CI fixes

* cs
2019-12-07 10:28:27 +01:00
Tobias Nyholm
8d1a5f282d
Updated phpstan config for version 0.12.0 (#2419) 2019-12-07 09:41:32 +01:00
Tobias Nyholm
7088357383
Use PHPStan baseline (#2387)
* Use PHPStan baseline

* Use max level

* added more errors
2019-10-24 15:55:19 +03:00