From 3c56e195bddc69d6dd9ebc2037a6697a5509f117 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 3 Sep 2026 04:47:18 +0200 Subject: [PATCH 1/2] composer: Ignore guzzlehttp/psr7 advisories The 1.x branch has long been abandoned and it contains many security issues but we cannot switch to 2.x while we still support PHP 7.1. It is only used for tests so it should be safe enough. --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bca9932..922d03c 100644 --- a/composer.json +++ b/composer.json @@ -52,6 +52,11 @@ ] }, "config": { - "sort-packages": true + "sort-packages": true, + "policy": { + "advisories": { + "ignore": ["guzzlehttp/psr7"] + } + } } } From 52920f9a8bc0a20c66f67caa39814642737e91e0 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 3 Sep 2026 04:38:58 +0200 Subject: [PATCH 2/2] Fix `spl_object_hash` deprecation on PHP 8.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When testing with PHP 8.6.0beta2, I get the following deprecation warning: Function spl_object_hash() is deprecated since 8.6, consider using spl_object_id() instead Let’s switch to the suggested function where supported. https://www.php.net/manual/en/function.spl-object-hash.php https://www.php.net/manual/en/function.spl-object-id.php --- CHANGELOG.md | 4 ++++ src/Plugin/RedirectPlugin.php | 2 +- src/Plugin/RetryPlugin.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 106fc97..ce273e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 2.7.4 - unreleased + +- Fix `spl_object_hash` deprecation on PHP 8.6. + ## 2.7.3 - 2025-11-29 - Allow installation with Symfony 8. diff --git a/src/Plugin/RedirectPlugin.php b/src/Plugin/RedirectPlugin.php index 8aebcbf..b2c1d15 100644 --- a/src/Plugin/RedirectPlugin.php +++ b/src/Plugin/RedirectPlugin.php @@ -178,7 +178,7 @@ public function handleRequest(RequestInterface $request, callable $next, callabl $uri = $this->createUri($response, $request); $redirectRequest = $this->buildRedirectRequest($request, $uri, $statusCode); - $chainIdentifier = spl_object_hash((object) $first); + $chainIdentifier = \PHP_VERSION_ID < 70200 ? spl_object_hash((object) $first) : (string) spl_object_id((object) $first); if (!array_key_exists($chainIdentifier, $this->circularDetection)) { $this->circularDetection[$chainIdentifier] = []; diff --git a/src/Plugin/RetryPlugin.php b/src/Plugin/RetryPlugin.php index 992bb21..edd3fe3 100644 --- a/src/Plugin/RetryPlugin.php +++ b/src/Plugin/RetryPlugin.php @@ -98,7 +98,7 @@ public function __construct(array $config = []) public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { - $chainIdentifier = spl_object_hash((object) $first); + $chainIdentifier = \PHP_VERSION_ID < 70200 ? spl_object_hash((object) $first) : (string) spl_object_id((object) $first); return $next($request)->then(function (ResponseInterface $response) use ($request, $next, $first, $chainIdentifier) { if (!array_key_exists($chainIdentifier, $this->retryStorage)) {