mirror of
https://github.com/guzzle/guzzle.git
synced 2025-01-16 13:00:46 +01:00
PHP 8.4 support (#3233)
This commit is contained in:
parent
429cb67026
commit
367c5d4afa
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@ -51,13 +51,11 @@ jobs:
|
||||
strategy:
|
||||
max-parallel: 10
|
||||
matrix:
|
||||
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
|
||||
psr7: ['^1.9.1', '^2.5.1']
|
||||
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
|
||||
psr7: ['^1.9.1', '^2.6.3']
|
||||
include:
|
||||
- php: '8.0'
|
||||
psr7: '^1.9.1@dev'
|
||||
- php: '8.3'
|
||||
psr7: '^2.5.1@dev'
|
||||
- php: '8.4'
|
||||
psr7: '^2.6.3@dev'
|
||||
exclude:
|
||||
- php: '8.1'
|
||||
psr7: '^1.9.1'
|
||||
@ -65,6 +63,8 @@ jobs:
|
||||
psr7: '^1.9.1'
|
||||
- php: '8.3'
|
||||
psr7: '^1.9.1'
|
||||
- php: '8.4'
|
||||
psr7: '^1.9.1'
|
||||
|
||||
steps:
|
||||
- name: Set up PHP
|
||||
@ -106,7 +106,7 @@ jobs:
|
||||
strategy:
|
||||
max-parallel: 10
|
||||
matrix:
|
||||
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
|
||||
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
|
||||
|
||||
steps:
|
||||
- name: Set up PHP
|
||||
|
@ -81,8 +81,8 @@
|
||||
"require": {
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.5.3 || ^2.0.1",
|
||||
"guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
|
||||
"guzzlehttp/promises": "^1.5.3 || ^2.0.3",
|
||||
"guzzlehttp/psr7": "^1.9.1 || ^2.6.3",
|
||||
"psr/http-client": "^1.0",
|
||||
"symfony/deprecation-contracts": "^2.2 || ^3.0"
|
||||
},
|
||||
@ -94,7 +94,7 @@
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"guzzle/client-integration-tests": "3.0.2",
|
||||
"php-http/message-factory": "^1.1",
|
||||
"phpunit/phpunit": "^8.5.36 || ^9.6.15",
|
||||
"phpunit/phpunit": "^8.5.39 || ^9.6.20",
|
||||
"psr/log": "^1.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
|
@ -145,6 +145,11 @@ parameters:
|
||||
count: 1
|
||||
path: src/Handler/CurlMultiHandler.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between false and resource will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: src/Handler/CurlMultiHandler.php
|
||||
|
||||
-
|
||||
message: "#^Property GuzzleHttp\\\\Handler\\\\EasyHandle\\:\\:\\$handle has unknown class CurlHandle as its type\\.$#"
|
||||
count: 1
|
||||
|
@ -3,8 +3,10 @@ includes:
|
||||
- vendor-bin/phpstan/vendor/phpstan/phpstan-deprecation-rules/rules.neon
|
||||
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
identifier: missingType.iterableValue
|
||||
level: max
|
||||
checkMissingIterableValueType: false
|
||||
paths:
|
||||
- src
|
||||
bootstrapFiles:
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352">
|
||||
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
|
||||
<file src="src/Client.php">
|
||||
<PossiblyUndefinedVariable>
|
||||
<code>$options</code>
|
||||
<code><![CDATA[$options]]></code>
|
||||
</PossiblyUndefinedVariable>
|
||||
<UndefinedInterfaceMethod>
|
||||
<code>getBoundary</code>
|
||||
<code><![CDATA[getBoundary]]></code>
|
||||
</UndefinedInterfaceMethod>
|
||||
</file>
|
||||
<file src="src/Cookie/CookieJar.php">
|
||||
@ -16,42 +16,42 @@
|
||||
<code><![CDATA[\ArrayIterator<int, SetCookie>]]></code>
|
||||
</InvalidReturnType>
|
||||
<PossiblyFalseOperand>
|
||||
<code>$result</code>
|
||||
<code><![CDATA[$result]]></code>
|
||||
</PossiblyFalseOperand>
|
||||
</file>
|
||||
<file src="src/Cookie/SetCookie.php">
|
||||
<RedundantCast>
|
||||
<code>(bool) $discard</code>
|
||||
<code>(bool) $httpOnly</code>
|
||||
<code>(bool) $secure</code>
|
||||
<code>(int) $maxAge</code>
|
||||
<code>(string) $domain</code>
|
||||
<code>(string) $name</code>
|
||||
<code>(string) $path</code>
|
||||
<code>(string) $timestamp</code>
|
||||
<code>(string) $value</code>
|
||||
<code><![CDATA[(bool) $discard]]></code>
|
||||
<code><![CDATA[(bool) $httpOnly]]></code>
|
||||
<code><![CDATA[(bool) $secure]]></code>
|
||||
<code><![CDATA[(int) $maxAge]]></code>
|
||||
<code><![CDATA[(string) $domain]]></code>
|
||||
<code><![CDATA[(string) $name]]></code>
|
||||
<code><![CDATA[(string) $path]]></code>
|
||||
<code><![CDATA[(string) $timestamp]]></code>
|
||||
<code><![CDATA[(string) $value]]></code>
|
||||
</RedundantCast>
|
||||
<UndefinedFunction>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int, string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int, string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
</UndefinedFunction>
|
||||
</file>
|
||||
<file src="src/Handler/CurlFactory.php">
|
||||
<FalseOperand>
|
||||
<code>$timeoutRequiresNoSignal</code>
|
||||
<code><![CDATA[$timeoutRequiresNoSignal]]></code>
|
||||
</FalseOperand>
|
||||
<InvalidOperand>
|
||||
<code><![CDATA[$options['connect_timeout'] < 1]]></code>
|
||||
</InvalidOperand>
|
||||
<PossiblyFalseOperand>
|
||||
<code>$timeoutRequiresNoSignal</code>
|
||||
<code><![CDATA[$timeoutRequiresNoSignal]]></code>
|
||||
</PossiblyFalseOperand>
|
||||
<PossiblyInvalidArgument>
|
||||
<code><![CDATA[$easy->handle]]></code>
|
||||
@ -60,22 +60,25 @@
|
||||
<code><![CDATA[$easy->handle]]></code>
|
||||
<code><![CDATA[$easy->handle]]></code>
|
||||
<code><![CDATA[$easy->handle]]></code>
|
||||
<code>$handle</code>
|
||||
<code>$resource</code>
|
||||
<code>$resource</code>
|
||||
<code>$resource</code>
|
||||
<code>$resource</code>
|
||||
<code>$resource</code>
|
||||
<code>$resource</code>
|
||||
<code>$sslKey</code>
|
||||
<code><![CDATA[$handle]]></code>
|
||||
<code><![CDATA[$resource]]></code>
|
||||
<code><![CDATA[$resource]]></code>
|
||||
<code><![CDATA[$resource]]></code>
|
||||
<code><![CDATA[$resource]]></code>
|
||||
<code><![CDATA[$resource]]></code>
|
||||
<code><![CDATA[$resource]]></code>
|
||||
<code><![CDATA[$sslKey]]></code>
|
||||
</PossiblyInvalidArgument>
|
||||
<PossiblyInvalidCast>
|
||||
<code>$sslKey</code>
|
||||
<code><![CDATA[$sslKey]]></code>
|
||||
</PossiblyInvalidCast>
|
||||
<UndefinedDocblockClass>
|
||||
<code>private $handles = [];</code>
|
||||
<code>resource[]|\CurlHandle[]</code>
|
||||
<code><![CDATA[private $handles = [];]]></code>
|
||||
<code><![CDATA[resource[]|\CurlHandle[]]]></code>
|
||||
</UndefinedDocblockClass>
|
||||
<UndefinedVariable>
|
||||
<code><![CDATA[$startingResponse]]></code>
|
||||
</UndefinedVariable>
|
||||
</file>
|
||||
<file src="src/Handler/CurlHandler.php">
|
||||
<PossiblyInvalidArgument>
|
||||
@ -104,36 +107,37 @@
|
||||
<code><![CDATA[isset($this->_mh)]]></code>
|
||||
</RedundantPropertyInitializationCheck>
|
||||
<TypeDoesNotContainType>
|
||||
<code>false === $multiHandle</code>
|
||||
<code><![CDATA[false === $multiHandle]]></code>
|
||||
</TypeDoesNotContainType>
|
||||
<UndefinedDocblockClass>
|
||||
<code>resource|\CurlMultiHandle</code>
|
||||
<code>resource|\CurlMultiHandle</code>
|
||||
<code><![CDATA[resource|\CurlMultiHandle]]></code>
|
||||
<code><![CDATA[resource|\CurlMultiHandle]]></code>
|
||||
</UndefinedDocblockClass>
|
||||
<UndefinedFunction>
|
||||
<code>trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an integer to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)</code>
|
||||
<code><![CDATA[trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an integer to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__)]]></code>
|
||||
</UndefinedFunction>
|
||||
</file>
|
||||
<file src="src/Handler/EasyHandle.php">
|
||||
<InvalidReturnType>
|
||||
<code>void</code>
|
||||
<code><![CDATA[void]]></code>
|
||||
</InvalidReturnType>
|
||||
<UndefinedDocblockClass>
|
||||
<code>resource|\CurlHandle</code>
|
||||
<code><![CDATA[resource|\CurlHandle]]></code>
|
||||
</UndefinedDocblockClass>
|
||||
</file>
|
||||
<file src="src/Handler/MockHandler.php">
|
||||
<ArgumentTypeCoercion>
|
||||
<code>(int) $options['delay'] * 1000</code>
|
||||
<code><![CDATA[(int) $options['delay'] * 1000]]></code>
|
||||
</ArgumentTypeCoercion>
|
||||
</file>
|
||||
<file src="src/Handler/StreamHandler.php">
|
||||
<ImplicitToStringCast>
|
||||
<code>$uri</code>
|
||||
</ImplicitToStringCast>
|
||||
<RedundantCondition>
|
||||
<code>empty($options)</code>
|
||||
<code><![CDATA[!empty($options)]]></code>
|
||||
<code><![CDATA[empty($options)]]></code>
|
||||
</RedundantCondition>
|
||||
<UndefinedVariable>
|
||||
<code><![CDATA[$http_response_header]]></code>
|
||||
</UndefinedVariable>
|
||||
</file>
|
||||
<file src="src/MessageFormatter.php">
|
||||
<InvalidArgument>
|
||||
@ -246,14 +250,9 @@
|
||||
</file>
|
||||
<file src="src/Middleware.php">
|
||||
<InvalidArgument>
|
||||
<code>$request</code>
|
||||
<code><![CDATA[$request]]></code>
|
||||
</InvalidArgument>
|
||||
</file>
|
||||
<file src="src/RedirectMiddleware.php">
|
||||
<ImplicitToStringCast>
|
||||
<code>$location</code>
|
||||
</ImplicitToStringCast>
|
||||
</file>
|
||||
<file src="src/RetryMiddleware.php">
|
||||
<TooManyArguments>
|
||||
<code><![CDATA[($this->delay)(++$options['retries'], $response, $request)]]></code>
|
||||
@ -261,14 +260,14 @@
|
||||
</file>
|
||||
<file src="src/Utils.php">
|
||||
<ArgumentTypeCoercion>
|
||||
<code>$depth</code>
|
||||
<code>$depth</code>
|
||||
<code><![CDATA[$depth]]></code>
|
||||
<code><![CDATA[$depth]]></code>
|
||||
</ArgumentTypeCoercion>
|
||||
<ForbiddenCode>
|
||||
<code>\var_dump($input)</code>
|
||||
<code><![CDATA[\var_dump($input)]]></code>
|
||||
</ForbiddenCode>
|
||||
<PossiblyInvalidCast>
|
||||
<code>$_SERVER[$name]</code>
|
||||
<code><![CDATA[$_SERVER[$name]]]></code>
|
||||
</PossiblyInvalidCast>
|
||||
</file>
|
||||
</files>
|
||||
|
@ -6,6 +6,8 @@
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
errorBaseline="psalm-baseline.xml"
|
||||
findUnusedBaselineEntry="true"
|
||||
findUnusedCode="false"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="src" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"friendsofphp/php-cs-fixer": "3.52.1"
|
||||
"friendsofphp/php-cs-fixer": "3.59.3"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"phpstan/phpstan": "1.10.47",
|
||||
"phpstan/phpstan-deprecation-rules": "1.1.4"
|
||||
"phpstan/phpstan": "1.11.7",
|
||||
"phpstan/phpstan-deprecation-rules": "1.2.0"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"psalm/phar": "5.16.0"
|
||||
"psalm/phar": "5.25.0"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
|
Loading…
x
Reference in New Issue
Block a user