N°8834 - Add compatibility with PHP 8.4 (#819)

* N°8834 - Add compatibility with PHP 8.4

* Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
Lenaick
2026-02-26 10:36:32 +01:00
committed by GitHub
parent d4821b7edc
commit fc967c06ce
961 changed files with 12298 additions and 7130 deletions

View File

@@ -14,13 +14,12 @@ namespace Symfony\Bundle\FrameworkBundle\Test;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Component\HttpClient\DataCollector\HttpClientDataCollector;
/*
/**
* @author Mathieu Santostefano <msantostefano@protonmail.com>
*/
trait HttpClientAssertionsTrait
{
public static function assertHttpClientRequest(string $expectedUrl, string $expectedMethod = 'GET', string|array $expectedBody = null, array $expectedHeaders = [], string $httpClientId = 'http_client'): void
public static function assertHttpClientRequest(string $expectedUrl, string $expectedMethod = 'GET', string|array|null $expectedBody = null, array $expectedHeaders = [], string $httpClientId = 'http_client'): void
{
/** @var KernelBrowser $client */
$client = static::getClient();
@@ -34,7 +33,7 @@ trait HttpClientAssertionsTrait
$expectedRequestHasBeenFound = false;
if (!\array_key_exists($httpClientId, $httpClientDataCollector->getClients())) {
static::fail(sprintf('HttpClient "%s" is not registered.', $httpClientId));
static::fail(\sprintf('HttpClient "%s" is not registered.', $httpClientId));
}
foreach ($httpClientDataCollector->getClients()[$httpClientId]['traces'] as $trace) {
@@ -102,7 +101,7 @@ trait HttpClientAssertionsTrait
$unexpectedUrlHasBeenFound = false;
if (!\array_key_exists($httpClientId, $httpClientDataCollector->getClients())) {
static::fail(sprintf('HttpClient "%s" is not registered.', $httpClientId));
static::fail(\sprintf('HttpClient "%s" is not registered.', $httpClientId));
}
foreach ($httpClientDataCollector->getClients()[$httpClientId]['traces'] as $trace) {
@@ -114,7 +113,7 @@ trait HttpClientAssertionsTrait
}
}
self::assertFalse($unexpectedUrlHasBeenFound, sprintf('Unexpected URL called: "%s" - "%s"', $expectedMethod, $unexpectedUrl));
self::assertFalse($unexpectedUrlHasBeenFound, \sprintf('Unexpected URL called: "%s" - "%s"', $expectedMethod, $unexpectedUrl));
}
public static function assertHttpClientRequestCount(int $count, string $httpClientId = 'http_client'): void