From 7a3e2be49c9363a163bd84115bc45a279c9e624d Mon Sep 17 00:00:00 2001
From: Nikita Hovratov <nikita.h@live.de>
Date: Wed, 24 May 2023 21:04:45 +0200
Subject: [PATCH] [TASK] Avoid deprecated usage of GuzzleHttp\Promise settle
 function

This is a preparation patch for a guzzlehttp/guzzle and
guzzlehttp/promises raise.

Resolves: #100918
Releases: main, 12.4, 11.5
Change-Id: I9a2731ade87de8f54b2e3c0e375dde1609e35e2a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79122
Tested-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: core-ci <typo3@b13.com>
---
 .../ServerResponse/ServerResponseCheck.php                  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/typo3/sysext/install/Classes/SystemEnvironment/ServerResponse/ServerResponseCheck.php b/typo3/sysext/install/Classes/SystemEnvironment/ServerResponse/ServerResponseCheck.php
index b686e9d2459c..900b4e16c359 100644
--- a/typo3/sysext/install/Classes/SystemEnvironment/ServerResponse/ServerResponseCheck.php
+++ b/typo3/sysext/install/Classes/SystemEnvironment/ServerResponse/ServerResponseCheck.php
@@ -20,9 +20,7 @@ namespace TYPO3\CMS\Install\SystemEnvironment\ServerResponse;
 use GuzzleHttp\Client;
 use GuzzleHttp\Exception\BadResponseException;
 use GuzzleHttp\Exception\TransferException;
-
-use function GuzzleHttp\Promise\settle;
-
+use GuzzleHttp\Promise\Utils;
 use Psr\Http\Message\ResponseInterface;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Crypto\Random;
@@ -267,7 +265,7 @@ class ServerResponseCheck implements CheckInterface
         foreach ($this->fileDeclarations as $fileDeclaration) {
             $promises[] = $client->requestAsync('GET', $fileDeclaration->getUrl());
         }
-        foreach (settle($promises)->wait() as $index => $response) {
+        foreach (Utils::settle($promises)->wait() as $index => $response) {
             $fileDeclaration = $this->fileDeclarations[$index];
             if (($response['reason'] ?? null) instanceof BadResponseException) {
                 $messageQueue->addMessage(
-- 
GitLab