From 8528f8c040c333480cbf885ef669dfb33a21f1e8 Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Fri, 26 May 2023 12:54:58 +0200 Subject: [PATCH] The inspect_all function has been changed to Utils::inspectAll. (#178) * Update CacheMiddleware.php The inspect_all function has been replaced with a Utils::inspect_all function due to "mitigate problems with functions conflicting between global and local copies of the package". * Update CacheMiddleware.php The name of the new function is inspectAll and not inspect_all... * Update composer.json * Update composer.json Make promises accept both version 1.4 or 2.0. Co-authored-by: Christoph Reiter --------- Co-authored-by: Christoph Reiter --- composer.json | 1 + src/CacheMiddleware.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0508384..a8cd5cb 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "require": { "php": ">=7.2.0", "guzzlehttp/guzzle": "^6.0 || ^7.0", + "guzzlehttp/promises": "^1.4 || ^2.0", "guzzlehttp/psr7": "^1.7.0 || ^2.0.0" }, "require-dev": { diff --git a/src/CacheMiddleware.php b/src/CacheMiddleware.php index bb55f0c..9e591d8 100644 --- a/src/CacheMiddleware.php +++ b/src/CacheMiddleware.php @@ -110,7 +110,7 @@ public function getHttpMethods() */ public function purgeReValidation() { - \GuzzleHttp\Promise\inspect_all($this->waitingRevalidate); + \GuzzleHttp\Promise\Utils::inspectAll($this->waitingRevalidate); } /**