Bump Guzzle to 7.10.0 for PHP 8.5 compatibility.

https://github.com/guzzle/guzzle/compare/7.9.2...7.10.0
This commit is contained in:
wn_
2025-08-24 14:40:07 +00:00
parent f7fc00326e
commit 618cb5bf78
27 changed files with 223 additions and 127 deletions

66
composer.lock generated
View File

@@ -232,22 +232,22 @@
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.9.2", "version": "7.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "d281ed313b989f213357e3be1a179f02196ac99b" "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"reference": "d281ed313b989f213357e3be1a179f02196ac99b", "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"guzzlehttp/promises": "^1.5.3 || ^2.0.3", "guzzlehttp/promises": "^2.3",
"guzzlehttp/psr7": "^2.7.0", "guzzlehttp/psr7": "^2.8",
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0" "symfony/deprecation-contracts": "^2.2 || ^3.0"
@@ -338,7 +338,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/guzzle/issues", "issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.9.2" "source": "https://github.com/guzzle/guzzle/tree/7.10.0"
}, },
"funding": [ "funding": [
{ {
@@ -354,20 +354,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-24T11:22:20+00:00" "time": "2025-08-23T22:36:01+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
"version": "2.0.3", "version": "2.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/promises.git", "url": "https://github.com/guzzle/promises.git",
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" "reference": "481557b130ef3790cf82b713667b43030dc9c957"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "reference": "481557b130ef3790cf82b713667b43030dc9c957",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -375,7 +375,7 @@
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.39 || ^9.6.20" "phpunit/phpunit": "^8.5.44 || ^9.6.25"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -421,7 +421,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/promises/issues", "issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/2.0.3" "source": "https://github.com/guzzle/promises/tree/2.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -437,20 +437,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-18T10:29:17+00:00" "time": "2025-08-22T14:34:08+00:00"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.7.0", "version": "2.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" "reference": "21dc724a0583619cd1652f673303492272778051"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051",
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "reference": "21dc724a0583619cd1652f673303492272778051",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -466,7 +466,7 @@
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "0.9.0", "http-interop/http-factory-tests": "0.9.0",
"phpunit/phpunit": "^8.5.39 || ^9.6.20" "phpunit/phpunit": "^8.5.44 || ^9.6.25"
}, },
"suggest": { "suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
@@ -537,7 +537,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.7.0" "source": "https://github.com/guzzle/psr7/tree/2.8.0"
}, },
"funding": [ "funding": [
{ {
@@ -553,7 +553,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-07-18T11:15:46+00:00" "time": "2025-08-23T21:21:41+00:00"
}, },
{ {
"name": "j4mie/idiorm", "name": "j4mie/idiorm",
@@ -1121,16 +1121,16 @@
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1138,12 +1138,12 @@
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": {
"dev-main": "3.5-dev"
},
"thanks": { "thanks": {
"name": "symfony/contracts", "url": "https://github.com/symfony/contracts",
"url": "https://github.com/symfony/contracts" "name": "symfony/contracts"
},
"branch-alias": {
"dev-main": "3.6-dev"
} }
}, },
"autoload": { "autoload": {
@@ -1168,7 +1168,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {
@@ -1184,7 +1184,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-25T14:20:29+00:00" "time": "2024-09-25T14:21:43+00:00"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",

View File

@@ -308,23 +308,23 @@
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.9.2", "version": "7.10.0",
"version_normalized": "7.9.2.0", "version_normalized": "7.10.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "d281ed313b989f213357e3be1a179f02196ac99b" "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"reference": "d281ed313b989f213357e3be1a179f02196ac99b", "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"guzzlehttp/promises": "^1.5.3 || ^2.0.3", "guzzlehttp/promises": "^2.3",
"guzzlehttp/psr7": "^2.7.0", "guzzlehttp/psr7": "^2.8",
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0" "symfony/deprecation-contracts": "^2.2 || ^3.0"
@@ -345,7 +345,7 @@
"ext-intl": "Required for Internationalized Domain Name (IDN) support", "ext-intl": "Required for Internationalized Domain Name (IDN) support",
"psr/log": "Required for using the Log middleware" "psr/log": "Required for using the Log middleware"
}, },
"time": "2024-07-24T11:22:20+00:00", "time": "2025-08-23T22:36:01+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"bamarni-bin": { "bamarni-bin": {
@@ -417,7 +417,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/guzzle/issues", "issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.9.2" "source": "https://github.com/guzzle/guzzle/tree/7.10.0"
}, },
"funding": [ "funding": [
{ {
@@ -437,17 +437,17 @@
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
"version": "2.0.3", "version": "2.3.0",
"version_normalized": "2.0.3.0", "version_normalized": "2.3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/promises.git", "url": "https://github.com/guzzle/promises.git",
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" "reference": "481557b130ef3790cf82b713667b43030dc9c957"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "reference": "481557b130ef3790cf82b713667b43030dc9c957",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -455,9 +455,9 @@
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.39 || ^9.6.20" "phpunit/phpunit": "^8.5.44 || ^9.6.25"
}, },
"time": "2024-07-18T10:29:17+00:00", "time": "2025-08-22T14:34:08+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"bamarni-bin": { "bamarni-bin": {
@@ -503,7 +503,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/promises/issues", "issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/2.0.3" "source": "https://github.com/guzzle/promises/tree/2.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -523,17 +523,17 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.7.0", "version": "2.8.0",
"version_normalized": "2.7.0.0", "version_normalized": "2.8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" "reference": "21dc724a0583619cd1652f673303492272778051"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051",
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "reference": "21dc724a0583619cd1652f673303492272778051",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -549,12 +549,12 @@
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "0.9.0", "http-interop/http-factory-tests": "0.9.0",
"phpunit/phpunit": "^8.5.39 || ^9.6.20" "phpunit/phpunit": "^8.5.44 || ^9.6.25"
}, },
"suggest": { "suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
}, },
"time": "2024-07-18T11:15:46+00:00", "time": "2025-08-23T21:21:41+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"bamarni-bin": { "bamarni-bin": {
@@ -622,7 +622,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.7.0" "source": "https://github.com/guzzle/psr7/tree/2.8.0"
}, },
"funding": [ "funding": [
{ {
@@ -3225,31 +3225,31 @@
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.5.1", "version": "v3.6.0",
"version_normalized": "3.5.1.0", "version_normalized": "3.6.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1" "php": ">=8.1"
}, },
"time": "2024-09-25T14:20:29+00:00", "time": "2024-09-25T14:21:43+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": {
"dev-main": "3.5-dev"
},
"thanks": { "thanks": {
"name": "symfony/contracts", "url": "https://github.com/symfony/contracts",
"url": "https://github.com/symfony/contracts" "name": "symfony/contracts"
},
"branch-alias": {
"dev-main": "3.6-dev"
} }
}, },
"installation-source": "dist", "installation-source": "dist",
@@ -3275,7 +3275,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
}, },
"funding": [ "funding": [
{ {

View File

@@ -3,7 +3,7 @@
'name' => '__root__', 'name' => '__root__',
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => '0520ca2226f095046eaf57aa8125e88f69ccf376', 'reference' => 'f7fc00326e2f51f269f26b24a54d34e07a36846e',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@@ -13,7 +13,7 @@
'__root__' => array( '__root__' => array(
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => '0520ca2226f095046eaf57aa8125e88f69ccf376', 'reference' => 'f7fc00326e2f51f269f26b24a54d34e07a36846e',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@@ -56,27 +56,27 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/guzzle' => array( 'guzzlehttp/guzzle' => array(
'pretty_version' => '7.9.2', 'pretty_version' => '7.10.0',
'version' => '7.9.2.0', 'version' => '7.10.0.0',
'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b', 'reference' => 'b51ac707cfa420b7bfd4e4d5e510ba8008e822b4',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/promises' => array( 'guzzlehttp/promises' => array(
'pretty_version' => '2.0.3', 'pretty_version' => '2.3.0',
'version' => '2.0.3.0', 'version' => '2.3.0.0',
'reference' => '6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8', 'reference' => '481557b130ef3790cf82b713667b43030dc9c957',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises', 'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/psr7' => array( 'guzzlehttp/psr7' => array(
'pretty_version' => '2.7.0', 'pretty_version' => '2.8.0',
'version' => '2.7.0.0', 'version' => '2.8.0.0',
'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201', 'reference' => '21dc724a0583619cd1652f673303492272778051',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(), 'aliases' => array(),
@@ -478,9 +478,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/deprecation-contracts' => array( 'symfony/deprecation-contracts' => array(
'pretty_version' => 'v3.5.1', 'pretty_version' => 'v3.6.0',
'version' => '3.5.1.0', 'version' => '3.6.0.0',
'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6', 'reference' => '63afe740e99a13ba87ec199bb07bbdee937a5b62',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(), 'aliases' => array(),

View File

@@ -2,6 +2,25 @@
Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
## 7.10.0 - 2025-08-23
### Added
- Support for PHP 8.5
### Changed
- Adjusted `guzzlehttp/promises` version constraint to `^2.3`
- Adjusted `guzzlehttp/psr7` version constraint to `^2.8`
## 7.9.3 - 2025-03-27
### Changed
- Remove explicit content-length header for GET requests
- Improve compatibility with bad servers for boolean cookie values
## 7.9.2 - 2024-07-24 ## 7.9.2 - 2024-07-24

View File

@@ -81,8 +81,8 @@
"require": { "require": {
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"ext-json": "*", "ext-json": "*",
"guzzlehttp/promises": "^1.5.3 || ^2.0.3", "guzzlehttp/promises": "^2.3",
"guzzlehttp/psr7": "^2.7.0", "guzzlehttp/psr7": "^2.8",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0" "symfony/deprecation-contracts": "^2.2 || ^3.0"
}, },

6
vendor/guzzlehttp/guzzle/package-lock.json generated vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "guzzle",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

View File

@@ -62,6 +62,10 @@ class SetCookie
if (is_numeric($value)) { if (is_numeric($value)) {
$data[$search] = (int) $value; $data[$search] = (int) $value;
} }
} elseif ($search === 'Secure' || $search === 'Discard' || $search === 'HttpOnly') {
if ($value) {
$data[$search] = true;
}
} else { } else {
$data[$search] = $value; $data[$search] = $value;
} }

View File

@@ -125,7 +125,9 @@ class CurlFactory implements CurlFactoryInterface
unset($easy->handle); unset($easy->handle);
if (\count($this->handles) >= $this->maxHandles) { if (\count($this->handles) >= $this->maxHandles) {
\curl_close($resource); if (PHP_VERSION_ID < 80000) {
\curl_close($resource);
}
} else { } else {
// Remove all callback functions as they can hold onto references // Remove all callback functions as they can hold onto references
// and are not cleaned up by curl_reset. Using curl_setopt_array // and are not cleaned up by curl_reset. Using curl_setopt_array
@@ -729,7 +731,10 @@ class CurlFactory implements CurlFactoryInterface
public function __destruct() public function __destruct()
{ {
foreach ($this->handles as $id => $handle) { foreach ($this->handles as $id => $handle) {
\curl_close($handle); if (PHP_VERSION_ID < 80000) {
\curl_close($handle);
}
unset($this->handles[$id]); unset($this->handles[$id]);
} }
} }

View File

@@ -240,7 +240,10 @@ class CurlMultiHandler
$handle = $this->handles[$id]['easy']->handle; $handle = $this->handles[$id]['easy']->handle;
unset($this->delays[$id], $this->handles[$id]); unset($this->delays[$id], $this->handles[$id]);
\curl_multi_remove_handle($this->_mh, $handle); \curl_multi_remove_handle($this->_mh, $handle);
\curl_close($handle);
if (PHP_VERSION_ID < 80000) {
\curl_close($handle);
}
return true; return true;
} }

View File

@@ -17,10 +17,10 @@ class Proxy
* Sends synchronous requests to a specific handler while sending all other * Sends synchronous requests to a specific handler while sending all other
* requests to another handler. * requests to another handler.
* *
* @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses * @param callable(RequestInterface, array): PromiseInterface $default Handler used for normal responses
* @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync Handler used for synchronous responses. * @param callable(RequestInterface, array): PromiseInterface $sync Handler used for synchronous responses.
* *
* @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler. * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler.
*/ */
public static function wrapSync(callable $default, callable $sync): callable public static function wrapSync(callable $default, callable $sync): callable
{ {
@@ -37,10 +37,10 @@ class Proxy
* performance benefits of curl while still supporting true streaming * performance benefits of curl while still supporting true streaming
* through the StreamHandler. * through the StreamHandler.
* *
* @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for non-streaming responses * @param callable(RequestInterface, array): PromiseInterface $default Handler used for non-streaming responses
* @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses * @param callable(RequestInterface, array): PromiseInterface $streaming Handler used for streaming responses
* *
* @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler. * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler.
*/ */
public static function wrapStreaming(callable $default, callable $streaming): callable public static function wrapStreaming(callable $default, callable $streaming): callable
{ {

View File

@@ -53,8 +53,14 @@ class StreamHandler
$request = $request->withoutHeader('Expect'); $request = $request->withoutHeader('Expect');
// Append a content-length header if body size is zero to match // Append a content-length header if body size is zero to match
// cURL's behavior. // the behavior of `CurlHandler`
if (0 === $request->getBody()->getSize()) { if (
(
0 === \strcasecmp('PUT', $request->getMethod())
|| 0 === \strcasecmp('POST', $request->getMethod())
)
&& 0 === $request->getBody()->getSize()
) {
$request = $request->withHeader('Content-Length', '0'); $request = $request->withHeader('Content-Length', '0');
} }
@@ -327,8 +333,15 @@ class StreamHandler
); );
return $this->createResource( return $this->createResource(
function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) { function () use ($uri, $contextResource, $context, $options, $request) {
$resource = @\fopen((string) $uri, 'r', false, $contextResource); $resource = @\fopen((string) $uri, 'r', false, $contextResource);
// See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable
if (function_exists('http_get_last_response_headers')) {
/** @var array|null */
$http_response_header = \http_get_last_response_headers();
}
$this->lastHeaders = $http_response_header ?? []; $this->lastHeaders = $http_response_header ?? [];
if (false === $resource) { if (false === $resource) {

View File

@@ -187,12 +187,12 @@ final class Middleware
* Middleware that logs requests, responses, and errors using a message * Middleware that logs requests, responses, and errors using a message
* formatter. * formatter.
* *
* @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
*
* @param LoggerInterface $logger Logs messages. * @param LoggerInterface $logger Logs messages.
* @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings. * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings.
* @param string $logLevel Level at which to log requests. * @param string $logLevel Level at which to log requests.
* *
* @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
*
* @return callable Returns a function that accepts the next handler. * @return callable Returns a function that accepts the next handler.
*/ */
public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable

View File

@@ -86,7 +86,7 @@ class Pool implements PromisorInterface
* @param ClientInterface $client Client used to send the requests * @param ClientInterface $client Client used to send the requests
* @param array|\Iterator $requests Requests to send concurrently. * @param array|\Iterator $requests Requests to send concurrently.
* @param array $options Passes through the options available in * @param array $options Passes through the options available in
* {@see \GuzzleHttp\Pool::__construct} * {@see Pool::__construct}
* *
* @return array Returns an array containing the response or an exception * @return array Returns an array containing the response or an exception
* in the same order that the requests were sent. * in the same order that the requests were sent.

View File

@@ -79,7 +79,7 @@ final class Utils
* *
* The returned handler is not wrapped by any default middlewares. * The returned handler is not wrapped by any default middlewares.
* *
* @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system.
* *
* @throws \RuntimeException if no viable Handler is available. * @throws \RuntimeException if no viable Handler is available.
*/ */

View File

@@ -50,7 +50,7 @@ function debug_resource($value = null)
* *
* The returned handler is not wrapped by any default middlewares. * The returned handler is not wrapped by any default middlewares.
* *
* @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system.
* *
* @throws \RuntimeException if no viable Handler is available. * @throws \RuntimeException if no viable Handler is available.
* *

View File

@@ -1,6 +1,34 @@
# CHANGELOG # CHANGELOG
## 2.3.0 - 2025-08-22
### Added
- PHP 8.5 support
## 2.2.0 - 2025-03-27
### Fixed
- Revert "Allow an empty EachPromise to be resolved by running the queue"
## 2.1.0 - 2025-03-27
### Added
- Allow an empty EachPromise to be resolved by running the queue
## 2.0.4 - 2024-10-17
### Fixed
- Once settled, don't allow further rejection of additional promises
## 2.0.3 - 2024-07-18 ## 2.0.3 - 2024-07-18
### Changed ### Changed

View File

@@ -41,7 +41,7 @@ composer require guzzlehttp/promises
| Version | Status | PHP Version | | Version | Status | PHP Version |
|---------|---------------------|--------------| |---------|---------------------|--------------|
| 1.x | Security fixes only | >=5.5,<8.3 | | 1.x | Security fixes only | >=5.5,<8.3 |
| 2.x | Latest | >=7.2.5,<8.5 | | 2.x | Latest | >=7.2.5,<8.6 |
## Quick Start ## Quick Start

View File

@@ -30,7 +30,7 @@
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.39 || ^9.6.20" "phpunit/phpunit": "^8.5.44 || ^9.6.25"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View File

@@ -144,7 +144,9 @@ final class Utils
$results[$idx] = $value; $results[$idx] = $value;
}, },
function ($reason, $idx, Promise $aggregate): void { function ($reason, $idx, Promise $aggregate): void {
$aggregate->reject($reason); if (Is::pending($aggregate)) {
$aggregate->reject($reason);
}
} }
)->then(function () use (&$results) { )->then(function () use (&$results) {
ksort($results); ksort($results);

View File

@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 2.8.0 - 2025-08-23
### Added
- Allow empty lists as header values
### Changed
- PHP 8.5 support
## 2.7.1 - 2025-03-27
### Fixed
- Fixed uppercase IPv6 addresses in URI
### Changed
- Improve uploaded file error message
## 2.7.0 - 2024-07-18 ## 2.7.0 - 2024-07-18
### Added ### Added

View File

@@ -25,7 +25,7 @@ composer require guzzlehttp/psr7
| Version | Status | PHP Version | | Version | Status | PHP Version |
|---------|---------------------|--------------| |---------|---------------------|--------------|
| 1.x | EOL (2024-06-30) | >=5.4,<8.2 | | 1.x | EOL (2024-06-30) | >=5.4,<8.2 |
| 2.x | Latest | >=7.2.5,<8.5 | | 2.x | Latest | >=7.2.5,<8.6 |
## AppendStream ## AppendStream

View File

@@ -62,7 +62,7 @@
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2", "bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "0.9.0", "http-interop/http-factory-tests": "0.9.0",
"phpunit/phpunit": "^8.5.39 || ^9.6.20" "phpunit/phpunit": "^8.5.44 || ^9.6.25"
}, },
"suggest": { "suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"

View File

@@ -174,10 +174,6 @@ trait MessageTrait
return $this->trimAndValidateHeaderValues([$value]); return $this->trimAndValidateHeaderValues([$value]);
} }
if (count($value) === 0) {
throw new \InvalidArgumentException('Header value can not be an empty array.');
}
return $this->trimAndValidateHeaderValues($value); return $this->trimAndValidateHeaderValues($value);
} }

View File

@@ -11,15 +11,15 @@ use RuntimeException;
class UploadedFile implements UploadedFileInterface class UploadedFile implements UploadedFileInterface
{ {
private const ERRORS = [ private const ERROR_MAP = [
UPLOAD_ERR_OK, UPLOAD_ERR_OK => 'UPLOAD_ERR_OK',
UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_INI_SIZE => 'UPLOAD_ERR_INI_SIZE',
UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_FORM_SIZE => 'UPLOAD_ERR_FORM_SIZE',
UPLOAD_ERR_PARTIAL, UPLOAD_ERR_PARTIAL => 'UPLOAD_ERR_PARTIAL',
UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_FILE => 'UPLOAD_ERR_NO_FILE',
UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_NO_TMP_DIR => 'UPLOAD_ERR_NO_TMP_DIR',
UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_CANT_WRITE => 'UPLOAD_ERR_CANT_WRITE',
UPLOAD_ERR_EXTENSION, UPLOAD_ERR_EXTENSION => 'UPLOAD_ERR_EXTENSION',
]; ];
/** /**
@@ -104,7 +104,7 @@ class UploadedFile implements UploadedFileInterface
*/ */
private function setError(int $error): void private function setError(int $error): void
{ {
if (false === in_array($error, UploadedFile::ERRORS, true)) { if (!isset(UploadedFile::ERROR_MAP[$error])) {
throw new InvalidArgumentException( throw new InvalidArgumentException(
'Invalid error status for UploadedFile' 'Invalid error status for UploadedFile'
); );
@@ -137,7 +137,7 @@ class UploadedFile implements UploadedFileInterface
private function validateActive(): void private function validateActive(): void
{ {
if (false === $this->isOk()) { if (false === $this->isOk()) {
throw new RuntimeException('Cannot retrieve stream due to upload error'); throw new RuntimeException(\sprintf('Cannot retrieve stream due to upload error (%s)', self::ERROR_MAP[$this->error]));
} }
if ($this->isMoved()) { if ($this->isMoved()) {

View File

@@ -107,7 +107,7 @@ class Uri implements UriInterface, \JsonSerializable
{ {
// If IPv6 // If IPv6
$prefix = ''; $prefix = '';
if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { if (preg_match('%^(.*://\[[0-9:a-fA-F]+\])(.*?)$%', $url, $matches)) {
/** @var array{0:string, 1:string, 2:string} $matches */ /** @var array{0:string, 1:string, 2:string} $matches */
$prefix = $matches[1]; $prefix = $matches[1];
$url = $matches[2]; $url = $matches[2];

View File

@@ -397,7 +397,7 @@ final class Utils
restore_error_handler(); restore_error_handler();
if ($ex) { if ($ex) {
/** @var $ex \RuntimeException */ /** @var \RuntimeException $ex */
throw $ex; throw $ex;
} }
@@ -444,7 +444,7 @@ final class Utils
restore_error_handler(); restore_error_handler();
if ($ex) { if ($ex) {
/** @var $ex \RuntimeException */ /** @var \RuntimeException $ex */
throw $ex; throw $ex;
} }

View File

@@ -25,7 +25,7 @@
"minimum-stability": "dev", "minimum-stability": "dev",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "3.5-dev" "dev-main": "3.6-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/contracts", "name": "symfony/contracts",