> The headers of the response keyed by header names in lowercase
*
* @throws TransportExceptionInterface When a network error occurs
* @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached
diff --git a/lam/lib/3rdParty/composer/symfony/http-client-contracts/Test/Fixtures/web/index.php b/lam/lib/3rdParty/composer/symfony/http-client-contracts/Test/Fixtures/web/index.php
index 59033d55a..399f8bdde 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client-contracts/Test/Fixtures/web/index.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client-contracts/Test/Fixtures/web/index.php
@@ -199,6 +199,16 @@ switch (parse_url($vars['REQUEST_URI'], \PHP_URL_PATH)) {
]);
exit;
+
+ case '/custom':
+ if (isset($_GET['status'])) {
+ http_response_code((int) $_GET['status']);
+ }
+ if (isset($_GET['headers']) && is_array($_GET['headers'])) {
+ foreach ($_GET['headers'] as $header) {
+ header($header);
+ }
+ }
}
header('Content-Type: application/json', true);
diff --git a/lam/lib/3rdParty/composer/symfony/http-client-contracts/Test/HttpClientTestCase.php b/lam/lib/3rdParty/composer/symfony/http-client-contracts/Test/HttpClientTestCase.php
index b150f0ce7..9a528f698 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client-contracts/Test/HttpClientTestCase.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client-contracts/Test/HttpClientTestCase.php
@@ -11,6 +11,7 @@
namespace Symfony\Contracts\HttpClient\Test;
+use PHPUnit\Framework\Attributes\RequiresPhpExtension;
use PHPUnit\Framework\TestCase;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
@@ -25,7 +26,7 @@ abstract class HttpClientTestCase extends TestCase
{
public static function setUpBeforeClass(): void
{
- if (!function_exists('ob_gzhandler')) {
+ if (!\function_exists('ob_gzhandler')) {
static::markTestSkipped('The "ob_gzhandler" function is not available.');
}
@@ -1025,6 +1026,7 @@ abstract class HttpClientTestCase extends TestCase
/**
* @requires extension zlib
*/
+ #[RequiresPhpExtension('zlib')]
public function testAutoEncodingRequest()
{
$client = $this->getHttpClient(__FUNCTION__);
@@ -1098,6 +1100,7 @@ abstract class HttpClientTestCase extends TestCase
/**
* @requires extension zlib
*/
+ #[RequiresPhpExtension('zlib')]
public function testUserlandEncodingRequest()
{
$client = $this->getHttpClient(__FUNCTION__);
@@ -1120,6 +1123,7 @@ abstract class HttpClientTestCase extends TestCase
/**
* @requires extension zlib
*/
+ #[RequiresPhpExtension('zlib')]
public function testGzipBroken()
{
$client = $this->getHttpClient(__FUNCTION__);
diff --git a/lam/lib/3rdParty/composer/symfony/http-client-contracts/composer.json b/lam/lib/3rdParty/composer/symfony/http-client-contracts/composer.json
index efb146ec1..a67a7530d 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client-contracts/composer.json
+++ b/lam/lib/3rdParty/composer/symfony/http-client-contracts/composer.json
@@ -27,7 +27,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "3.5-dev"
+ "dev-main": "3.6-dev"
},
"thanks": {
"name": "symfony/contracts",
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/AmpHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/AmpHttpClient.php
index a095d2081..1d4745ffb 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/AmpHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/AmpHttpClient.php
@@ -166,7 +166,7 @@ final class AmpHttpClient implements HttpClientInterface, LoggerAwareInterface,
foreach ($pushedResponses as [$pushedUrl, $pushDeferred]) {
$pushDeferred->fail(new CancelledException());
- $this->logger?->debug(sprintf('Unused pushed response: "%s"', $pushedUrl));
+ $this->logger?->debug(\sprintf('Unused pushed response: "%s"', $pushedUrl));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/CachingHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/CachingHttpClient.php
index 34bc1189a..97826d20a 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/CachingHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/CachingHttpClient.php
@@ -42,7 +42,7 @@ class CachingHttpClient implements HttpClientInterface, ResetInterface
public function __construct(HttpClientInterface $client, StoreInterface $store, array $defaultOptions = [])
{
if (!class_exists(HttpClientKernel::class)) {
- throw new \LogicException(sprintf('Using "%s" requires the HttpKernel component, try running "composer require symfony/http-kernel".', __CLASS__));
+ throw new \LogicException(\sprintf('Using "%s" requires the HttpKernel component, try running "composer require symfony/http-kernel".', __CLASS__));
}
$this->client = $client;
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Chunk/ServerSentEvent.php b/lam/lib/3rdParty/composer/symfony/http-client/Chunk/ServerSentEvent.php
index 723150618..e6dddf617 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Chunk/ServerSentEvent.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Chunk/ServerSentEvent.php
@@ -89,17 +89,17 @@ final class ServerSentEvent extends DataChunk implements ChunkInterface
}
if ('' === $this->data) {
- throw new JsonException(sprintf('Server-Sent Event%s data is empty.', '' !== $this->id ? sprintf(' "%s"', $this->id) : ''));
+ throw new JsonException(\sprintf('Server-Sent Event%s data is empty.', '' !== $this->id ? \sprintf(' "%s"', $this->id) : ''));
}
try {
$jsonData = json_decode($this->data, true, 512, \JSON_BIGINT_AS_STRING | \JSON_THROW_ON_ERROR);
} catch (\JsonException $e) {
- throw new JsonException(sprintf('Decoding Server-Sent Event%s failed: ', '' !== $this->id ? sprintf(' "%s"', $this->id) : '').$e->getMessage(), $e->getCode());
+ throw new JsonException(\sprintf('Decoding Server-Sent Event%s failed: ', '' !== $this->id ? \sprintf(' "%s"', $this->id) : '').$e->getMessage(), $e->getCode());
}
if (!\is_array($jsonData)) {
- throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned in Server-Sent Event%s.', get_debug_type($jsonData), '' !== $this->id ? sprintf(' "%s"', $this->id) : ''));
+ throw new JsonException(\sprintf('JSON content was expected to decode to an array, "%s" returned in Server-Sent Event%s.', get_debug_type($jsonData), '' !== $this->id ? \sprintf(' "%s"', $this->id) : ''));
}
return $this->jsonData = $jsonData;
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/CurlHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/CurlHttpClient.php
index 31eca9d83..b3d6f2adb 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/CurlHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/CurlHttpClient.php
@@ -152,14 +152,14 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface,
if (\is_array($options['auth_ntlm'])) {
$count = \count($options['auth_ntlm']);
if ($count <= 0 || $count > 2) {
- throw new InvalidArgumentException(sprintf('Option "auth_ntlm" must contain 1 or 2 elements, %d given.', $count));
+ throw new InvalidArgumentException(\sprintf('Option "auth_ntlm" must contain 1 or 2 elements, %d given.', $count));
}
$options['auth_ntlm'] = implode(':', $options['auth_ntlm']);
}
if (!\is_string($options['auth_ntlm'])) {
- throw new InvalidArgumentException(sprintf('Option "auth_ntlm" must be a string or an array, "%s" given.', get_debug_type($options['auth_ntlm'])));
+ throw new InvalidArgumentException(\sprintf('Option "auth_ntlm" must be a string or an array, "%s" given.', get_debug_type($options['auth_ntlm'])));
}
$curlopts[\CURLOPT_USERPWD] = $options['auth_ntlm'];
@@ -297,21 +297,21 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface,
unset($multi->pushedResponses[$url]);
if (self::acceptPushForRequest($method, $options, $pushedResponse)) {
- $this->logger?->debug(sprintf('Accepting pushed response: "%s %s"', $method, $url));
+ $this->logger?->debug(\sprintf('Accepting pushed response: "%s %s"', $method, $url));
// Reinitialize the pushed response with request's options
$ch = $pushedResponse->handle;
$pushedResponse = $pushedResponse->response;
$pushedResponse->__construct($multi, $url, $options, $this->logger);
} else {
- $this->logger?->debug(sprintf('Rejecting pushed response: "%s"', $url));
+ $this->logger?->debug(\sprintf('Rejecting pushed response: "%s"', $url));
$pushedResponse = null;
}
}
if (!$pushedResponse) {
$ch = curl_init();
- $this->logger?->info(sprintf('Request: "%s %s"', $method, $url));
+ $this->logger?->info(\sprintf('Request: "%s %s"', $method, $url));
$curlopts += [\CURLOPT_SHARE => $multi->share];
}
@@ -321,7 +321,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface,
}
if (null !== $value && !curl_setopt($ch, $opt, $value) && \CURLOPT_CERTINFO !== $opt && (!\defined('CURLOPT_HEADEROPT') || \CURLOPT_HEADEROPT !== $opt)) {
$constantName = $this->findConstantName($opt);
- throw new TransportException(sprintf('Curl option "%s" is not supported.', $constantName ?? $opt));
+ throw new TransportException(\sprintf('Curl option "%s" is not supported.', $constantName ?? $opt));
}
}
@@ -388,7 +388,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface,
{
if (!$eof && \strlen($buffer) < $length) {
if (!\is_string($data = $body($length))) {
- throw new TransportException(sprintf('The return value of the "body" option callback must be a string, "%s" returned.', get_debug_type($data)));
+ throw new TransportException(\sprintf('The return value of the "body" option callback must be a string, "%s" returned.', get_debug_type($data)));
}
$buffer .= $data;
@@ -551,7 +551,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface,
foreach ($options as $opt => $optValue) {
if (isset($curloptsToConfig[$opt])) {
$constName = $this->findConstantName($opt) ?? $opt;
- throw new InvalidArgumentException(sprintf('Cannot set "%s" with "extra.curl", use option "%s" instead.', $constName, $curloptsToConfig[$opt]));
+ throw new InvalidArgumentException(\sprintf('Cannot set "%s" with "extra.curl", use option "%s" instead.', $constName, $curloptsToConfig[$opt]));
}
if (\in_array($opt, $methodOpts)) {
@@ -560,7 +560,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface,
if (\in_array($opt, $curloptsToCheck)) {
$constName = $this->findConstantName($opt) ?? $opt;
- throw new InvalidArgumentException(sprintf('Cannot set "%s" with "extra.curl".', $constName));
+ throw new InvalidArgumentException(\sprintf('Cannot set "%s" with "extra.curl".', $constName));
}
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/DataCollector/HttpClientDataCollector.php b/lam/lib/3rdParty/composer/symfony/http-client/DataCollector/HttpClientDataCollector.php
index a749aa61c..7c58a0eaa 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/DataCollector/HttpClientDataCollector.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/DataCollector/HttpClientDataCollector.php
@@ -233,8 +233,8 @@ final class HttpClientDataCollector extends DataCollector implements LateDataCol
}
if (preg_match('/^> ([A-Z]+)/', $line, $match)) {
- $command[] = sprintf('--request %s', $match[1]);
- $command[] = sprintf('--url %s', escapeshellarg($url));
+ $command[] = \sprintf('--request %s', $match[1]);
+ $command[] = \sprintf('--url %s', escapeshellarg($url));
continue;
}
@@ -252,7 +252,7 @@ final class HttpClientDataCollector extends DataCollector implements LateDataCol
{
static $useProcess;
- if ($useProcess ??= function_exists('proc_open') && class_exists(Process::class)) {
+ if ($useProcess ??= \function_exists('proc_open') && class_exists(Process::class)) {
return substr((new Process(['', $payload]))->getCommandLine(), 3);
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/EventSourceHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/EventSourceHttpClient.php
index b5f88ddba..440268ec6 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/EventSourceHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/EventSourceHttpClient.php
@@ -53,7 +53,7 @@ final class EventSourceHttpClient implements HttpClientInterface, ResetInterface
public function request(string $method, string $url, array $options = []): ResponseInterface
{
- $state = new class() {
+ $state = new class {
public ?string $buffer = null;
public ?string $lastEventId = null;
public float $reconnectionTime;
@@ -110,7 +110,7 @@ final class EventSourceHttpClient implements HttpClientInterface, ResetInterface
if (preg_match('/^text\/event-stream(;|$)/i', $context->getHeaders()['content-type'][0] ?? '')) {
$state->buffer = '';
} elseif (null !== $lastError || (null !== $state->buffer && 200 === $context->getStatusCode())) {
- throw new EventSourceException(sprintf('Response content-type is "%s" while "text/event-stream" was expected for "%s".', $context->getHeaders()['content-type'][0] ?? '', $context->getInfo('url')));
+ throw new EventSourceException(\sprintf('Response content-type is "%s" while "text/event-stream" was expected for "%s".', $context->getHeaders()['content-type'][0] ?? '', $context->getInfo('url')));
} else {
$context->passthru();
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Exception/HttpExceptionTrait.php b/lam/lib/3rdParty/composer/symfony/http-client/Exception/HttpExceptionTrait.php
index 264ef24b2..fa99ed386 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Exception/HttpExceptionTrait.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Exception/HttpExceptionTrait.php
@@ -27,7 +27,7 @@ trait HttpExceptionTrait
$this->response = $response;
$code = $response->getInfo('http_code');
$url = $response->getInfo('url');
- $message = sprintf('HTTP %d returned for "%s".', $code, $url);
+ $message = \sprintf('HTTP %d returned for "%s".', $code, $url);
$httpCodeFound = false;
$isJson = false;
@@ -37,7 +37,7 @@ trait HttpExceptionTrait
break;
}
- $message = sprintf('%s returned for "%s".', $h, $url);
+ $message = \sprintf('%s returned for "%s".', $h, $url);
$httpCodeFound = true;
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/HttpClientTrait.php b/lam/lib/3rdParty/composer/symfony/http-client/HttpClientTrait.php
index 4be9afa79..6d1946f72 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/HttpClientTrait.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/HttpClientTrait.php
@@ -46,7 +46,7 @@ trait HttpClientTrait
{
if (null !== $method) {
if (\strlen($method) !== strspn($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')) {
- throw new InvalidArgumentException(sprintf('Invalid HTTP method "%s", only uppercase letters are accepted.', $method));
+ throw new InvalidArgumentException(\sprintf('Invalid HTTP method "%s", only uppercase letters are accepted.', $method));
}
if (!$method) {
throw new InvalidArgumentException('The HTTP method cannot be empty.');
@@ -61,11 +61,11 @@ trait HttpClientTrait
$options['buffer'] = static function (array $headers) use ($buffer) {
if (!\is_bool($buffer = $buffer($headers))) {
if (!\is_array($bufferInfo = @stream_get_meta_data($buffer))) {
- throw new \LogicException(sprintf('The closure passed as option "buffer" must return bool or stream resource, got "%s".', get_debug_type($buffer)));
+ throw new \LogicException(\sprintf('The closure passed as option "buffer" must return bool or stream resource, got "%s".', get_debug_type($buffer)));
}
if (false === strpbrk($bufferInfo['mode'], 'acew+')) {
- throw new \LogicException(sprintf('The stream returned by the closure passed as option "buffer" must be writeable, got mode "%s".', $bufferInfo['mode']));
+ throw new \LogicException(\sprintf('The stream returned by the closure passed as option "buffer" must be writeable, got mode "%s".', $bufferInfo['mode']));
}
}
@@ -73,11 +73,11 @@ trait HttpClientTrait
};
} elseif (!\is_bool($buffer)) {
if (!\is_array($bufferInfo = @stream_get_meta_data($buffer))) {
- throw new InvalidArgumentException(sprintf('Option "buffer" must be bool, stream resource or Closure, "%s" given.', get_debug_type($buffer)));
+ throw new InvalidArgumentException(\sprintf('Option "buffer" must be bool, stream resource or Closure, "%s" given.', get_debug_type($buffer)));
}
if (false === strpbrk($bufferInfo['mode'], 'acew+')) {
- throw new InvalidArgumentException(sprintf('The stream in option "buffer" must be writeable, mode "%s" given.', $bufferInfo['mode']));
+ throw new InvalidArgumentException(\sprintf('The stream in option "buffer" must be writeable, mode "%s" given.', $bufferInfo['mode']));
}
}
@@ -128,25 +128,25 @@ trait HttpClientTrait
// Validate on_progress
if (isset($options['on_progress']) && !\is_callable($onProgress = $options['on_progress'])) {
- throw new InvalidArgumentException(sprintf('Option "on_progress" must be callable, "%s" given.', get_debug_type($onProgress)));
+ throw new InvalidArgumentException(\sprintf('Option "on_progress" must be callable, "%s" given.', get_debug_type($onProgress)));
}
if (\is_array($options['auth_basic'] ?? null)) {
$count = \count($options['auth_basic']);
if ($count <= 0 || $count > 2) {
- throw new InvalidArgumentException(sprintf('Option "auth_basic" must contain 1 or 2 elements, "%s" given.', $count));
+ throw new InvalidArgumentException(\sprintf('Option "auth_basic" must contain 1 or 2 elements, "%s" given.', $count));
}
$options['auth_basic'] = implode(':', $options['auth_basic']);
}
if (!\is_string($options['auth_basic'] ?? '')) {
- throw new InvalidArgumentException(sprintf('Option "auth_basic" must be string or an array, "%s" given.', get_debug_type($options['auth_basic'])));
+ throw new InvalidArgumentException(\sprintf('Option "auth_basic" must be string or an array, "%s" given.', get_debug_type($options['auth_basic'])));
}
if (isset($options['auth_bearer'])) {
if (!\is_string($options['auth_bearer'])) {
- throw new InvalidArgumentException(sprintf('Option "auth_bearer" must be a string, "%s" given.', get_debug_type($options['auth_bearer'])));
+ throw new InvalidArgumentException(\sprintf('Option "auth_bearer" must be a string, "%s" given.', get_debug_type($options['auth_bearer'])));
}
if (preg_match('{[^\x21-\x7E]}', $options['auth_bearer'])) {
throw new InvalidArgumentException('Invalid character found in option "auth_bearer": '.json_encode($options['auth_bearer']).'.');
@@ -263,11 +263,11 @@ trait HttpClientTrait
$msg = 'try using "%s" instead.';
}
- throw new InvalidArgumentException(sprintf('Option "auth_ntlm" is not supported by "%s", '.$msg, __CLASS__, CurlHttpClient::class));
+ throw new InvalidArgumentException(\sprintf('Option "auth_ntlm" is not supported by "%s", '.$msg, __CLASS__, CurlHttpClient::class));
}
if ('vars' === $name) {
- throw new InvalidArgumentException(sprintf('Option "vars" is not supported by "%s", try using "%s" instead.', __CLASS__, UriTemplateHttpClient::class));
+ throw new InvalidArgumentException(\sprintf('Option "vars" is not supported by "%s", try using "%s" instead.', __CLASS__, UriTemplateHttpClient::class));
}
$alternatives = [];
@@ -278,7 +278,7 @@ trait HttpClientTrait
}
}
- throw new InvalidArgumentException(sprintf('Unsupported option "%s" passed to "%s", did you mean "%s"?', $name, __CLASS__, implode('", "', $alternatives ?: array_keys($defaultOptions))));
+ throw new InvalidArgumentException(\sprintf('Unsupported option "%s" passed to "%s", did you mean "%s"?', $name, __CLASS__, implode('", "', $alternatives ?: array_keys($defaultOptions))));
}
return $options;
@@ -300,13 +300,13 @@ trait HttpClientTrait
if (\is_int($name)) {
if (!\is_string($values)) {
- throw new InvalidArgumentException(sprintf('Invalid value for header "%s": expected string, "%s" given.', $name, get_debug_type($values)));
+ throw new InvalidArgumentException(\sprintf('Invalid value for header "%s": expected string, "%s" given.', $name, get_debug_type($values)));
}
[$name, $values] = explode(':', $values, 2);
$values = [ltrim($values)];
} elseif (!is_iterable($values)) {
if (\is_object($values)) {
- throw new InvalidArgumentException(sprintf('Invalid value for header "%s": expected string, "%s" given.', $name, get_debug_type($values)));
+ throw new InvalidArgumentException(\sprintf('Invalid value for header "%s": expected string, "%s" given.', $name, get_debug_type($values)));
}
$values = (array) $values;
@@ -319,7 +319,7 @@ trait HttpClientTrait
$normalizedHeaders[$lcName][] = $value = $name.': '.$value;
if (\strlen($value) !== strcspn($value, "\r\n\0")) {
- throw new InvalidArgumentException(sprintf('Invalid header: CR/LF/NUL found in "%s".', $value));
+ throw new InvalidArgumentException(\sprintf('Invalid header: CR/LF/NUL found in "%s".', $value));
}
}
}
@@ -392,10 +392,10 @@ trait HttpClientTrait
$v = $streams[$v];
if (!\is_array($m = @stream_get_meta_data($v))) {
- throw new TransportException(sprintf('Invalid "%s" resource found in body part "%s".', get_resource_type($v), $k));
+ throw new TransportException(\sprintf('Invalid "%s" resource found in body part "%s".', get_resource_type($v), $k));
}
if (feof($v)) {
- throw new TransportException(sprintf('Uploaded stream ended for body part "%s".', $k));
+ throw new TransportException(\sprintf('Uploaded stream ended for body part "%s".', $k));
}
$m += stream_context_get_options($v)['http'] ?? [];
@@ -451,7 +451,7 @@ trait HttpClientTrait
while (null !== $h && !feof($h)) {
if (false === $part = fread($h, $size)) {
- throw new TransportException(sprintf('Error while reading uploaded stream for body part "%s".', $k));
+ throw new TransportException(\sprintf('Error while reading uploaded stream for body part "%s".', $k));
}
yield $part;
@@ -500,7 +500,7 @@ trait HttpClientTrait
}
if (!\is_array(@stream_get_meta_data($body))) {
- throw new InvalidArgumentException(sprintf('Option "body" must be string, stream resource, iterable or callable, "%s" given.', get_debug_type($body)));
+ throw new InvalidArgumentException(\sprintf('Option "body" must be string, stream resource, iterable or callable, "%s" given.', get_debug_type($body)));
}
return $body;
@@ -533,14 +533,14 @@ trait HttpClientTrait
40 => ['sha1' => $fingerprint],
44 => ['pin-sha256' => [$fingerprint]],
64 => ['sha256' => $fingerprint],
- default => throw new InvalidArgumentException(sprintf('Cannot auto-detect fingerprint algorithm for "%s".', $fingerprint)),
+ default => throw new InvalidArgumentException(\sprintf('Cannot auto-detect fingerprint algorithm for "%s".', $fingerprint)),
};
} elseif (\is_array($fingerprint)) {
foreach ($fingerprint as $algo => $hash) {
$fingerprint[$algo] = 'pin-sha256' === $algo ? (array) $hash : str_replace(':', '', $hash);
}
} else {
- throw new InvalidArgumentException(sprintf('Option "peer_fingerprint" must be string or array, "%s" given.', get_debug_type($fingerprint)));
+ throw new InvalidArgumentException(\sprintf('Option "peer_fingerprint" must be string or array, "%s" given.', get_debug_type($fingerprint)));
}
return $fingerprint;
@@ -574,15 +574,15 @@ trait HttpClientTrait
$givenUrl = $url;
if (null !== $base && '' === ($base['scheme'] ?? '').($base['authority'] ?? '')) {
- throw new InvalidArgumentException(sprintf('Invalid "base_uri" option: host or scheme is missing in "%s".', implode('', $base)));
+ throw new InvalidArgumentException(\sprintf('Invalid "base_uri" option: host or scheme is missing in "%s".', implode('', $base)));
}
if (null === $url['scheme'] && (null === $base || null === $base['scheme'])) {
- throw new InvalidArgumentException(sprintf('Invalid URL: scheme is missing in "%s". Did you forget to add "http(s)://"?', implode('', $base ?? $url)));
+ throw new InvalidArgumentException(\sprintf('Invalid URL: scheme is missing in "%s". Did you forget to add "http(s)://"?', implode('', $base ?? $url)));
}
if (null === $base && '' === $url['scheme'].$url['authority']) {
- throw new InvalidArgumentException(sprintf('Invalid URL: no "base_uri" option was provided and host or scheme is missing in "%s".', implode('', $url)));
+ throw new InvalidArgumentException(\sprintf('Invalid URL: no "base_uri" option was provided and host or scheme is missing in "%s".', implode('', $url)));
}
if (null !== $url['scheme']) {
@@ -643,7 +643,7 @@ trait HttpClientTrait
$tail = '';
if (false === $parts = parse_url(\strlen($url) !== strcspn($url, '?#') ? $url : $url.$tail = '#')) {
- throw new InvalidArgumentException(sprintf('Malformed URL "%s".', $url));
+ throw new InvalidArgumentException(\sprintf('Malformed URL "%s".', $url));
}
if ($query) {
@@ -663,7 +663,7 @@ trait HttpClientTrait
if (null !== $scheme) {
if (!isset($allowedSchemes[$scheme = strtolower($scheme)])) {
- throw new InvalidArgumentException(sprintf('Unsupported scheme in "%s": "%s" expected.', $url, implode('" or "', array_keys($allowedSchemes))));
+ throw new InvalidArgumentException(\sprintf('Unsupported scheme in "%s": "%s" expected.', $url, implode('" or "', array_keys($allowedSchemes))));
}
$port = $allowedSchemes[$scheme] === $port ? 0 : $port;
@@ -672,7 +672,7 @@ trait HttpClientTrait
if (null !== $host) {
if (!\defined('INTL_IDNA_VARIANT_UTS46') && preg_match('/[\x80-\xFF]/', $host)) {
- throw new InvalidArgumentException(sprintf('Unsupported IDN "%s", try enabling the "intl" PHP extension or running "composer require symfony/polyfill-intl-idn".', $host));
+ throw new InvalidArgumentException(\sprintf('Unsupported IDN "%s", try enabling the "intl" PHP extension or running "composer require symfony/polyfill-intl-idn".', $host));
}
$host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, \INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host);
@@ -811,7 +811,7 @@ trait HttpClientTrait
} elseif ('https' === $proxy['scheme']) {
$proxyUrl = 'ssl://'.$proxy['host'].':'.($proxy['port'] ?? '443');
} else {
- throw new TransportException(sprintf('Unsupported proxy scheme "%s": "http" or "https" expected.', $proxy['scheme']));
+ throw new TransportException(\sprintf('Unsupported proxy scheme "%s": "http" or "https" expected.', $proxy['scheme']));
}
$noProxy ??= $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? '';
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/HttplugClient.php b/lam/lib/3rdParty/composer/symfony/http-client/HttplugClient.php
index b01579d06..a4c798230 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/HttplugClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/HttplugClient.php
@@ -114,7 +114,7 @@ final class HttplugClient implements ClientInterface, HttpAsyncClient, RequestFa
public function sendAsyncRequest(RequestInterface $request): HttplugPromise
{
if (!$promisePool = $this->promisePool) {
- throw new \LogicException(sprintf('You cannot use "%s()" as the "guzzlehttp/promises" package is not installed. Try running "composer require guzzlehttp/promises".', __METHOD__));
+ throw new \LogicException(\sprintf('You cannot use "%s()" as the "guzzlehttp/promises" package is not installed. Try running "composer require guzzlehttp/promises".', __METHOD__));
}
try {
@@ -165,7 +165,7 @@ final class HttplugClient implements ClientInterface, HttpAsyncClient, RequestFa
} elseif (class_exists(Request::class)) {
$request = new Request($method, $uri);
} else {
- throw new \LogicException(sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
+ throw new \LogicException(\sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
}
$request = $request
@@ -198,7 +198,7 @@ final class HttplugClient implements ClientInterface, HttpAsyncClient, RequestFa
} elseif (\is_resource($content)) {
$stream = $this->streamFactory->createStreamFromResource($content);
} else {
- throw new \InvalidArgumentException(sprintf('"%s()" expects string, resource or StreamInterface, "%s" given.', __METHOD__, get_debug_type($content)));
+ throw new \InvalidArgumentException(\sprintf('"%s()" expects string, resource or StreamInterface, "%s" given.', __METHOD__, get_debug_type($content)));
}
if ($stream->isSeekable()) {
@@ -247,7 +247,7 @@ final class HttplugClient implements ClientInterface, HttpAsyncClient, RequestFa
return new Uri($uri);
}
- throw new \LogicException(sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
+ throw new \LogicException(\sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
}
public function __sleep(): array
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpBody.php b/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpBody.php
index bd995e17d..e88054bf2 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpBody.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpBody.php
@@ -139,7 +139,7 @@ class AmpBody implements RequestBody, InputStream
}
if (!\is_string($data)) {
- throw new TransportException(sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data)));
+ throw new TransportException(\sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data)));
}
return new Success($data);
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpClientState.php b/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpClientState.php
index c5e6968ef..e6c2fa5e5 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpClientState.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpClientState.php
@@ -144,7 +144,7 @@ final class AmpClientState extends ClientState
$options['capture_peer_cert_chain'] && $context = $context->withPeerCapturing();
$options['crypto_method'] && $context = $context->withMinimumVersion($options['crypto_method']);
- $connector = $handleConnector = new class() implements Connector {
+ $connector = $handleConnector = new class implements Connector {
public DnsConnector $connector;
public string $uri;
/** @var resource|null */
@@ -201,11 +201,11 @@ final class AmpClientState extends ClientState
if ($this->maxPendingPushes <= \count($this->pushedResponses[$authority] ?? [])) {
$fifoUrl = key($this->pushedResponses[$authority]);
unset($this->pushedResponses[$authority][$fifoUrl]);
- $this->logger?->debug(sprintf('Evicting oldest pushed response: "%s"', $fifoUrl));
+ $this->logger?->debug(\sprintf('Evicting oldest pushed response: "%s"', $fifoUrl));
}
$url = (string) $request->getUri();
- $this->logger?->debug(sprintf('Queueing pushed response: "%s"', $url));
+ $this->logger?->debug(\sprintf('Queueing pushed response: "%s"', $url));
$this->pushedResponses[$authority][] = [$url, $deferred, $request, $response, [
'proxy' => $options['proxy'],
'bindto' => $options['bindto'],
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpListener.php b/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpListener.php
index 221a8cba9..b50b952f0 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpListener.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Internal/AmpListener.php
@@ -89,7 +89,7 @@ class AmpListener implements EventListener
$this->info['primary_port'] = $stream->getRemoteAddress()->getPort();
$this->info['pretransfer_time'] = microtime(true) - $this->info['start_time'];
- $this->info['debug'] .= sprintf("* Connected to %s (%s) port %d\n", $request->getUri()->getHost(), $host, $this->info['primary_port']);
+ $this->info['debug'] .= \sprintf("* Connected to %s (%s) port %d\n", $request->getUri()->getHost(), $host, $this->info['primary_port']);
if ((isset($this->info['peer_certificate_chain']) || $this->pinSha256) && null !== $tlsInfo = $stream->getTlsInfo()) {
foreach ($tlsInfo->getPeerCertificates() as $cert) {
@@ -104,7 +104,7 @@ class AmpListener implements EventListener
$pin = base64_encode(hash('sha256', $pin, true));
if (!\in_array($pin, $this->pinSha256, true)) {
- throw new TransportException(sprintf('SSL public key does not match pinned public key for "%s".', $this->info['url']));
+ throw new TransportException(\sprintf('SSL public key does not match pinned public key for "%s".', $this->info['url']));
}
}
}
@@ -121,7 +121,7 @@ class AmpListener implements EventListener
$requestUri = $uri->getHost().': '.($uri->getPort() ?? ('https' === $uri->getScheme() ? 443 : 80));
}
- $this->info['debug'] .= sprintf("> %s %s HTTP/%s \r\n", $method, $requestUri, $request->getProtocolVersions()[0]);
+ $this->info['debug'] .= \sprintf("> %s %s HTTP/%s \r\n", $method, $requestUri, $request->getProtocolVersions()[0]);
foreach ($request->getRawHeaders() as [$name, $value]) {
$this->info['debug'] .= $name.': '.$value."\r\n";
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Internal/CurlClientState.php b/lam/lib/3rdParty/composer/symfony/http-client/Internal/CurlClientState.php
index 2a15248eb..60aab7152 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Internal/CurlClientState.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Internal/CurlClientState.php
@@ -50,7 +50,7 @@ final class CurlClientState extends ClientState
curl_multi_setopt($this->handle, \CURLMOPT_PIPELINING, \CURLPIPE_MULTIPLEX);
}
if (\defined('CURLMOPT_MAX_HOST_CONNECTIONS') && 0 < $maxHostConnections) {
- $maxHostConnections = curl_multi_setopt($this->handle, \CURLMOPT_MAX_HOST_CONNECTIONS, $maxHostConnections) ? 4294967295 : $maxHostConnections;
+ $maxHostConnections = curl_multi_setopt($this->handle, \CURLMOPT_MAX_HOST_CONNECTIONS, $maxHostConnections) ? min(50 * $maxHostConnections, 4294967295) : $maxHostConnections;
}
if (\defined('CURLMOPT_MAXCONNECTS') && 0 < $maxHostConnections) {
curl_multi_setopt($this->handle, \CURLMOPT_MAXCONNECTS, $maxHostConnections);
@@ -81,9 +81,8 @@ final class CurlClientState extends ClientState
public function reset(): void
{
foreach ($this->pushedResponses as $url => $response) {
- $this->logger?->debug(sprintf('Unused pushed response: "%s"', $url));
+ $this->logger?->debug(\sprintf('Unused pushed response: "%s"', $url));
curl_multi_remove_handle($this->handle, $response->handle);
- curl_close($response->handle);
}
$this->pushedResponses = [];
@@ -112,7 +111,7 @@ final class CurlClientState extends ClientState
}
if (!isset($headers[':method']) || !isset($headers[':scheme']) || !isset($headers[':authority']) || !isset($headers[':path'])) {
- $this->logger?->debug(sprintf('Rejecting pushed response from "%s": pushed headers are invalid', $origin));
+ $this->logger?->debug(\sprintf('Rejecting pushed response from "%s": pushed headers are invalid', $origin));
return \CURL_PUSH_DENY;
}
@@ -123,7 +122,7 @@ final class CurlClientState extends ClientState
// but this is a MUST in the HTTP/2 RFC; let's restrict pushes to the original host,
// ignoring domains mentioned as alt-name in the certificate for now (same as curl).
if (!str_starts_with($origin, $url.'/')) {
- $this->logger?->debug(sprintf('Rejecting pushed response from "%s": server is not authoritative for "%s"', $origin, $url));
+ $this->logger?->debug(\sprintf('Rejecting pushed response from "%s": server is not authoritative for "%s"', $origin, $url));
return \CURL_PUSH_DENY;
}
@@ -131,11 +130,11 @@ final class CurlClientState extends ClientState
if ($maxPendingPushes <= \count($this->pushedResponses)) {
$fifoUrl = key($this->pushedResponses);
unset($this->pushedResponses[$fifoUrl]);
- $this->logger?->debug(sprintf('Evicting oldest pushed response: "%s"', $fifoUrl));
+ $this->logger?->debug(\sprintf('Evicting oldest pushed response: "%s"', $fifoUrl));
}
$url .= $headers[':path'][0];
- $this->logger?->debug(sprintf('Queueing pushed response: "%s"', $url));
+ $this->logger?->debug(\sprintf('Queueing pushed response: "%s"', $url));
$this->pushedResponses[$url] = new PushedResponse(new CurlResponse($this, $pushed), $headers, $this->openHandles[(int) $parent][1] ?? [], $pushed);
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/MockHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/MockHttpClient.php
index 4ddbc6bc5..093c02714 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/MockHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/MockHttpClient.php
@@ -78,7 +78,7 @@ class MockHttpClient implements HttpClientInterface, ResetInterface
++$this->requestsCount;
if (!$response instanceof ResponseInterface) {
- throw new TransportException(sprintf('The response factory passed to MockHttpClient must return/yield an instance of ResponseInterface, "%s" given.', get_debug_type($response)));
+ throw new TransportException(\sprintf('The response factory passed to MockHttpClient must return/yield an instance of ResponseInterface, "%s" given.', get_debug_type($response)));
}
return MockResponse::fromRequest($method, $url, $options, $response);
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/NativeHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/NativeHttpClient.php
index 7e13cbc56..da01191d4 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/NativeHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/NativeHttpClient.php
@@ -142,7 +142,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
$maxDuration = 0 < $options['max_duration'] ? $options['max_duration'] : \INF;
$onProgress = static function (...$progress) use ($onProgress, &$info, $maxDuration) {
if ($info['total_time'] >= $maxDuration) {
- throw new TransportException(sprintf('Max duration was reached for "%s".', implode('', $info['url'])));
+ throw new TransportException(\sprintf('Max duration was reached for "%s".', implode('', $info['url'])));
}
$progressInfo = $info;
@@ -165,7 +165,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
$maxDuration = $options['max_duration'];
$onProgress = static function () use (&$info, $maxDuration): void {
if ($info['total_time'] >= $maxDuration) {
- throw new TransportException(sprintf('Max duration was reached for "%s".', implode('', $info['url'])));
+ throw new TransportException(\sprintf('Max duration was reached for "%s".', implode('', $info['url'])));
}
};
}
@@ -195,7 +195,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
$this->multi->dnsCache = $options['resolve'] + $this->multi->dnsCache;
}
- $this->logger?->info(sprintf('Request: "%s %s"', $method, implode('', $url)));
+ $this->logger?->info(\sprintf('Request: "%s %s"', $method, implode('', $url)));
if (!isset($options['normalized_headers']['user-agent'])) {
$options['headers'][] = 'User-Agent: Symfony HttpClient (Native)';
@@ -301,7 +301,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
while ('' !== $data = $body(self::$CHUNK_SIZE)) {
if (!\is_string($data)) {
- throw new TransportException(sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data)));
+ throw new TransportException(\sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data)));
}
$result .= $data;
@@ -340,7 +340,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
$now = microtime(true);
if (!$ip = gethostbynamel($host)) {
- throw new TransportException(sprintf('Could not resolve host "%s".', $host));
+ throw new TransportException(\sprintf('Could not resolve host "%s".', $host));
}
$multi->dnsCache[$host] = $ip = $ip[0];
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/NoPrivateNetworkHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/NoPrivateNetworkHttpClient.php
index 4094f9880..fe46cddac 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/NoPrivateNetworkHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/NoPrivateNetworkHttpClient.php
@@ -30,12 +30,12 @@ use Symfony\Contracts\Service\ResetInterface;
*/
final class NoPrivateNetworkHttpClient implements HttpClientInterface, LoggerAwareInterface, ResetInterface
{
- use HttpClientTrait;
use AsyncDecoratorTrait;
+ use HttpClientTrait;
private array $defaultOptions = self::OPTIONS_DEFAULTS;
private HttpClientInterface $client;
- private array|null $subnets;
+ private ?array $subnets;
private int $ipFlags;
private \ArrayObject $dnsCache;
@@ -46,7 +46,7 @@ final class NoPrivateNetworkHttpClient implements HttpClientInterface, LoggerAwa
public function __construct(HttpClientInterface $client, string|array|null $subnets = null)
{
if (!class_exists(IpUtils::class)) {
- throw new \LogicException(sprintf('You cannot use "%s" if the HttpFoundation component is not installed. Try running "composer require symfony/http-foundation".', __CLASS__));
+ throw new \LogicException(\sprintf('You cannot use "%s" if the HttpFoundation component is not installed. Try running "composer require symfony/http-foundation".', __CLASS__));
}
if (null === $subnets) {
@@ -204,7 +204,7 @@ final class NoPrivateNetworkHttpClient implements HttpClientInterface, LoggerAwa
if ($ip = dns_get_record($host, \DNS_AAAA)) {
$ip = $ip[0]['ipv6'];
- } elseif (extension_loaded('sockets')) {
+ } elseif (\extension_loaded('sockets')) {
if (!$info = socket_addrinfo_lookup($host, 0, ['ai_socktype' => \SOCK_STREAM, 'ai_family' => \AF_INET6])) {
return $host;
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Psr18Client.php b/lam/lib/3rdParty/composer/symfony/http-client/Psr18Client.php
index f138f55e8..b0e404b59 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Psr18Client.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Psr18Client.php
@@ -132,7 +132,7 @@ final class Psr18Client implements ClientInterface, RequestFactoryInterface, Str
return new Request($method, $uri);
}
- throw new \LogicException(sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
+ throw new \LogicException(\sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
}
public function createStream(string $content = ''): StreamInterface
@@ -174,7 +174,7 @@ final class Psr18Client implements ClientInterface, RequestFactoryInterface, Str
return new Uri($uri);
}
- throw new \LogicException(sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
+ throw new \LogicException(\sprintf('You cannot use "%s()" as no PSR-17 factories have been found. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', __METHOD__));
}
public function reset(): void
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/AmpResponse.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/AmpResponse.php
index 00001ccec..de949b36a 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/AmpResponse.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/AmpResponse.php
@@ -99,7 +99,8 @@ final class AmpResponse implements ResponseInterface, StreamableInterface
$throttleWatcher = null;
- $this->id = $id = self::$nextId++;
+ $this->id = $id = self::$nextId;
+ self::$nextId = str_increment(self::$nextId);
Loop::defer(static function () use ($request, $multi, $id, &$info, &$headers, $canceller, &$options, $onProgress, &$handle, $logger, &$pause) {
return new Coroutine(self::generateResponse($request, $multi, $id, $info, $headers, $canceller, $options, $onProgress, $handle, $logger, $pause));
});
@@ -222,9 +223,9 @@ final class AmpResponse implements ResponseInterface, StreamableInterface
});
try {
- /* @var Response $response */
+ /** @var Response $response */
if (null === $response = yield from self::getPushedResponse($request, $multi, $info, $headers, $options, $logger)) {
- $logger?->info(sprintf('Request: "%s %s"', $info['http_method'], $info['url']));
+ $logger?->info(\sprintf('Request: "%s %s"', $info['http_method'], $info['url']));
$response = yield from self::followRedirects($request, $multi, $info, $headers, $canceller, $options, $onProgress, $handle, $logger, $pause);
}
@@ -288,7 +289,7 @@ final class AmpResponse implements ResponseInterface, StreamableInterface
return $response;
}
- $urlResolver = new class() {
+ $urlResolver = new class {
use HttpClientTrait {
parseUrl as public;
resolveUrl as public;
@@ -308,7 +309,7 @@ final class AmpResponse implements ResponseInterface, StreamableInterface
return $response;
}
- $logger?->info(sprintf('Redirecting: "%s %s"', $status, $info['url']));
+ $logger?->info(\sprintf('Redirecting: "%s %s"', $status, $info['url']));
try {
// Discard body of redirects
@@ -367,7 +368,7 @@ final class AmpResponse implements ResponseInterface, StreamableInterface
$headers = [];
}
- $h = sprintf('HTTP/%s %s %s', $response->getProtocolVersion(), $response->getStatus(), $response->getReason());
+ $h = \sprintf('HTTP/%s %s %s', $response->getProtocolVersion(), $response->getStatus(), $response->getReason());
$info['debug'] .= "< {$h}\r\n";
$info['response_headers'][] = $h;
@@ -414,14 +415,14 @@ final class AmpResponse implements ResponseInterface, StreamableInterface
foreach ($response->getHeaderArray('vary') as $vary) {
foreach (preg_split('/\s*+,\s*+/', $vary) as $v) {
if ('*' === $v || ($pushedRequest->getHeaderArray($v) !== $request->getHeaderArray($v) && 'accept-encoding' !== strtolower($v))) {
- $logger?->debug(sprintf('Skipping pushed response: "%s"', $info['url']));
+ $logger?->debug(\sprintf('Skipping pushed response: "%s"', $info['url']));
continue 3;
}
}
}
$pushDeferred->resolve();
- $logger?->debug(sprintf('Accepting pushed response: "%s %s"', $info['http_method'], $info['url']));
+ $logger?->debug(\sprintf('Accepting pushed response: "%s %s"', $info['http_method'], $info['url']));
self::addResponseHeaders($response, $info, $headers);
unset($multi->pushedResponses[$authority][$i]);
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/AsyncContext.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/AsyncContext.php
index 4f4d10616..cd8a23afc 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/AsyncContext.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/AsyncContext.php
@@ -167,7 +167,7 @@ final class AsyncContext
}
if (0 < ($info['max_duration'] ?? 0) && 0 < ($info['total_time'] ?? 0)) {
if (0 >= $options['max_duration'] = $info['max_duration'] - $info['total_time']) {
- throw new TransportException(sprintf('Max duration was reached for "%s".', $info['url']));
+ throw new TransportException(\sprintf('Max duration was reached for "%s".', $info['url']));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/AsyncResponse.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/AsyncResponse.php
index 7aa16bcb1..30083369d 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/AsyncResponse.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/AsyncResponse.php
@@ -225,7 +225,7 @@ class AsyncResponse implements ResponseInterface, StreamableInterface
foreach ($responses as $r) {
if (!$r instanceof self) {
- throw new \TypeError(sprintf('"%s::stream()" expects parameter 1 to be an iterable of AsyncResponse objects, "%s" given.', $class ?? static::class, get_debug_type($r)));
+ throw new \TypeError(\sprintf('"%s::stream()" expects parameter 1 to be an iterable of AsyncResponse objects, "%s" given.', $class ?? static::class, get_debug_type($r)));
}
if (null !== $e = $r->info['error'] ?? null) {
@@ -286,7 +286,7 @@ class AsyncResponse implements ResponseInterface, StreamableInterface
} elseif ($chunk->isFirst()) {
$r->yieldedState = self::FIRST_CHUNK_YIELDED;
} elseif (self::FIRST_CHUNK_YIELDED !== $r->yieldedState && null === $chunk->getInformationalStatus()) {
- throw new \LogicException(sprintf('Instance of "%s" is already consumed and cannot be managed by "%s". A decorated client should not call any of the response\'s methods in its "request()" method.', get_debug_type($response), $class ?? static::class));
+ throw new \LogicException(\sprintf('Instance of "%s" is already consumed and cannot be managed by "%s". A decorated client should not call any of the response\'s methods in its "request()" method.', get_debug_type($response), $class ?? static::class));
}
foreach (self::passthru($r->client, $r, $chunk, $asyncMap) as $chunk) {
@@ -336,7 +336,7 @@ class AsyncResponse implements ResponseInterface, StreamableInterface
}
if (!$stream instanceof \Iterator) {
- throw new \LogicException(sprintf('A chunk passthru must return an "Iterator", "%s" returned.', get_debug_type($stream)));
+ throw new \LogicException(\sprintf('A chunk passthru must return an "Iterator", "%s" returned.', get_debug_type($stream)));
}
$r->stream = $stream;
@@ -372,7 +372,7 @@ class AsyncResponse implements ResponseInterface, StreamableInterface
$chunk = $r->stream->current();
if (!$chunk instanceof ChunkInterface) {
- throw new \LogicException(sprintf('A chunk passthru must yield instances of "%s", "%s" yielded.', ChunkInterface::class, get_debug_type($chunk)));
+ throw new \LogicException(\sprintf('A chunk passthru must yield instances of "%s", "%s" yielded.', ChunkInterface::class, get_debug_type($chunk)));
}
if (null !== $chunk->getError()) {
@@ -399,7 +399,7 @@ class AsyncResponse implements ResponseInterface, StreamableInterface
}
if (null !== $r->content && \strlen($content) !== fwrite($r->content, $content)) {
- $chunk = new ErrorChunk($r->offset, new TransportException(sprintf('Failed writing %d bytes to the response buffer.', \strlen($content))));
+ $chunk = new ErrorChunk($r->offset, new TransportException(\sprintf('Failed writing %d bytes to the response buffer.', \strlen($content))));
$r->info['error'] = $chunk->getError();
$r->response->cancel();
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/CommonResponseTrait.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/CommonResponseTrait.php
index 96944c2fc..e6a9e4303 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/CommonResponseTrait.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/CommonResponseTrait.php
@@ -87,11 +87,11 @@ trait CommonResponseTrait
try {
$content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | \JSON_THROW_ON_ERROR);
} catch (\JsonException $e) {
- throw new JsonException($e->getMessage().sprintf(' for "%s".', $this->getInfo('url')), $e->getCode());
+ throw new JsonException($e->getMessage().\sprintf(' for "%s".', $this->getInfo('url')), $e->getCode());
}
if (!\is_array($content)) {
- throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned for "%s".', get_debug_type($content), $this->getInfo('url')));
+ throw new JsonException(\sprintf('JSON content was expected to decode to an array, "%s" returned for "%s".', get_debug_type($content), $this->getInfo('url')));
}
if (null !== $this->content) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/CurlResponse.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/CurlResponse.php
index e5dfd3e52..7e95bbcfb 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/CurlResponse.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/CurlResponse.php
@@ -139,7 +139,7 @@ final class CurlResponse implements ResponseInterface, StreamableInterface
curl_setopt($ch, \CURLOPT_WRITEFUNCTION, static function ($ch, string $data) use ($multi, $id): int {
if ('H' === (curl_getinfo($ch, \CURLINFO_PRIVATE)[0] ?? null)) {
$multi->handlesActivity[$id][] = null;
- $multi->handlesActivity[$id][] = new TransportException(sprintf('Unsupported protocol for "%s"', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
+ $multi->handlesActivity[$id][] = new TransportException(\sprintf('Unsupported protocol for "%s"', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
return 0;
}
@@ -271,7 +271,7 @@ final class CurlResponse implements ResponseInterface, StreamableInterface
if ($responses) {
$response = $responses[array_key_first($responses)];
$multi->handlesActivity[(int) $response->handle][] = null;
- $multi->handlesActivity[(int) $response->handle][] = new TransportException(sprintf('Userland callback cannot use the client nor the response while processing "%s".', curl_getinfo($response->handle, \CURLINFO_EFFECTIVE_URL)));
+ $multi->handlesActivity[(int) $response->handle][] = new TransportException(\sprintf('Userland callback cannot use the client nor the response while processing "%s".', curl_getinfo($response->handle, \CURLINFO_EFFECTIVE_URL)));
}
return;
@@ -447,7 +447,7 @@ final class CurlResponse implements ResponseInterface, StreamableInterface
curl_setopt($ch, \CURLOPT_PRIVATE, $waitFor);
} elseif (null !== $info['redirect_url'] && $logger) {
- $logger->info(sprintf('Redirecting: "%s %s"', $info['http_code'], $info['redirect_url']));
+ $logger->info(\sprintf('Redirecting: "%s %s"', $info['http_code'], $info['redirect_url']));
}
$location = null;
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/MockResponse.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/MockResponse.php
index c6b96c0b1..7bbe5993c 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/MockResponse.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/MockResponse.php
@@ -240,7 +240,7 @@ class MockResponse implements ResponseInterface, StreamableInterface
} elseif ($body instanceof \Closure) {
while ('' !== $data = $body(16372)) {
if (!\is_string($data)) {
- throw new TransportException(sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data)));
+ throw new TransportException(\sprintf('Return value of the "body" option callback must be string, "%s" returned.', get_debug_type($data)));
}
// "notify" upload progress
@@ -296,7 +296,7 @@ class MockResponse implements ResponseInterface, StreamableInterface
if ('' === $chunk = (string) $chunk) {
// simulate an idle timeout
- $response->body[] = new ErrorChunk($offset, sprintf('Idle timeout reached for "%s".', $response->info['url']));
+ $response->body[] = new ErrorChunk($offset, \sprintf('Idle timeout reached for "%s".', $response->info['url']));
} else {
$response->body[] = $chunk;
$offset += \strlen($chunk);
@@ -320,7 +320,7 @@ class MockResponse implements ResponseInterface, StreamableInterface
$onProgress($offset, $dlSize, $response->info);
if ($dlSize && $offset !== $dlSize) {
- throw new TransportException(sprintf('Transfer closed with %d bytes remaining to read.', $dlSize - $offset));
+ throw new TransportException(\sprintf('Transfer closed with %d bytes remaining to read.', $dlSize - $offset));
}
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/StreamWrapper.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/StreamWrapper.php
index a66802704..bf9eebcb8 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/StreamWrapper.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/StreamWrapper.php
@@ -30,7 +30,7 @@ class StreamWrapper
private ResponseInterface $response;
/** @var resource|string|null */
- private $content = null;
+ private $content;
/** @var resource|callable|null */
private $handle;
@@ -56,7 +56,7 @@ class StreamWrapper
}
if (null === $client && !method_exists($response, 'stream')) {
- throw new \InvalidArgumentException(sprintf('Providing a client to "%s()" is required when the response doesn\'t have any "stream()" method.', __CLASS__));
+ throw new \InvalidArgumentException(\sprintf('Providing a client to "%s()" is required when the response doesn\'t have any "stream()" method.', __CLASS__));
}
static $registered = false;
@@ -94,7 +94,7 @@ class StreamWrapper
{
if ('r' !== $mode) {
if ($options & \STREAM_REPORT_ERRORS) {
- trigger_error(sprintf('Invalid mode "%s": only "r" is supported.', $mode), \E_USER_WARNING);
+ trigger_error(\sprintf('Invalid mode "%s": only "r" is supported.', $mode), \E_USER_WARNING);
}
return false;
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/TraceableResponse.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/TraceableResponse.php
index d65c8066d..0137e2117 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/TraceableResponse.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/TraceableResponse.php
@@ -173,7 +173,7 @@ class TraceableResponse implements ResponseInterface, StreamableInterface
foreach ($responses as $r) {
if (!$r instanceof self) {
- throw new \TypeError(sprintf('"%s::stream()" expects parameter 1 to be an iterable of TraceableResponse objects, "%s" given.', TraceableHttpClient::class, get_debug_type($r)));
+ throw new \TypeError(\sprintf('"%s::stream()" expects parameter 1 to be an iterable of TraceableResponse objects, "%s" given.', TraceableHttpClient::class, get_debug_type($r)));
}
$traceableMap[$r->response] = $r;
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Response/TransportResponseTrait.php b/lam/lib/3rdParty/composer/symfony/http-client/Response/TransportResponseTrait.php
index 95f7e9624..4cc110fbc 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Response/TransportResponseTrait.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Response/TransportResponseTrait.php
@@ -183,7 +183,7 @@ trait TransportResponseTrait
unset($responses[$j]);
continue;
} elseif ($elapsedTimeout >= $timeoutMax) {
- $multi->handlesActivity[$j] = [new ErrorChunk($response->offset, sprintf('Idle timeout reached for "%s".', $response->getInfo('url')))];
+ $multi->handlesActivity[$j] = [new ErrorChunk($response->offset, \sprintf('Idle timeout reached for "%s".', $response->getInfo('url')))];
$multi->lastTimeout ??= $lastActivity;
$elapsedTimeout = $timeoutMax;
} else {
@@ -196,12 +196,12 @@ trait TransportResponseTrait
while ($multi->handlesActivity[$j] ?? false) {
if (\is_string($chunk = array_shift($multi->handlesActivity[$j]))) {
if (null !== $response->inflate && false === $chunk = @inflate_add($response->inflate, $chunk)) {
- $multi->handlesActivity[$j] = [null, new TransportException(sprintf('Error while processing content unencoding for "%s".', $response->getInfo('url')))];
+ $multi->handlesActivity[$j] = [null, new TransportException(\sprintf('Error while processing content unencoding for "%s".', $response->getInfo('url')))];
continue;
}
if ('' !== $chunk && null !== $response->content && \strlen($chunk) !== fwrite($response->content, $chunk)) {
- $multi->handlesActivity[$j] = [null, new TransportException(sprintf('Failed writing %d bytes to the response buffer.', \strlen($chunk)))];
+ $multi->handlesActivity[$j] = [null, new TransportException(\sprintf('Failed writing %d bytes to the response buffer.', \strlen($chunk)))];
continue;
}
@@ -233,7 +233,7 @@ trait TransportResponseTrait
} elseif ($chunk instanceof FirstChunk) {
if ($response->logger) {
$info = $response->getInfo();
- $response->logger->info(sprintf('Response: "%s %s"', $info['http_code'], $info['url']));
+ $response->logger->info(\sprintf('Response: "%s %s"', $info['http_code'], $info['url']));
}
$response->inflate = \extension_loaded('zlib') && $response->inflate && 'gzip' === ($response->headers['content-encoding'][0] ?? null) ? inflate_init(\ZLIB_ENCODING_GZIP) : null;
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Retry/GenericRetryStrategy.php b/lam/lib/3rdParty/composer/symfony/http-client/Retry/GenericRetryStrategy.php
index ecfa5cd3c..2ba8b7fad 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Retry/GenericRetryStrategy.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Retry/GenericRetryStrategy.php
@@ -54,22 +54,22 @@ class GenericRetryStrategy implements RetryStrategyInterface
$this->statusCodes = $statusCodes;
if ($delayMs < 0) {
- throw new InvalidArgumentException(sprintf('Delay must be greater than or equal to zero: "%s" given.', $delayMs));
+ throw new InvalidArgumentException(\sprintf('Delay must be greater than or equal to zero: "%s" given.', $delayMs));
}
$this->delayMs = $delayMs;
if ($multiplier < 1) {
- throw new InvalidArgumentException(sprintf('Multiplier must be greater than or equal to one: "%s" given.', $multiplier));
+ throw new InvalidArgumentException(\sprintf('Multiplier must be greater than or equal to one: "%s" given.', $multiplier));
}
$this->multiplier = $multiplier;
if ($maxDelayMs < 0) {
- throw new InvalidArgumentException(sprintf('Max delay must be greater than or equal to zero: "%s" given.', $maxDelayMs));
+ throw new InvalidArgumentException(\sprintf('Max delay must be greater than or equal to zero: "%s" given.', $maxDelayMs));
}
$this->maxDelayMs = $maxDelayMs;
if ($jitter < 0 || $jitter > 1) {
- throw new InvalidArgumentException(sprintf('Jitter must be between 0 and 1: "%s" given.', $jitter));
+ throw new InvalidArgumentException(\sprintf('Jitter must be between 0 and 1: "%s" given.', $jitter));
}
$this->jitter = $jitter;
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/RetryableHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/RetryableHttpClient.php
index d3b779420..76aad263a 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/RetryableHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/RetryableHttpClient.php
@@ -100,7 +100,7 @@ class RetryableHttpClient implements HttpClientInterface, ResetInterface
if ('' !== $context->getInfo('primary_ip')) {
$shouldRetry = $this->strategy->shouldRetry($context, null, $exception);
if (null === $shouldRetry) {
- throw new \LogicException(sprintf('The "%s::shouldRetry()" method must not return null when called with an exception.', $this->strategy::class));
+ throw new \LogicException(\sprintf('The "%s::shouldRetry()" method must not return null when called with an exception.', $this->strategy::class));
}
if (false === $shouldRetry) {
@@ -131,7 +131,7 @@ class RetryableHttpClient implements HttpClientInterface, ResetInterface
}
if (null === $shouldRetry = $this->strategy->shouldRetry($context, $content, null)) {
- throw new \LogicException(sprintf('The "%s::shouldRetry()" method must not return null when called with a body.', $this->strategy::class));
+ throw new \LogicException(\sprintf('The "%s::shouldRetry()" method must not return null when called with a body.', $this->strategy::class));
}
if (false === $shouldRetry) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/ScopingHttpClient.php b/lam/lib/3rdParty/composer/symfony/http-client/ScopingHttpClient.php
index 0d09a3522..da5bdb85b 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/ScopingHttpClient.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/ScopingHttpClient.php
@@ -39,7 +39,7 @@ class ScopingHttpClient implements HttpClientInterface, ResetInterface, LoggerAw
$this->defaultRegexp = $defaultRegexp;
if (null !== $defaultRegexp && !isset($defaultOptionsByRegexp[$defaultRegexp])) {
- throw new InvalidArgumentException(sprintf('No options are mapped to the provided "%s" default regexp.', $defaultRegexp));
+ throw new InvalidArgumentException(\sprintf('No options are mapped to the provided "%s" default regexp.', $defaultRegexp));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Test/HarFileResponseFactory.php b/lam/lib/3rdParty/composer/symfony/http-client/Test/HarFileResponseFactory.php
index 7265709a0..e307861b8 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/Test/HarFileResponseFactory.php
+++ b/lam/lib/3rdParty/composer/symfony/http-client/Test/HarFileResponseFactory.php
@@ -34,7 +34,7 @@ class HarFileResponseFactory
public function __invoke(string $method, string $url, array $options): ResponseInterface
{
if (!is_file($this->archiveFile)) {
- throw new \InvalidArgumentException(sprintf('Invalid file path provided: "%s".', $this->archiveFile));
+ throw new \InvalidArgumentException(\sprintf('Invalid file path provided: "%s".', $this->archiveFile));
}
$json = json_decode(json: file_get_contents($this->archiveFile), associative: true, flags: \JSON_THROW_ON_ERROR);
@@ -77,7 +77,7 @@ class HarFileResponseFactory
return new MockResponse($body, $info);
}
- throw new TransportException(sprintf('File "%s" does not contain a response for HTTP request "%s" "%s".', $this->archiveFile, $method, $url));
+ throw new TransportException(\sprintf('File "%s" does not contain a response for HTTP request "%s" "%s".', $this->archiveFile, $method, $url));
}
/**
@@ -91,7 +91,7 @@ class HarFileResponseFactory
return match ($encoding) {
'base64' => base64_decode($text),
null => $text,
- default => throw new \InvalidArgumentException(sprintf('Unsupported encoding "%s", currently only base64 is supported.', $encoding)),
+ default => throw new \InvalidArgumentException(\sprintf('Unsupported encoding "%s", currently only base64 is supported.', $encoding)),
};
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-client/composer.json b/lam/lib/3rdParty/composer/symfony/http-client/composer.json
index 9c9ee14a4..d36276ce0 100644
--- a/lam/lib/3rdParty/composer/symfony/http-client/composer.json
+++ b/lam/lib/3rdParty/composer/symfony/http-client/composer.json
@@ -26,6 +26,7 @@
"psr/log": "^1|^2|^3",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/http-client-contracts": "~3.4.4|^3.5.2",
+ "symfony/polyfill-php83": "^1.29",
"symfony/service-contracts": "^2.5|^3"
},
"require-dev": {
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/BinaryFileResponse.php b/lam/lib/3rdParty/composer/symfony/http-foundation/BinaryFileResponse.php
index 41a244b81..2c14d3668 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/BinaryFileResponse.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/BinaryFileResponse.php
@@ -229,7 +229,7 @@ class BinaryFileResponse extends Response
$path = $location.substr($path, \strlen($pathPrefix));
// Only set X-Accel-Redirect header if a valid URI can be produced
// as nginx does not serve arbitrary file paths.
- $this->headers->set($type, $path);
+ $this->headers->set($type, rawurlencode($path));
$this->maxlen = 0;
break;
}
@@ -259,13 +259,13 @@ class BinaryFileResponse extends Response
$end = min($end, $fileSize - 1);
if ($start < 0 || $start > $end) {
$this->setStatusCode(416);
- $this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize));
+ $this->headers->set('Content-Range', \sprintf('bytes */%s', $fileSize));
} elseif ($end - $start < $fileSize - 1) {
$this->maxlen = $end < $fileSize ? $end - $start + 1 : -1;
$this->offset = $start;
$this->setStatusCode(206);
- $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $fileSize));
+ $this->headers->set('Content-Range', \sprintf('bytes %s-%s/%s', $start, $end, $fileSize));
$this->headers->set('Content-Length', $end - $start + 1);
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Cookie.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Cookie.php
index 4a3b73608..05c6c62d5 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Cookie.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Cookie.php
@@ -101,7 +101,7 @@ class Cookie
{
// from PHP source code
if ($raw && false !== strpbrk($name, self::RESERVED_CHARS_LIST)) {
- throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name));
+ throw new \InvalidArgumentException(\sprintf('The cookie name "%s" contains invalid characters.', $name));
}
if (empty($name)) {
@@ -211,7 +211,7 @@ class Cookie
public function withRaw(bool $raw = true): static
{
if ($raw && false !== strpbrk($this->name, self::RESERVED_CHARS_LIST)) {
- throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $this->name));
+ throw new \InvalidArgumentException(\sprintf('The cookie name "%s" contains invalid characters.', $this->name));
}
$cookie = clone $this;
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/AccessDeniedException.php b/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/AccessDeniedException.php
index 136d2a9f5..79ab0fce3 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/AccessDeniedException.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/AccessDeniedException.php
@@ -20,6 +20,6 @@ class AccessDeniedException extends FileException
{
public function __construct(string $path)
{
- parent::__construct(sprintf('The file %s could not be accessed', $path));
+ parent::__construct(\sprintf('The file %s could not be accessed', $path));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/FileNotFoundException.php b/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/FileNotFoundException.php
index 31bdf68fe..3a5eb039b 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/FileNotFoundException.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/FileNotFoundException.php
@@ -20,6 +20,6 @@ class FileNotFoundException extends FileException
{
public function __construct(string $path)
{
- parent::__construct(sprintf('The file "%s" does not exist', $path));
+ parent::__construct(\sprintf('The file "%s" does not exist', $path));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/UnexpectedTypeException.php b/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/UnexpectedTypeException.php
index 905bd5962..09b1c7e18 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/UnexpectedTypeException.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/File/Exception/UnexpectedTypeException.php
@@ -15,6 +15,6 @@ class UnexpectedTypeException extends FileException
{
public function __construct(mixed $value, string $expectedType)
{
- parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, get_debug_type($value)));
+ parent::__construct(\sprintf('Expected argument of type %s, %s given', $expectedType, get_debug_type($value)));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/File/File.php b/lam/lib/3rdParty/composer/symfony/http-foundation/File/File.php
index 34ca5a537..c369ecbfb 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/File/File.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/File/File.php
@@ -93,7 +93,7 @@ class File extends \SplFileInfo
restore_error_handler();
}
if (!$renamed) {
- throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
+ throw new FileException(\sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
}
@chmod($target, 0666 & ~umask());
@@ -106,7 +106,7 @@ class File extends \SplFileInfo
$content = file_get_contents($this->getPathname());
if (false === $content) {
- throw new FileException(sprintf('Could not get the content of the file "%s".', $this->getPathname()));
+ throw new FileException(\sprintf('Could not get the content of the file "%s".', $this->getPathname()));
}
return $content;
@@ -116,10 +116,10 @@ class File extends \SplFileInfo
{
if (!is_dir($directory)) {
if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) {
- throw new FileException(sprintf('Unable to create the "%s" directory.', $directory));
+ throw new FileException(\sprintf('Unable to create the "%s" directory.', $directory));
}
} elseif (!is_writable($directory)) {
- throw new FileException(sprintf('Unable to write in the "%s" directory.', $directory));
+ throw new FileException(\sprintf('Unable to write in the "%s" directory.', $directory));
}
$target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/File/UploadedFile.php b/lam/lib/3rdParty/composer/symfony/http-foundation/File/UploadedFile.php
index f475d028d..85aab2872 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/File/UploadedFile.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/File/UploadedFile.php
@@ -174,7 +174,7 @@ class UploadedFile extends File
restore_error_handler();
}
if (!$moved) {
- throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
+ throw new FileException(\sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
}
@chmod($target, 0666 & ~umask());
@@ -264,6 +264,6 @@ class UploadedFile extends File
$maxFilesize = \UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0;
$message = $errors[$errorCode] ?? 'The file "%s" was not uploaded due to an unknown error.';
- return sprintf($message, $this->getClientOriginalName(), $maxFilesize);
+ return \sprintf($message, $this->getClientOriginalName(), $maxFilesize);
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/HeaderBag.php b/lam/lib/3rdParty/composer/symfony/http-foundation/HeaderBag.php
index 4dd777f16..e8072addd 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/HeaderBag.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/HeaderBag.php
@@ -51,7 +51,7 @@ class HeaderBag implements \IteratorAggregate, \Countable, \Stringable
foreach ($headers as $name => $values) {
$name = ucwords($name, '-');
foreach ($values as $value) {
- $content .= sprintf("%-{$max}s %s\r\n", $name.':', $value);
+ $content .= \sprintf("%-{$max}s %s\r\n", $name.':', $value);
}
}
@@ -204,7 +204,7 @@ class HeaderBag implements \IteratorAggregate, \Countable, \Stringable
}
if (false === $date = \DateTimeImmutable::createFromFormat(\DATE_RFC2822, $value)) {
- throw new \RuntimeException(sprintf('The "%s" HTTP header is not parseable (%s).', $key, $value));
+ throw new \RuntimeException(\sprintf('The "%s" HTTP header is not parseable (%s).', $key, $value));
}
return $date;
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/HeaderUtils.php b/lam/lib/3rdParty/composer/symfony/http-foundation/HeaderUtils.php
index 110896e17..ad47f2204 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/HeaderUtils.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/HeaderUtils.php
@@ -165,7 +165,7 @@ class HeaderUtils
public static function makeDisposition(string $disposition, string $filename, string $filenameFallback = ''): string
{
if (!\in_array($disposition, [self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE])) {
- throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE));
+ throw new \InvalidArgumentException(\sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE));
}
if ('' === $filenameFallback) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/InputBag.php b/lam/lib/3rdParty/composer/symfony/http-foundation/InputBag.php
index 5acf35fec..08b927571 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/InputBag.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/InputBag.php
@@ -29,13 +29,13 @@ final class InputBag extends ParameterBag
public function get(string $key, mixed $default = null): string|int|float|bool|null
{
if (null !== $default && !\is_scalar($default) && !$default instanceof \Stringable) {
- throw new \InvalidArgumentException(sprintf('Expected a scalar value as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($default)));
+ throw new \InvalidArgumentException(\sprintf('Expected a scalar value as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($default)));
}
$value = parent::get($key, $this);
if (null !== $value && $this !== $value && !\is_scalar($value) && !$value instanceof \Stringable) {
- throw new BadRequestException(sprintf('Input value "%s" contains a non-scalar value.', $key));
+ throw new BadRequestException(\sprintf('Input value "%s" contains a non-scalar value.', $key));
}
return $this === $value ? $default : $value;
@@ -68,7 +68,7 @@ final class InputBag extends ParameterBag
public function set(string $key, mixed $value): void
{
if (null !== $value && !\is_scalar($value) && !\is_array($value) && !$value instanceof \Stringable) {
- throw new \InvalidArgumentException(sprintf('Expected a scalar, or an array as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($value)));
+ throw new \InvalidArgumentException(\sprintf('Expected a scalar, or an array as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($value)));
}
$this->parameters[$key] = $value;
@@ -112,11 +112,11 @@ final class InputBag extends ParameterBag
}
if (\is_array($value) && !(($options['flags'] ?? 0) & (\FILTER_REQUIRE_ARRAY | \FILTER_FORCE_ARRAY))) {
- throw new BadRequestException(sprintf('Input value "%s" contains an array, but "FILTER_REQUIRE_ARRAY" or "FILTER_FORCE_ARRAY" flags were not set.', $key));
+ throw new BadRequestException(\sprintf('Input value "%s" contains an array, but "FILTER_REQUIRE_ARRAY" or "FILTER_FORCE_ARRAY" flags were not set.', $key));
}
if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) {
- throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
+ throw new \InvalidArgumentException(\sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
}
$options['flags'] ??= 0;
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/IpUtils.php b/lam/lib/3rdParty/composer/symfony/http-foundation/IpUtils.php
index 18b1c5faf..8b52d2a9d 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/IpUtils.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/IpUtils.php
@@ -102,7 +102,7 @@ class IpUtils
return self::setCacheResult($cacheKey, false);
}
- return self::setCacheResult($cacheKey, 0 === substr_compare(sprintf('%032b', ip2long($requestIp)), sprintf('%032b', ip2long($address)), 0, $netmask));
+ return self::setCacheResult($cacheKey, 0 === substr_compare(\sprintf('%032b', ip2long($requestIp)), \sprintf('%032b', ip2long($address)), 0, $netmask));
}
/**
@@ -182,7 +182,7 @@ class IpUtils
*/
public static function anonymize(string $ip): string
{
- /**
+ /*
* If the IP contains a % symbol, then it is a local-link address with scoping according to RFC 4007
* In that case, we only care about the part before the % symbol, as the following functions, can only work with
* the IP address itself. As the scope can leak information (containing interface name), we do not want to
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/JsonResponse.php b/lam/lib/3rdParty/composer/symfony/http-foundation/JsonResponse.php
index 93c5751f2..616bccfee 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/JsonResponse.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/JsonResponse.php
@@ -41,7 +41,7 @@ class JsonResponse extends Response
parent::__construct('', $status, $headers);
if ($json && !\is_string($data) && !is_numeric($data) && !\is_callable([$data, '__toString'])) {
- throw new \TypeError(sprintf('"%s": If $json is set to true, argument $data must be a string or object implementing __toString(), "%s" given.', __METHOD__, get_debug_type($data)));
+ throw new \TypeError(\sprintf('"%s": If $json is set to true, argument $data must be a string or object implementing __toString(), "%s" given.', __METHOD__, get_debug_type($data)));
}
$data ??= new \ArrayObject();
@@ -176,7 +176,7 @@ class JsonResponse extends Response
// Not using application/javascript for compatibility reasons with older browsers.
$this->headers->set('Content-Type', 'text/javascript');
- return $this->setContent(sprintf('/**/%s(%s);', $this->callback, $this->data));
+ return $this->setContent(\sprintf('/**/%s(%s);', $this->callback, $this->data));
}
// Only set the header when there is none or when it equals 'text/javascript' (from a previous update with callback)
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/ParameterBag.php b/lam/lib/3rdParty/composer/symfony/http-foundation/ParameterBag.php
index 48fa4b233..2bd8cb15f 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/ParameterBag.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/ParameterBag.php
@@ -45,7 +45,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
}
if (!\is_array($value = $this->parameters[$key] ?? [])) {
- throw new BadRequestException(sprintf('Unexpected value for parameter "%s": expecting "array", got "%s".', $key, get_debug_type($value)));
+ throw new BadRequestException(\sprintf('Unexpected value for parameter "%s": expecting "array", got "%s".', $key, get_debug_type($value)));
}
return $value;
@@ -141,7 +141,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
{
$value = $this->get($key, $default);
if (!\is_scalar($value) && !$value instanceof \Stringable) {
- throw new UnexpectedValueException(sprintf('Parameter value "%s" cannot be converted to "string".', $key));
+ throw new UnexpectedValueException(\sprintf('Parameter value "%s" cannot be converted to "string".', $key));
}
return (string) $value;
@@ -185,7 +185,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
try {
return $class::from($value);
} catch (\ValueError|\TypeError $e) {
- throw new UnexpectedValueException(sprintf('Parameter "%s" cannot be converted to enum: %s.', $key, $e->getMessage()), $e->getCode(), $e);
+ throw new UnexpectedValueException(\sprintf('Parameter "%s" cannot be converted to enum: %s.', $key, $e->getMessage()), $e->getCode(), $e);
}
}
@@ -212,11 +212,11 @@ class ParameterBag implements \IteratorAggregate, \Countable
}
if (\is_object($value) && !$value instanceof \Stringable) {
- throw new UnexpectedValueException(sprintf('Parameter value "%s" cannot be filtered.', $key));
+ throw new UnexpectedValueException(\sprintf('Parameter value "%s" cannot be filtered.', $key));
}
if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) {
- throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
+ throw new \InvalidArgumentException(\sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
}
$options['flags'] ??= 0;
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/RedirectResponse.php b/lam/lib/3rdParty/composer/symfony/http-foundation/RedirectResponse.php
index 408629e36..220dcf616 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/RedirectResponse.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/RedirectResponse.php
@@ -39,7 +39,7 @@ class RedirectResponse extends Response
$this->setTargetUrl($url);
if (!$this->isRedirect()) {
- throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status));
+ throw new \InvalidArgumentException(\sprintf('The HTTP status code is not a redirect ("%s" given).', $status));
}
if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) {
@@ -71,7 +71,7 @@ class RedirectResponse extends Response
$this->targetUrl = $url;
$this->setContent(
- sprintf('
+ \sprintf('
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Request.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Request.php
index 922014133..ec2d08d1a 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Request.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Request.php
@@ -537,7 +537,7 @@ class Request
}
return
- sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n".
+ \sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n".
$this->headers.
$cookieHeader."\r\n".
$content;
@@ -638,7 +638,7 @@ class Request
*/
public static function setTrustedHosts(array $hostPatterns)
{
- self::$trustedHostPatterns = array_map(fn ($hostPattern) => sprintf('{%s}i', $hostPattern), $hostPatterns);
+ self::$trustedHostPatterns = array_map(fn ($hostPattern) => \sprintf('{%s}i', $hostPattern), $hostPatterns);
// we need to reset trusted hosts on trusted host patterns change
self::$trustedHosts = [];
}
@@ -1160,7 +1160,7 @@ class Request
}
$this->isHostValid = false;
- throw new SuspiciousOperationException(sprintf('Invalid Host "%s".', $host));
+ throw new SuspiciousOperationException(\sprintf('Invalid Host "%s".', $host));
}
if (\count(self::$trustedHostPatterns) > 0) {
@@ -1183,7 +1183,7 @@ class Request
}
$this->isHostValid = false;
- throw new SuspiciousOperationException(sprintf('Untrusted Host "%s".', $host));
+ throw new SuspiciousOperationException(\sprintf('Untrusted Host "%s".', $host));
}
return $host;
@@ -1466,7 +1466,7 @@ class Request
public function getProtocolVersion(): ?string
{
if ($this->isFromTrustedProxy()) {
- preg_match('~^(HTTP/)?([1-9]\.[0-9]) ~', $this->headers->get('Via') ?? '', $matches);
+ preg_match('~^(HTTP/)?([1-9]\.[0-9])\b~', $this->headers->get('Via') ?? '', $matches);
if ($matches) {
return 'HTTP/'.$matches[2];
@@ -1545,7 +1545,7 @@ class Request
}
if (!\is_array($content)) {
- throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned.', get_debug_type($content)));
+ throw new JsonException(\sprintf('JSON content was expected to decode to an array, "%s" returned.', get_debug_type($content)));
}
return new InputBag($content);
@@ -1571,7 +1571,7 @@ class Request
}
if (!\is_array($content)) {
- throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned.', get_debug_type($content)));
+ throw new JsonException(\sprintf('JSON content was expected to decode to an array, "%s" returned.', get_debug_type($content)));
}
return $content;
@@ -1978,7 +1978,7 @@ class Request
$len = \strlen($prefix);
- if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) {
+ if (preg_match(\sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) {
return $match[0];
}
@@ -2070,7 +2070,7 @@ class Request
}
$this->isForwardedValid = false;
- throw new ConflictingHeadersException(sprintf('The request has both a trusted "%s" header and a trusted "%s" header, conflicting with each other. You should either configure your proxy to remove one of them, or configure your project to distrust the offending one.', self::TRUSTED_HEADERS[self::HEADER_FORWARDED], self::TRUSTED_HEADERS[$type]));
+ throw new ConflictingHeadersException(\sprintf('The request has both a trusted "%s" header and a trusted "%s" header, conflicting with each other. You should either configure your proxy to remove one of them, or configure your project to distrust the offending one.', self::TRUSTED_HEADERS[self::HEADER_FORWARDED], self::TRUSTED_HEADERS[$type]));
}
private function normalizeAndFilterClientIps(array $clientIps, string $ip): array
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Response.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Response.php
index a43e7a9ac..e476e29d1 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Response.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Response.php
@@ -241,7 +241,7 @@ class Response
public function __toString(): string
{
return
- sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n".
+ \sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n".
$this->headers."\r\n".
$this->getContent();
}
@@ -393,7 +393,7 @@ class Response
$statusCode ??= $this->statusCode;
// status
- header(sprintf('HTTP/%s %s %s', $this->version, $statusCode, $this->statusText), true, $statusCode);
+ header(\sprintf('HTTP/%s %s %s', $this->version, $statusCode, $this->statusText), true, $statusCode);
return $this;
}
@@ -499,7 +499,7 @@ class Response
{
$this->statusCode = $code;
if ($this->isInvalid()) {
- throw new \InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code));
+ throw new \InvalidArgumentException(\sprintf('The HTTP status code "%s" is not valid.', $code));
}
if (null === $text) {
@@ -1011,7 +1011,7 @@ class Response
public function setCache(array $options): static
{
if ($diff = array_diff(array_keys($options), array_keys(self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES))) {
- throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff)));
+ throw new \InvalidArgumentException(\sprintf('Response does not support the following options: "%s".', implode('", "', $diff)));
}
if (isset($options['etag'])) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/ResponseHeaderBag.php b/lam/lib/3rdParty/composer/symfony/http-foundation/ResponseHeaderBag.php
index 376357d01..8db8dce4e 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/ResponseHeaderBag.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/ResponseHeaderBag.php
@@ -212,7 +212,7 @@ class ResponseHeaderBag extends HeaderBag
public function getCookies(string $format = self::COOKIES_FLAT): array
{
if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) {
- throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY])));
+ throw new \InvalidArgumentException(\sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY])));
}
if (self::COOKIES_ARRAY === $format) {
@@ -240,7 +240,7 @@ class ResponseHeaderBag extends HeaderBag
*/
public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null /* , bool $partitioned = false */)
{
- $partitioned = 6 < \func_num_args() ? \func_get_arg(6) : false;
+ $partitioned = 6 < \func_num_args() ? func_get_arg(6) : false;
$this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite, $partitioned));
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/SessionUtils.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/SessionUtils.php
index 504c5848e..57aa565ff 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/SessionUtils.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/SessionUtils.php
@@ -28,8 +28,8 @@ final class SessionUtils
public static function popSessionCookie(string $sessionName, #[\SensitiveParameter] string $sessionId): ?string
{
$sessionCookie = null;
- $sessionCookiePrefix = sprintf(' %s=', urlencode($sessionName));
- $sessionCookieWithId = sprintf('%s%s;', $sessionCookiePrefix, urlencode($sessionId));
+ $sessionCookiePrefix = \sprintf(' %s=', urlencode($sessionName));
+ $sessionCookieWithId = \sprintf('%s%s;', $sessionCookiePrefix, urlencode($sessionId));
$otherCookies = [];
foreach (headers_list() as $h) {
if (0 !== stripos($h, 'Set-Cookie:')) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php
index 288c24232..fd8562377 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php
@@ -32,7 +32,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess
{
$this->sessionName = $sessionName;
if (!headers_sent() && !\ini_get('session.cache_limiter') && '0' !== \ini_get('session.cache_limiter')) {
- header(sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) \ini_get('session.cache_expire')));
+ header(\sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) \ini_get('session.cache_expire')));
}
return true;
@@ -88,7 +88,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess
{
if (!headers_sent() && filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL)) {
if (!isset($this->sessionName)) {
- throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class));
+ throw new \LogicException(\sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class));
}
$cookie = SessionUtils::popSessionCookie($this->sessionName, $sessionId);
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php
index 411a8d1f0..70ac76248 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php
@@ -22,7 +22,7 @@ class IdentityMarshaller implements MarshallerInterface
{
foreach ($values as $key => $value) {
if (!\is_string($value)) {
- throw new \LogicException(sprintf('%s accepts only string as data.', __METHOD__));
+ throw new \LogicException(\sprintf('%s accepts only string as data.', __METHOD__));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php
index 91a023ddb..9647f42bb 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php
@@ -47,7 +47,7 @@ class MemcachedSessionHandler extends AbstractSessionHandler
$this->memcached = $memcached;
if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime', 'ttl'])) {
- throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff)));
+ throw new \InvalidArgumentException(\sprintf('The following options are not supported "%s".', implode(', ', $diff)));
}
$this->ttl = $options['expiretime'] ?? $options['ttl'] ?? null;
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php
index f8c6151a4..284cd869d 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php
@@ -34,7 +34,7 @@ class NativeFileSessionHandler extends \SessionHandler
if ($count = substr_count($savePath, ';')) {
if ($count > 2) {
- throw new \InvalidArgumentException(sprintf('Invalid argument $savePath \'%s\'.', $savePath));
+ throw new \InvalidArgumentException(\sprintf('Invalid argument $savePath \'%s\'.', $savePath));
}
// characters after last ';' are the path
@@ -42,7 +42,7 @@ class NativeFileSessionHandler extends \SessionHandler
}
if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir, 0777, true) && !is_dir($baseDir)) {
- throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $baseDir));
+ throw new \RuntimeException(\sprintf('Session Storage was not able to create directory "%s".', $baseDir));
}
if ($savePath !== \ini_get('session.save_path')) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
index 9cee76ddf..af5ce10b6 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
@@ -155,7 +155,7 @@ class PdoSessionHandler extends AbstractSessionHandler
{
if ($pdoOrDsn instanceof \PDO) {
if (\PDO::ERRMODE_EXCEPTION !== $pdoOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) {
- throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__));
+ throw new \InvalidArgumentException(\sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__));
}
$this->pdo = $pdoOrDsn;
@@ -222,7 +222,7 @@ class PdoSessionHandler extends AbstractSessionHandler
$table->addColumn($this->timeCol, Types::INTEGER)->setUnsigned(true)->setNotnull(true);
break;
default:
- throw new \DomainException(sprintf('Creating the session table is currently not implemented for PDO driver "%s".', $this->driver));
+ throw new \DomainException(\sprintf('Creating the session table is currently not implemented for PDO driver "%s".', $this->driver));
}
$table->setPrimaryKey([$this->idCol]);
$table->addIndex([$this->lifetimeCol], $this->lifetimeCol.'_idx');
@@ -257,7 +257,7 @@ class PdoSessionHandler extends AbstractSessionHandler
'pgsql' => "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)",
'oci' => "CREATE TABLE $this->table ($this->idCol VARCHAR2(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)",
'sqlsrv' => "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)",
- default => throw new \DomainException(sprintf('Creating the session table is currently not implemented for PDO driver "%s".', $this->driver)),
+ default => throw new \DomainException(\sprintf('Creating the session table is currently not implemented for PDO driver "%s".', $this->driver)),
};
try {
@@ -538,7 +538,7 @@ class PdoSessionHandler extends AbstractSessionHandler
return $dsn;
default:
- throw new \InvalidArgumentException(sprintf('The scheme "%s" is not supported by the PdoSessionHandler URL configuration. Pass a PDO DSN directly.', $params['scheme']));
+ throw new \InvalidArgumentException(\sprintf('The scheme "%s" is not supported by the PdoSessionHandler URL configuration. Pass a PDO DSN directly.', $params['scheme']));
}
}
@@ -734,7 +734,7 @@ class PdoSessionHandler extends AbstractSessionHandler
case 'sqlite':
throw new \DomainException('SQLite does not support advisory locks.');
default:
- throw new \DomainException(sprintf('Advisory locks are currently not implemented for PDO driver "%s".', $this->driver));
+ throw new \DomainException(\sprintf('Advisory locks are currently not implemented for PDO driver "%s".', $this->driver));
}
}
@@ -776,7 +776,7 @@ class PdoSessionHandler extends AbstractSessionHandler
// we already locked when starting transaction
break;
default:
- throw new \DomainException(sprintf('Transactional locks are currently not implemented for PDO driver "%s".', $this->driver));
+ throw new \DomainException(\sprintf('Transactional locks are currently not implemented for PDO driver "%s".', $this->driver));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php
index b696eee4b..78cd4e7c2 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php
@@ -44,7 +44,7 @@ class RedisSessionHandler extends AbstractSessionHandler
array $options = [],
) {
if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) {
- throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff)));
+ throw new \InvalidArgumentException(\sprintf('The following options are not supported "%s".', implode(', ', $diff)));
}
$this->prefix = $options['prefix'] ?? 'sf_s';
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php
index ff5b70d81..43a9eb84e 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php
@@ -49,7 +49,7 @@ class SessionHandlerFactory
return new PdoSessionHandler($connection);
case !\is_string($connection):
- throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', get_debug_type($connection)));
+ throw new \InvalidArgumentException(\sprintf('Unsupported Connection: "%s".', get_debug_type($connection)));
case str_starts_with($connection, 'file://'):
$savePath = substr($connection, 7);
@@ -94,6 +94,6 @@ class SessionHandlerFactory
return new PdoSessionHandler($connection, $options);
}
- throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', $connection));
+ throw new \InvalidArgumentException(\sprintf('Unsupported Connection: "%s".', $connection));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php
index 1f8668744..38afc1257 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php
@@ -24,7 +24,7 @@ class StrictSessionHandler extends AbstractSessionHandler
public function __construct(\SessionHandlerInterface $handler)
{
if ($handler instanceof \SessionUpdateTimestampHandlerInterface) {
- throw new \LogicException(sprintf('"%s" is already an instance of "SessionUpdateTimestampHandlerInterface", you cannot wrap it with "%s".', get_debug_type($handler), self::class));
+ throw new \LogicException(\sprintf('"%s" is already an instance of "SessionUpdateTimestampHandlerInterface", you cannot wrap it with "%s".', get_debug_type($handler), self::class));
}
$this->handler = $handler;
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php
index f02793d3e..65ab34f91 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php
@@ -174,7 +174,7 @@ class MockArraySessionStorage implements SessionStorageInterface
public function getBag(string $name): SessionBagInterface
{
if (!isset($this->bags[$name])) {
- throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name));
+ throw new \InvalidArgumentException(\sprintf('The SessionBagInterface "%s" is not registered.', $name));
}
if (!$this->started) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
index ef6d9d8f8..84c2c4363 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
@@ -35,7 +35,7 @@ class MockFileSessionStorage extends MockArraySessionStorage
$savePath ??= sys_get_temp_dir();
if (!is_dir($savePath) && !@mkdir($savePath, 0777, true) && !is_dir($savePath)) {
- throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $savePath));
+ throw new \RuntimeException(\sprintf('Session Storage was not able to create directory "%s".', $savePath));
}
$this->savePath = $savePath;
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/NativeSessionStorage.php
index f63de5740..c8801cc25 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/NativeSessionStorage.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Session/Storage/NativeSessionStorage.php
@@ -129,7 +129,7 @@ class NativeSessionStorage implements SessionStorageInterface
}
if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL) && headers_sent($file, $line)) {
- throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line));
+ throw new \RuntimeException(\sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line));
}
$sessionId = $_COOKIE[session_name()] ?? null;
@@ -139,7 +139,7 @@ class NativeSessionStorage implements SessionStorageInterface
* ---------- Part 1
*
* The part `[a-zA-Z0-9,-]` is related to the PHP ini directive `session.sid_bits_per_character` defined as 6.
- * See https://www.php.net/manual/en/session.configuration.php#ini.session.sid-bits-per-character.
+ * See https://php.net/session.configuration#ini.session.sid-bits-per-character
* Allowed values are integers such as:
* - 4 for range `a-f0-9`
* - 5 for range `a-v0-9`
@@ -148,7 +148,7 @@ class NativeSessionStorage implements SessionStorageInterface
* ---------- Part 2
*
* The part `{22,250}` is related to the PHP ini directive `session.sid_length`.
- * See https://www.php.net/manual/en/session.configuration.php#ini.session.sid-length.
+ * See https://php.net/session.configuration#ini.session.sid-length
* Allowed values are integers between 22 and 256, but we use 250 for the max.
*
* Where does the 250 come from?
@@ -249,7 +249,7 @@ class NativeSessionStorage implements SessionStorageInterface
$previousHandler = set_error_handler(function ($type, $msg, $file, $line) use (&$previousHandler) {
if (\E_WARNING === $type && str_starts_with($msg, 'session_write_close():')) {
$handler = $this->saveHandler instanceof SessionHandlerProxy ? $this->saveHandler->getHandler() : $this->saveHandler;
- $msg = sprintf('session_write_close(): Failed to write session data with "%s" handler', $handler::class);
+ $msg = \sprintf('session_write_close(): Failed to write session data with "%s" handler', $handler::class);
}
return $previousHandler ? $previousHandler($type, $msg, $file, $line) : false;
@@ -302,7 +302,7 @@ class NativeSessionStorage implements SessionStorageInterface
public function getBag(string $name): SessionBagInterface
{
if (!isset($this->bags[$name])) {
- throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name));
+ throw new \InvalidArgumentException(\sprintf('The SessionBagInterface "%s" is not registered.', $name));
}
if (!$this->started && $this->saveHandler->isActive()) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php
index 6e1142681..8fc9aa2a0 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php
@@ -27,7 +27,7 @@ final class RequestAttributeValueSame extends Constraint
public function toString(): string
{
- return sprintf('has attribute "%s" with value "%s"', $this->name, $this->value);
+ return \sprintf('has attribute "%s" with value "%s"', $this->name, $this->value);
}
/**
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php
index 768007b95..285f45bf7 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php
@@ -32,14 +32,14 @@ final class ResponseCookieValueSame extends Constraint
public function toString(): string
{
- $str = sprintf('has cookie "%s"', $this->name);
+ $str = \sprintf('has cookie "%s"', $this->name);
if ('/' !== $this->path) {
- $str .= sprintf(' with path "%s"', $this->path);
+ $str .= \sprintf(' with path "%s"', $this->path);
}
if ($this->domain) {
- $str .= sprintf(' for domain "%s"', $this->domain);
+ $str .= \sprintf(' for domain "%s"', $this->domain);
}
- $str .= sprintf(' with value "%s"', $this->value);
+ $str .= \sprintf(' with value "%s"', $this->value);
return $str;
}
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php
index 8eccea9d1..a11809d04 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php
@@ -30,12 +30,12 @@ final class ResponseHasCookie extends Constraint
public function toString(): string
{
- $str = sprintf('has cookie "%s"', $this->name);
+ $str = \sprintf('has cookie "%s"', $this->name);
if ('/' !== $this->path) {
- $str .= sprintf(' with path "%s"', $this->path);
+ $str .= \sprintf(' with path "%s"', $this->path);
}
if ($this->domain) {
- $str .= sprintf(' for domain "%s"', $this->domain);
+ $str .= \sprintf(' for domain "%s"', $this->domain);
}
return $str;
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php
index 08522c89c..e5cb48adf 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php
@@ -25,7 +25,7 @@ final class ResponseHasHeader extends Constraint
public function toString(): string
{
- return sprintf('has header "%s"', $this->headerName);
+ return \sprintf('has header "%s"', $this->headerName);
}
/**
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHeaderLocationSame.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHeaderLocationSame.php
index 9286ec715..833ffd9f2 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHeaderLocationSame.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHeaderLocationSame.php
@@ -23,7 +23,7 @@ final class ResponseHeaderLocationSame extends Constraint
public function toString(): string
{
- return sprintf('has header "Location" matching "%s"', $this->expectedValue);
+ return \sprintf('has header "Location" matching "%s"', $this->expectedValue);
}
protected function matches($other): bool
@@ -53,7 +53,7 @@ final class ResponseHeaderLocationSame extends Constraint
}
if (str_starts_with($url, '//')) {
- return sprintf('%s:%s', $this->request->getScheme(), $url);
+ return \sprintf('%s:%s', $this->request->getScheme(), $url);
}
if (str_starts_with($url, '/')) {
diff --git a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php
index 8141df972..02b5921d2 100644
--- a/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php
+++ b/lam/lib/3rdParty/composer/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php
@@ -27,7 +27,7 @@ final class ResponseHeaderSame extends Constraint
public function toString(): string
{
- return sprintf('has header "%s" with value "%s"', $this->headerName, $this->expectedValue);
+ return \sprintf('has header "%s" with value "%s"', $this->headerName, $this->expectedValue);
}
/**
diff --git a/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/Grapheme.php b/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/Grapheme.php
index 5373f1685..f9e9e5741 100644
--- a/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/Grapheme.php
+++ b/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/Grapheme.php
@@ -26,6 +26,7 @@ namespace Symfony\Polyfill\Intl\Grapheme;
* - grapheme_strrpos - Find position (in grapheme units) of last occurrence of a string
* - grapheme_strstr - Returns part of haystack string from the first occurrence of needle to the end of haystack
* - grapheme_substr - Return part of a string
+ * - grapheme_str_split - Splits a string into an array of individual or chunks of graphemes
*
* @author Nicolas Grekas
*
@@ -191,6 +192,37 @@ final class Grapheme
return mb_strstr($s, $needle, $beforeNeedle, 'UTF-8');
}
+ public static function grapheme_str_split($s, $len = 1)
+ {
+ if (0 > $len || 1073741823 < $len) {
+ if (80000 > \PHP_VERSION_ID) {
+ return false;
+ }
+
+ throw new \ValueError('grapheme_str_split(): Argument #2 ($length) must be greater than 0 and less than or equal to 1073741823.');
+ }
+
+ if ('' === $s) {
+ return [];
+ }
+
+ if (!preg_match_all('/('.SYMFONY_GRAPHEME_CLUSTER_RX.')/u', $s, $matches)) {
+ return false;
+ }
+
+ if (1 === $len) {
+ return $matches[0];
+ }
+
+ $chunks = array_chunk($matches[0], $len);
+
+ foreach ($chunks as &$chunk) {
+ $chunk = implode('', $chunk);
+ }
+
+ return $chunks;
+ }
+
private static function grapheme_position($s, $needle, $offset, $mode)
{
$needle = (string) $needle;
diff --git a/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/README.md b/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/README.md
index f55d92c5c..5d7c67875 100644
--- a/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/README.md
+++ b/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/README.md
@@ -21,6 +21,7 @@ This component provides a partial, native PHP implementation of the
- [`grapheme_strstr`](https://php.net/grapheme_strstr): Returns part of haystack string from
the first occurrence of needle to the end of haystack
- [`grapheme_substr`](https://php.net/grapheme_substr): Return part of a string
+- [`grapheme_str_split`](https://php.net/grapheme_str_split): Splits a string into an array of individual or chunks of graphemes
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
diff --git a/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/bootstrap.php b/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/bootstrap.php
index a9ea03c7e..374dbd3a7 100644
--- a/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/bootstrap.php
+++ b/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/bootstrap.php
@@ -11,10 +11,6 @@
use Symfony\Polyfill\Intl\Grapheme as p;
-if (extension_loaded('intl')) {
- return;
-}
-
if (\PHP_VERSION_ID >= 80000) {
return require __DIR__.'/bootstrap80.php';
}
@@ -56,3 +52,6 @@ if (!function_exists('grapheme_strstr')) {
if (!function_exists('grapheme_substr')) {
function grapheme_substr($string, $offset, $length = null) { return p\Grapheme::grapheme_substr($string, $offset, $length); }
}
+if (!function_exists('grapheme_str_split')) {
+ function grapheme_str_split($string, $length = 1) { return p\Grapheme::grapheme_str_split($string, $length); }
+}
diff --git a/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/bootstrap80.php b/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/bootstrap80.php
index b8c078677..d71175530 100644
--- a/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/bootstrap80.php
+++ b/lam/lib/3rdParty/composer/symfony/polyfill-intl-grapheme/bootstrap80.php
@@ -11,6 +11,14 @@
use Symfony\Polyfill\Intl\Grapheme as p;
+if (!function_exists('grapheme_str_split')) {
+ function grapheme_str_split(string $string, int $length = 1): array|false { return p\Grapheme::grapheme_str_split($string, $length); }
+}
+
+if (extension_loaded('intl')) {
+ return;
+}
+
if (!defined('GRAPHEME_EXTR_COUNT')) {
define('GRAPHEME_EXTR_COUNT', 0);
}
diff --git a/lam/lib/3rdParty/composer/symfony/polyfill-php83/Php83.php b/lam/lib/3rdParty/composer/symfony/polyfill-php83/Php83.php
index 3d94b6c32..8b7ee4c70 100644
--- a/lam/lib/3rdParty/composer/symfony/polyfill-php83/Php83.php
+++ b/lam/lib/3rdParty/composer/symfony/polyfill-php83/Php83.php
@@ -35,7 +35,7 @@ final class Php83
throw new \ValueError(sprintf('json_validate(): Argument #2 ($depth) must be less than %d', self::JSON_MAX_DEPTH));
}
- json_decode($json, null, $depth, $flags);
+ json_decode($json, true, $depth, $flags);
return \JSON_ERROR_NONE === json_last_error();
}
diff --git a/lam/lib/3rdParty/composer/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php b/lam/lib/3rdParty/composer/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php
index 7c824fd44..a4a07ad8e 100644
--- a/lam/lib/3rdParty/composer/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php
+++ b/lam/lib/3rdParty/composer/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php
@@ -50,7 +50,7 @@ class PsrHttpFactory implements HttpMessageFactoryInterface
$psr17Factory = match (true) {
class_exists(DiscoveryPsr17Factory::class) => new DiscoveryPsr17Factory(),
class_exists(NyholmPsr17Factory::class) => new NyholmPsr17Factory(),
- default => throw new \LogicException(sprintf('You cannot use the "%s" as no PSR-17 factories have been provided. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', self::class)),
+ default => throw new \LogicException(\sprintf('You cannot use the "%s" as no PSR-17 factories have been provided. Try running "composer require php-http/discovery psr/http-factory-implementation:*".', self::class)),
};
$serverRequestFactory ??= $psr17Factory;
diff --git a/lam/lib/3rdParty/composer/symfony/psr-http-message-bridge/Factory/UploadedFile.php b/lam/lib/3rdParty/composer/symfony/psr-http-message-bridge/Factory/UploadedFile.php
index f680dd5ab..34d405856 100644
--- a/lam/lib/3rdParty/composer/symfony/psr-http-message-bridge/Factory/UploadedFile.php
+++ b/lam/lib/3rdParty/composer/symfony/psr-http-message-bridge/Factory/UploadedFile.php
@@ -59,7 +59,7 @@ class UploadedFile extends BaseUploadedFile
try {
$this->psrUploadedFile->moveTo((string) $target);
} catch (\RuntimeException $e) {
- throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, $e->getMessage()), 0, $e);
+ throw new FileException(\sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, $e->getMessage()), 0, $e);
}
@chmod($target, 0666 & ~umask());
diff --git a/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceLocatorTrait.php b/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceLocatorTrait.php
index b62ec3e53..bbe454843 100644
--- a/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceLocatorTrait.php
+++ b/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceLocatorTrait.php
@@ -26,16 +26,15 @@ class_exists(NotFoundExceptionInterface::class);
*/
trait ServiceLocatorTrait
{
- private array $factories;
private array $loading = [];
private array $providedTypes;
/**
* @param array $factories
*/
- public function __construct(array $factories)
- {
- $this->factories = $factories;
+ public function __construct(
+ private array $factories,
+ ) {
}
public function has(string $id): bool
@@ -91,16 +90,16 @@ trait ServiceLocatorTrait
} else {
$last = array_pop($alternatives);
if ($alternatives) {
- $message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last);
+ $message = \sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last);
} else {
- $message = sprintf('only knows about the "%s" service.', $last);
+ $message = \sprintf('only knows about the "%s" service.', $last);
}
}
if ($this->loading) {
- $message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message);
+ $message = \sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message);
} else {
- $message = sprintf('Service "%s" not found: the current service locator %s', $id, $message);
+ $message = \sprintf('Service "%s" not found: the current service locator %s', $id, $message);
}
return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface {
@@ -109,7 +108,7 @@ trait ServiceLocatorTrait
private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface
{
- return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface {
+ return new class(\sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface {
};
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceMethodsSubscriberTrait.php b/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceMethodsSubscriberTrait.php
index 0d89d9f25..844be8907 100644
--- a/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceMethodsSubscriberTrait.php
+++ b/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceMethodsSubscriberTrait.php
@@ -42,18 +42,18 @@ trait ServiceMethodsSubscriberTrait
}
if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) {
- throw new \LogicException(sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name));
+ throw new \LogicException(\sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name));
}
if (!$returnType = $method->getReturnType()) {
- throw new \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class));
+ throw new \LogicException(\sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class));
}
/* @var SubscribedService $attribute */
$attribute = $attribute->newInstance();
$attribute->key ??= self::class.'::'.$method->name;
$attribute->type ??= $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType;
- $attribute->nullable = $returnType->allowsNull();
+ $attribute->nullable = $attribute->nullable ?: $returnType->allowsNull();
if ($attribute->attributes) {
$services[] = $attribute;
diff --git a/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceSubscriberTrait.php b/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceSubscriberTrait.php
index cc3bc321a..ed4cec044 100644
--- a/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceSubscriberTrait.php
+++ b/lam/lib/3rdParty/composer/symfony/service-contracts/ServiceSubscriberTrait.php
@@ -46,18 +46,18 @@ trait ServiceSubscriberTrait
}
if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) {
- throw new \LogicException(sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name));
+ throw new \LogicException(\sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name));
}
if (!$returnType = $method->getReturnType()) {
- throw new \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class));
+ throw new \LogicException(\sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class));
}
/* @var SubscribedService $attribute */
$attribute = $attribute->newInstance();
$attribute->key ??= self::class.'::'.$method->name;
$attribute->type ??= $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType;
- $attribute->nullable = $returnType->allowsNull();
+ $attribute->nullable = $attribute->nullable ?: $returnType->allowsNull();
if ($attribute->attributes) {
$services[] = $attribute;
diff --git a/lam/lib/3rdParty/composer/symfony/service-contracts/Test/ServiceLocatorTestCase.php b/lam/lib/3rdParty/composer/symfony/service-contracts/Test/ServiceLocatorTestCase.php
index 65a3fe337..fdd5b2793 100644
--- a/lam/lib/3rdParty/composer/symfony/service-contracts/Test/ServiceLocatorTestCase.php
+++ b/lam/lib/3rdParty/composer/symfony/service-contracts/Test/ServiceLocatorTestCase.php
@@ -19,6 +19,9 @@ use Symfony\Contracts\Service\ServiceLocatorTrait;
abstract class ServiceLocatorTestCase extends TestCase
{
+ /**
+ * @param array $factories
+ */
protected function getServiceLocator(array $factories): ContainerInterface
{
return new class($factories) implements ContainerInterface {
@@ -72,10 +75,8 @@ abstract class ServiceLocatorTestCase extends TestCase
'foo' => function () use (&$locator) { return $locator->get('bar'); },
]);
- if (!$this->getExpectedException()) {
- $this->expectException(NotFoundExceptionInterface::class);
- $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
- }
+ $this->expectException(NotFoundExceptionInterface::class);
+ $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
$locator->get('foo');
}
diff --git a/lam/lib/3rdParty/composer/symfony/service-contracts/composer.json b/lam/lib/3rdParty/composer/symfony/service-contracts/composer.json
index fc8674a72..bc2e99a8f 100644
--- a/lam/lib/3rdParty/composer/symfony/service-contracts/composer.json
+++ b/lam/lib/3rdParty/composer/symfony/service-contracts/composer.json
@@ -32,7 +32,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "3.5-dev"
+ "dev-main": "3.6-dev"
},
"thanks": {
"name": "symfony/contracts",
diff --git a/lam/lib/3rdParty/composer/symfony/string/AbstractString.php b/lam/lib/3rdParty/composer/symfony/string/AbstractString.php
index f55c72161..45bcf0c03 100644
--- a/lam/lib/3rdParty/composer/symfony/string/AbstractString.php
+++ b/lam/lib/3rdParty/composer/symfony/string/AbstractString.php
@@ -263,7 +263,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public function endsWith(string|iterable $suffix): bool
{
if (\is_string($suffix)) {
- throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
+ throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
}
foreach ($suffix as $s) {
@@ -312,7 +312,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public function equalsTo(string|iterable $string): bool
{
if (\is_string($string)) {
- throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
+ throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
}
foreach ($string as $s) {
@@ -340,7 +340,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public function indexOf(string|iterable $needle, int $offset = 0): ?int
{
if (\is_string($needle)) {
- throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
+ throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
}
$i = \PHP_INT_MAX;
@@ -362,7 +362,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public function indexOfLast(string|iterable $needle, int $offset = 0): ?int
{
if (\is_string($needle)) {
- throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
+ throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
}
$i = null;
@@ -414,7 +414,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public function repeat(int $multiplier): static
{
if (0 > $multiplier) {
- throw new InvalidArgumentException(sprintf('Multiplier must be positive, %d given.', $multiplier));
+ throw new InvalidArgumentException(\sprintf('Multiplier must be positive, %d given.', $multiplier));
}
$str = clone $this;
@@ -481,7 +481,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public function startsWith(string|iterable $prefix): bool
{
if (\is_string($prefix)) {
- throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
+ throw new \TypeError(\sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
}
foreach ($prefix as $prefix) {
diff --git a/lam/lib/3rdParty/composer/symfony/string/AbstractUnicodeString.php b/lam/lib/3rdParty/composer/symfony/string/AbstractUnicodeString.php
index bd84b2565..6ea79938f 100644
--- a/lam/lib/3rdParty/composer/symfony/string/AbstractUnicodeString.php
+++ b/lam/lib/3rdParty/composer/symfony/string/AbstractUnicodeString.php
@@ -124,7 +124,7 @@ abstract class AbstractUnicodeString extends AbstractString
}
if (null === $transliterator) {
- throw new InvalidArgumentException(sprintf('Unknown transliteration rule "%s".', $rule));
+ throw new InvalidArgumentException(\sprintf('Unknown transliteration rule "%s".', $rule));
}
self::$transliterators['any-latin/bgn'] = $transliterator;
@@ -142,7 +142,7 @@ abstract class AbstractUnicodeString extends AbstractString
$c = (string) iconv('UTF-8', 'ASCII//TRANSLIT', $c[0]);
if ('' === $c && '' === iconv('UTF-8', 'ASCII//TRANSLIT', '²')) {
- throw new \LogicException(sprintf('"%s" requires a translit-able iconv implementation, try installing "gnu-libiconv" if you\'re using Alpine Linux.', static::class));
+ throw new \LogicException(\sprintf('"%s" requires a translit-able iconv implementation, try installing "gnu-libiconv" if you\'re using Alpine Linux.', static::class));
}
return 1 < \strlen($c) ? ltrim($c, '\'`"^~') : ('' !== $c ? $c : '?');
diff --git a/lam/lib/3rdParty/composer/symfony/string/ByteString.php b/lam/lib/3rdParty/composer/symfony/string/ByteString.php
index 3ebe43c10..e96a184ca 100644
--- a/lam/lib/3rdParty/composer/symfony/string/ByteString.php
+++ b/lam/lib/3rdParty/composer/symfony/string/ByteString.php
@@ -45,7 +45,7 @@ class ByteString extends AbstractString
public static function fromRandom(int $length = 16, ?string $alphabet = null): self
{
if ($length <= 0) {
- throw new InvalidArgumentException(sprintf('A strictly positive length is expected, "%d" given.', $length));
+ throw new InvalidArgumentException(\sprintf('A strictly positive length is expected, "%d" given.', $length));
}
$alphabet ??= self::ALPHABET_ALPHANUMERIC;
@@ -436,7 +436,7 @@ class ByteString extends AbstractString
}
if (!$validEncoding) {
- throw new InvalidArgumentException(sprintf('Invalid "%s" string.', $fromEncoding ?? 'Windows-1252'));
+ throw new InvalidArgumentException(\sprintf('Invalid "%s" string.', $fromEncoding ?? 'Windows-1252'));
}
$u->string = mb_convert_encoding($this->string, 'UTF-8', $fromEncoding ?? 'Windows-1252');
diff --git a/lam/lib/3rdParty/composer/symfony/string/Inflector/EnglishInflector.php b/lam/lib/3rdParty/composer/symfony/string/Inflector/EnglishInflector.php
index 73db80c6f..b9d74c004 100644
--- a/lam/lib/3rdParty/composer/symfony/string/Inflector/EnglishInflector.php
+++ b/lam/lib/3rdParty/composer/symfony/string/Inflector/EnglishInflector.php
@@ -25,9 +25,15 @@ final class EnglishInflector implements InflectorInterface
// Fourth entry: Whether the suffix may succeed a consonant
// Fifth entry: singular suffix, normal
+ // nodes (node)
+ ['sedon', 5, true, true, 'node'],
+
// bacteria (bacterium)
['airetcab', 8, true, true, 'bacterium'],
+ // issues (issue)
+ ['seussi', 6, true, true, 'issue'],
+
// corpora (corpus)
['aroproc', 7, true, true, 'corpus'],
@@ -166,6 +172,9 @@ final class EnglishInflector implements InflectorInterface
// edges (edge)
['segd', 4, true, true, 'dge'],
+ // outages (outage) - specific fix to avoid 'outag'
+ ['segatuo', 7, true, true, 'outage'],
+
// roses (rose), garages (garage), cassettes (cassette),
// waltzes (waltz), heroes (hero), bushes (bush), arches (arch),
// shoes (shoe)
@@ -196,6 +205,9 @@ final class EnglishInflector implements InflectorInterface
// Fourth entry: Whether the suffix may succeed a consonant
// Fifth entry: plural suffix, normal
+ // nodes (node)
+ ['edon', 4, true, true, 'nodes'],
+
// axes (axis)
['sixa', 4, false, false, 'axes'],
diff --git a/lam/lib/3rdParty/composer/symfony/string/LazyString.php b/lam/lib/3rdParty/composer/symfony/string/LazyString.php
index 3d893ef9e..b89ec4df1 100644
--- a/lam/lib/3rdParty/composer/symfony/string/LazyString.php
+++ b/lam/lib/3rdParty/composer/symfony/string/LazyString.php
@@ -26,7 +26,7 @@ class LazyString implements \Stringable, \JsonSerializable
public static function fromCallable(callable|array $callback, mixed ...$arguments): static
{
if (\is_array($callback) && !\is_callable($callback) && !(($callback[0] ?? null) instanceof \Closure || 2 < \count($callback))) {
- throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a callable or a [Closure, method] lazy-callable, "%s" given.', __METHOD__, '['.implode(', ', array_map('get_debug_type', $callback)).']'));
+ throw new \TypeError(\sprintf('Argument 1 passed to "%s()" must be a callable or a [Closure, method] lazy-callable, "%s" given.', __METHOD__, '['.implode(', ', array_map('get_debug_type', $callback)).']'));
}
$lazyString = new static();
@@ -94,7 +94,7 @@ class LazyString implements \Stringable, \JsonSerializable
$r = new \ReflectionFunction($this->value);
$callback = $r->getStaticVariables()['callback'];
- $e = new \TypeError(sprintf('Return value of %s() passed to %s::fromCallable() must be of the type string, %s returned.', $callback, static::class, $type));
+ $e = new \TypeError(\sprintf('Return value of %s() passed to %s::fromCallable() must be of the type string, %s returned.', $callback, static::class, $type));
}
throw $e;
diff --git a/lam/lib/3rdParty/composer/symfony/string/Slugger/AsciiSlugger.php b/lam/lib/3rdParty/composer/symfony/string/Slugger/AsciiSlugger.php
index a9693d494..d0c338682 100644
--- a/lam/lib/3rdParty/composer/symfony/string/Slugger/AsciiSlugger.php
+++ b/lam/lib/3rdParty/composer/symfony/string/Slugger/AsciiSlugger.php
@@ -95,7 +95,7 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
public function withEmoji(bool|string $emoji = true): static
{
if (false !== $emoji && !class_exists(EmojiTransliterator::class)) {
- throw new \LogicException(sprintf('You cannot use the "%s()" method as the "symfony/intl" package is not installed. Try running "composer require symfony/intl".', __METHOD__));
+ throw new \LogicException(\sprintf('You cannot use the "%s()" method as the "symfony/intl" package is not installed. Try running "composer require symfony/intl".', __METHOD__));
}
$new = clone $this;
diff --git a/lam/lib/3rdParty/composer/symfony/translation-contracts/Test/TranslatorTest.php b/lam/lib/3rdParty/composer/symfony/translation-contracts/Test/TranslatorTest.php
index 756228af5..da19d09bd 100644
--- a/lam/lib/3rdParty/composer/symfony/translation-contracts/Test/TranslatorTest.php
+++ b/lam/lib/3rdParty/composer/symfony/translation-contracts/Test/TranslatorTest.php
@@ -11,6 +11,8 @@
namespace Symfony\Contracts\Translation\Test;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\RequiresPhpExtension;
use PHPUnit\Framework\TestCase;
use Symfony\Contracts\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorTrait;
@@ -45,7 +47,7 @@ class TranslatorTest extends TestCase
public function getTranslator(): TranslatorInterface
{
- return new class() implements TranslatorInterface {
+ return new class implements TranslatorInterface {
use TranslatorTrait;
};
}
@@ -53,6 +55,7 @@ class TranslatorTest extends TestCase
/**
* @dataProvider getTransTests
*/
+ #[DataProvider('getTransTests')]
public function testTrans($expected, $id, $parameters)
{
$translator = $this->getTranslator();
@@ -63,6 +66,7 @@ class TranslatorTest extends TestCase
/**
* @dataProvider getTransChoiceTests
*/
+ #[DataProvider('getTransChoiceTests')]
public function testTransChoiceWithExplicitLocale($expected, $id, $number)
{
$translator = $this->getTranslator();
@@ -75,6 +79,8 @@ class TranslatorTest extends TestCase
*
* @dataProvider getTransChoiceTests
*/
+ #[DataProvider('getTransChoiceTests')]
+ #[RequiresPhpExtension('intl')]
public function testTransChoiceWithDefaultLocale($expected, $id, $number)
{
$translator = $this->getTranslator();
@@ -85,6 +91,7 @@ class TranslatorTest extends TestCase
/**
* @dataProvider getTransChoiceTests
*/
+ #[DataProvider('getTransChoiceTests')]
public function testTransChoiceWithEnUsPosix($expected, $id, $number)
{
$translator = $this->getTranslator();
@@ -103,6 +110,7 @@ class TranslatorTest extends TestCase
/**
* @requires extension intl
*/
+ #[RequiresPhpExtension('intl')]
public function testGetLocaleReturnsDefaultLocaleIfNotSet()
{
$translator = $this->getTranslator();
@@ -139,6 +147,7 @@ class TranslatorTest extends TestCase
/**
* @dataProvider getInterval
*/
+ #[DataProvider('getInterval')]
public function testInterval($expected, $number, $interval)
{
$translator = $this->getTranslator();
@@ -164,6 +173,7 @@ class TranslatorTest extends TestCase
/**
* @dataProvider getChooseTests
*/
+ #[DataProvider('getChooseTests')]
public function testChoose($expected, $id, $number, $locale = null)
{
$translator = $this->getTranslator();
@@ -181,6 +191,7 @@ class TranslatorTest extends TestCase
/**
* @dataProvider getNonMatchingMessages
*/
+ #[DataProvider('getNonMatchingMessages')]
public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number)
{
$translator = $this->getTranslator();
@@ -296,6 +307,7 @@ class TranslatorTest extends TestCase
/**
* @dataProvider failingLangcodes
*/
+ #[DataProvider('failingLangcodes')]
public function testFailedLangcodes($nplural, $langCodes)
{
$matrix = $this->generateTestData($langCodes);
@@ -305,6 +317,7 @@ class TranslatorTest extends TestCase
/**
* @dataProvider successLangcodes
*/
+ #[DataProvider('successLangcodes')]
public function testLangcodes($nplural, $langCodes)
{
$matrix = $this->generateTestData($langCodes);
@@ -359,14 +372,14 @@ class TranslatorTest extends TestCase
if ($expectSuccess) {
$this->assertCount($nplural, $indexes, "Langcode '$langCode' has '$nplural' plural forms.");
} else {
- $this->assertNotEquals((int) $nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms.");
+ $this->assertNotCount($nplural, $indexes, "Langcode '$langCode' has '$nplural' plural forms.");
}
}
}
protected function generateTestData($langCodes)
{
- $translator = new class() {
+ $translator = new class {
use TranslatorTrait {
getPluralizationRule as public;
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation-contracts/TranslatorTrait.php b/lam/lib/3rdParty/composer/symfony/translation-contracts/TranslatorTrait.php
index 63f6fb333..06210b0ed 100644
--- a/lam/lib/3rdParty/composer/symfony/translation-contracts/TranslatorTrait.php
+++ b/lam/lib/3rdParty/composer/symfony/translation-contracts/TranslatorTrait.php
@@ -111,7 +111,7 @@ EOF;
return strtr($standardRules[0], $parameters);
}
- $message = sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number);
+ $message = \sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number);
if (class_exists(InvalidArgumentException::class)) {
throw new InvalidArgumentException($message);
diff --git a/lam/lib/3rdParty/composer/symfony/translation-contracts/composer.json b/lam/lib/3rdParty/composer/symfony/translation-contracts/composer.json
index 181651e0d..b7220b84c 100644
--- a/lam/lib/3rdParty/composer/symfony/translation-contracts/composer.json
+++ b/lam/lib/3rdParty/composer/symfony/translation-contracts/composer.json
@@ -27,7 +27,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "3.5-dev"
+ "dev-main": "3.6-dev"
},
"thanks": {
"name": "symfony/contracts",
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Catalogue/AbstractOperation.php b/lam/lib/3rdParty/composer/symfony/translation/Catalogue/AbstractOperation.php
index 7dff58ff4..32fc5813c 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Catalogue/AbstractOperation.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Catalogue/AbstractOperation.php
@@ -97,7 +97,7 @@ abstract class AbstractOperation implements OperationInterface
public function getMessages(string $domain): array
{
if (!\in_array($domain, $this->getDomains())) {
- throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain));
+ throw new InvalidArgumentException(\sprintf('Invalid domain: "%s".', $domain));
}
if (!isset($this->messages[$domain][self::ALL_BATCH])) {
@@ -110,7 +110,7 @@ abstract class AbstractOperation implements OperationInterface
public function getNewMessages(string $domain): array
{
if (!\in_array($domain, $this->getDomains())) {
- throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain));
+ throw new InvalidArgumentException(\sprintf('Invalid domain: "%s".', $domain));
}
if (!isset($this->messages[$domain][self::NEW_BATCH])) {
@@ -123,7 +123,7 @@ abstract class AbstractOperation implements OperationInterface
public function getObsoleteMessages(string $domain): array
{
if (!\in_array($domain, $this->getDomains())) {
- throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain));
+ throw new InvalidArgumentException(\sprintf('Invalid domain: "%s".', $domain));
}
if (!isset($this->messages[$domain][self::OBSOLETE_BATCH])) {
@@ -160,7 +160,7 @@ abstract class AbstractOperation implements OperationInterface
self::OBSOLETE_BATCH => $this->getObsoleteMessages($domain),
self::NEW_BATCH => $this->getNewMessages($domain),
self::ALL_BATCH => $this->getMessages($domain),
- default => throw new \InvalidArgumentException(sprintf('$batch argument must be one of ["%s", "%s", "%s"].', self::ALL_BATCH, self::NEW_BATCH, self::OBSOLETE_BATCH)),
+ default => throw new \InvalidArgumentException(\sprintf('$batch argument must be one of ["%s", "%s", "%s"].', self::ALL_BATCH, self::NEW_BATCH, self::OBSOLETE_BATCH)),
};
if (!$messages || (!$this->source->all($intlDomain) && $this->source->all($domain))) {
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Command/TranslationPullCommand.php b/lam/lib/3rdParty/composer/symfony/translation/Command/TranslationPullCommand.php
index 5d9c092c3..2394b3efe 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Command/TranslationPullCommand.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Command/TranslationPullCommand.php
@@ -92,10 +92,10 @@ final class TranslationPullCommand extends Command
new InputArgument('provider', null !== $defaultProvider ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'The provider to pull translations from.', $defaultProvider),
new InputOption('force', null, InputOption::VALUE_NONE, 'Override existing translations with provider ones (it will delete not synchronized messages).'),
new InputOption('intl-icu', null, InputOption::VALUE_NONE, 'Associated to --force option, it will write messages in "%domain%+intl-icu.%locale%.xlf" files.'),
- new InputOption('domains', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the domains to pull.'),
- new InputOption('locales', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the locales to pull.'),
- new InputOption('format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format.', 'xlf12'),
- new InputOption('as-tree', null, InputOption::VALUE_OPTIONAL, 'Write messages as a tree-like structure. Needs --format=yaml. The given value defines the level where to switch to inline YAML'),
+ new InputOption('domains', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Specify the domains to pull.'),
+ new InputOption('locales', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Specify the locales to pull.'),
+ new InputOption('format', null, InputOption::VALUE_REQUIRED, 'Override the default output format.', 'xlf12'),
+ new InputOption('as-tree', null, InputOption::VALUE_REQUIRED, 'Write messages as a tree-like structure. Needs --format=yaml. The given value defines the level where to switch to inline YAML'),
])
->setHelp(<<<'EOF'
The %command.name%> command pulls translations from the given provider. Only
@@ -163,7 +163,7 @@ EOF
$this->writer->write($operation->getResult(), $format, $writeOptions);
}
- $io->success(sprintf('Local translations has been updated from "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+ $io->success(\sprintf('Local translations has been updated from "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
return 0;
}
@@ -177,7 +177,7 @@ EOF
$this->writer->write($catalogue, $format, $writeOptions);
}
- $io->success(sprintf('New translations from "%s" has been written locally (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+ $io->success(\sprintf('New translations from "%s" has been written locally (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
return 0;
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Command/TranslationPushCommand.php b/lam/lib/3rdParty/composer/symfony/translation/Command/TranslationPushCommand.php
index 1d04adbc9..e0be0f447 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Command/TranslationPushCommand.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Command/TranslationPushCommand.php
@@ -83,8 +83,8 @@ final class TranslationPushCommand extends Command
new InputArgument('provider', null !== $defaultProvider ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'The provider to push translations to.', $defaultProvider),
new InputOption('force', null, InputOption::VALUE_NONE, 'Override existing translations with local ones (it will delete not synchronized messages).'),
new InputOption('delete-missing', null, InputOption::VALUE_NONE, 'Delete translations available on provider but not locally.'),
- new InputOption('domains', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the domains to push.'),
- new InputOption('locales', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the locales to push.', $this->enabledLocales),
+ new InputOption('domains', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Specify the domains to push.'),
+ new InputOption('locales', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Specify the locales to push.', $this->enabledLocales),
])
->setHelp(<<<'EOF'
The %command.name%> command pushes translations to the given provider. Only new
@@ -115,7 +115,7 @@ EOF
$provider = $this->providers->get($input->getArgument('provider'));
if (!$this->enabledLocales) {
- throw new InvalidArgumentException(sprintf('You must define "framework.enabled_locales" or "framework.translator.providers.%s.locales" config key in order to work with translation providers.', parse_url($provider, \PHP_URL_SCHEME)));
+ throw new InvalidArgumentException(\sprintf('You must define "framework.enabled_locales" or "framework.translator.providers.%s.locales" config key in order to work with translation providers.', parse_url($provider, \PHP_URL_SCHEME)));
}
$io = new SymfonyStyle($input, $output);
@@ -139,7 +139,7 @@ EOF
if (!$deleteMissing && $force) {
$provider->write($localTranslations);
- $io->success(sprintf('All local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+ $io->success(\sprintf('All local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
return 0;
}
@@ -149,7 +149,7 @@ EOF
if ($deleteMissing) {
$provider->delete($providerTranslations->diff($localTranslations));
- $io->success(sprintf('Missing translations on "%s" has been deleted (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+ $io->success(\sprintf('Missing translations on "%s" has been deleted (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
// Read provider translations again, after missing translations deletion,
// to avoid push freshly deleted translations.
@@ -164,7 +164,7 @@ EOF
$provider->write($translationsToWrite);
- $io->success(sprintf('%s local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', $force ? 'All' : 'New', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
+ $io->success(\sprintf('%s local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', $force ? 'All' : 'New', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains)));
return 0;
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Command/XliffLintCommand.php b/lam/lib/3rdParty/composer/symfony/translation/Command/XliffLintCommand.php
index ba946389e..7220e24a9 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Command/XliffLintCommand.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Command/XliffLintCommand.php
@@ -57,7 +57,7 @@ class XliffLintCommand extends Command
{
$this
->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')
- ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())))
+ ->addOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())))
->setHelp(<<%command.name% command lints an XLIFF file and outputs to STDOUT
the first encountered syntax error.
@@ -98,7 +98,7 @@ EOF
$filesInfo = [];
foreach ($filenames as $filename) {
if (!$this->isReadable($filename)) {
- throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename));
+ throw new RuntimeException(\sprintf('File or directory "%s" is not readable.', $filename));
}
foreach ($this->getFiles($filename) as $file) {
@@ -124,18 +124,18 @@ EOF
$document->loadXML($content);
if (null !== $targetLanguage = $this->getTargetLanguageFromFile($document)) {
- $normalizedLocalePattern = sprintf('(%s|%s)', preg_quote($targetLanguage, '/'), preg_quote(str_replace('-', '_', $targetLanguage), '/'));
+ $normalizedLocalePattern = \sprintf('(%s|%s)', preg_quote($targetLanguage, '/'), preg_quote(str_replace('-', '_', $targetLanguage), '/'));
// strict file names require translation files to be named '____.locale.xlf'
// otherwise, both '____.locale.xlf' and 'locale.____.xlf' are allowed
// also, the regexp matching must be case-insensitive, as defined for 'target-language' values
// http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language
- $expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.(?i:%s)\.(?:xlf|xliff)/', $normalizedLocalePattern) : sprintf('/^(?:.*\.(?i:%s)|(?i:%s)\..*)\.(?:xlf|xliff)/', $normalizedLocalePattern, $normalizedLocalePattern);
+ $expectedFilenamePattern = $this->requireStrictFileNames ? \sprintf('/^.*\.(?i:%s)\.(?:xlf|xliff)/', $normalizedLocalePattern) : \sprintf('/^(?:.*\.(?i:%s)|(?i:%s)\..*)\.(?:xlf|xliff)/', $normalizedLocalePattern, $normalizedLocalePattern);
if (0 === preg_match($expectedFilenamePattern, basename($file))) {
$errors[] = [
'line' => -1,
'column' => -1,
- 'message' => sprintf('There is a mismatch between the language included in the file name ("%s") and the "%s" value used in the "target-language" attribute of the file.', basename($file), $targetLanguage),
+ 'message' => \sprintf('There is a mismatch between the language included in the file name ("%s") and the "%s" value used in the "target-language" attribute of the file.', basename($file), $targetLanguage),
];
}
}
@@ -160,7 +160,7 @@ EOF
'txt' => $this->displayTxt($io, $files),
'json' => $this->displayJson($io, $files),
'github' => $this->displayTxt($io, $files, true),
- default => throw new InvalidArgumentException(sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))),
+ default => throw new InvalidArgumentException(\sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))),
};
}
@@ -172,25 +172,25 @@ EOF
foreach ($filesInfo as $info) {
if ($info['valid'] && $this->displayCorrectFiles) {
- $io->comment('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
+ $io->comment('OK'.($info['file'] ? \sprintf(' in %s', $info['file']) : ''));
} elseif (!$info['valid']) {
++$erroredFiles;
- $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
+ $io->text(' ERROR '.($info['file'] ? \sprintf(' in %s', $info['file']) : ''));
$io->listing(array_map(function ($error) use ($info, $githubReporter) {
// general document errors have a '-1' line number
$line = -1 === $error['line'] ? null : $error['line'];
$githubReporter?->error($error['message'], $info['file'], $line, null !== $line ? $error['column'] : null);
- return null === $line ? $error['message'] : sprintf('Line %d, Column %d: %s', $line, $error['column'], $error['message']);
+ return null === $line ? $error['message'] : \sprintf('Line %d, Column %d: %s', $line, $error['column'], $error['message']);
}, $info['messages']));
}
}
if (0 === $erroredFiles) {
- $io->success(sprintf('All %d XLIFF files contain valid syntax.', $countFiles));
+ $io->success(\sprintf('All %d XLIFF files contain valid syntax.', $countFiles));
} else {
- $io->warning(sprintf('%d XLIFF files have valid syntax and %d contain errors.', $countFiles - $erroredFiles, $erroredFiles));
+ $io->warning(\sprintf('%d XLIFF files have valid syntax and %d contain errors.', $countFiles - $erroredFiles, $erroredFiles));
}
return min($erroredFiles, 1);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/DataCollectorTranslator.php b/lam/lib/3rdParty/composer/symfony/translation/DataCollectorTranslator.php
index a2832ee8e..7ab3b047b 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/DataCollectorTranslator.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/DataCollectorTranslator.php
@@ -34,7 +34,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
public function __construct(TranslatorInterface $translator)
{
if (!$translator instanceof TranslatorBagInterface || !$translator instanceof LocaleAwareInterface) {
- throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator)));
+ throw new InvalidArgumentException(\sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator)));
}
$this->translator = $translator;
diff --git a/lam/lib/3rdParty/composer/symfony/translation/DependencyInjection/LoggingTranslatorPass.php b/lam/lib/3rdParty/composer/symfony/translation/DependencyInjection/LoggingTranslatorPass.php
index c21552f97..fba86981c 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/DependencyInjection/LoggingTranslatorPass.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/DependencyInjection/LoggingTranslatorPass.php
@@ -37,7 +37,7 @@ class LoggingTranslatorPass implements CompilerPassInterface
$class = $container->getParameterBag()->resolveValue($definition->getClass());
if (!$r = $container->getReflectionClass($class)) {
- throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $translatorAlias));
+ throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $translatorAlias));
}
if (!$r->isSubclassOf(TranslatorInterface::class) || !$r->isSubclassOf(TranslatorBagInterface::class)) {
diff --git a/lam/lib/3rdParty/composer/symfony/translation/DependencyInjection/TranslationExtractorPass.php b/lam/lib/3rdParty/composer/symfony/translation/DependencyInjection/TranslationExtractorPass.php
index 1baf9341e..5e9b5af34 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/DependencyInjection/TranslationExtractorPass.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/DependencyInjection/TranslationExtractorPass.php
@@ -34,7 +34,7 @@ class TranslationExtractorPass implements CompilerPassInterface
foreach ($container->findTaggedServiceIds('translation.extractor', true) as $id => $attributes) {
if (!isset($attributes[0]['alias'])) {
- throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id));
+ throw new RuntimeException(\sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id));
}
$definition->addMethodCall('addExtractor', [$attributes[0]['alias'], new Reference($id)]);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Dumper/FileDumper.php b/lam/lib/3rdParty/composer/symfony/translation/Dumper/FileDumper.php
index e30d4770e..8f3a953e3 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Dumper/FileDumper.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Dumper/FileDumper.php
@@ -57,7 +57,7 @@ abstract class FileDumper implements DumperInterface
if (!file_exists($fullpath)) {
$directory = \dirname($fullpath);
if (!file_exists($directory) && !@mkdir($directory, 0777, true)) {
- throw new RuntimeException(sprintf('Unable to create directory "%s".', $directory));
+ throw new RuntimeException(\sprintf('Unable to create directory "%s".', $directory));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Dumper/PoFileDumper.php b/lam/lib/3rdParty/composer/symfony/translation/Dumper/PoFileDumper.php
index a2d0deb78..acf046c14 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Dumper/PoFileDumper.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Dumper/PoFileDumper.php
@@ -51,14 +51,14 @@ class PoFileDumper extends FileDumper
$sourceRules = $this->getStandardRules($source);
$targetRules = $this->getStandardRules($target);
if (2 == \count($sourceRules) && [] !== $targetRules) {
- $output .= sprintf('msgid "%s"'."\n", $this->escape($sourceRules[0]));
- $output .= sprintf('msgid_plural "%s"'."\n", $this->escape($sourceRules[1]));
+ $output .= \sprintf('msgid "%s"'."\n", $this->escape($sourceRules[0]));
+ $output .= \sprintf('msgid_plural "%s"'."\n", $this->escape($sourceRules[1]));
foreach ($targetRules as $i => $targetRule) {
- $output .= sprintf('msgstr[%d] "%s"'."\n", $i, $this->escape($targetRule));
+ $output .= \sprintf('msgstr[%d] "%s"'."\n", $i, $this->escape($targetRule));
}
} else {
- $output .= sprintf('msgid "%s"'."\n", $this->escape($source));
- $output .= sprintf('msgstr "%s"'."\n", $this->escape($target));
+ $output .= \sprintf('msgid "%s"'."\n", $this->escape($source));
+ $output .= \sprintf('msgstr "%s"'."\n", $this->escape($target));
}
}
@@ -123,7 +123,7 @@ EOF;
$output = null;
foreach ((array) $comments as $comment) {
- $output .= sprintf('#%s %s'."\n", $prefix, $comment);
+ $output .= \sprintf('#%s %s'."\n", $prefix, $comment);
}
return $output;
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Dumper/XliffFileDumper.php b/lam/lib/3rdParty/composer/symfony/translation/Dumper/XliffFileDumper.php
index f5ce96a02..a2dfcd16d 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Dumper/XliffFileDumper.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Dumper/XliffFileDumper.php
@@ -46,7 +46,7 @@ class XliffFileDumper extends FileDumper
return $this->dumpXliff2($defaultLocale, $messages, $domain);
}
- throw new InvalidArgumentException(sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion));
+ throw new InvalidArgumentException(\sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion));
}
protected function getExtension(): string
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Exception/IncompleteDsnException.php b/lam/lib/3rdParty/composer/symfony/translation/Exception/IncompleteDsnException.php
index b304bde01..6c9247f89 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Exception/IncompleteDsnException.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Exception/IncompleteDsnException.php
@@ -16,7 +16,7 @@ class IncompleteDsnException extends InvalidArgumentException
public function __construct(string $message, ?string $dsn = null, ?\Throwable $previous = null)
{
if ($dsn) {
- $message = sprintf('Invalid "%s" provider DSN: ', $dsn).$message;
+ $message = \sprintf('Invalid "%s" provider DSN: ', $dsn).$message;
}
parent::__construct($message, 0, $previous);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Exception/MissingRequiredOptionException.php b/lam/lib/3rdParty/composer/symfony/translation/Exception/MissingRequiredOptionException.php
index 46152e254..8cef03a81 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Exception/MissingRequiredOptionException.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Exception/MissingRequiredOptionException.php
@@ -18,7 +18,7 @@ class MissingRequiredOptionException extends IncompleteDsnException
{
public function __construct(string $option, ?string $dsn = null, ?\Throwable $previous = null)
{
- $message = sprintf('The option "%s" is required but missing.', $option);
+ $message = \sprintf('The option "%s" is required but missing.', $option);
parent::__construct($message, $dsn, $previous);
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Exception/UnsupportedSchemeException.php b/lam/lib/3rdParty/composer/symfony/translation/Exception/UnsupportedSchemeException.php
index 8d3295184..ca18444e4 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Exception/UnsupportedSchemeException.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Exception/UnsupportedSchemeException.php
@@ -43,14 +43,14 @@ class UnsupportedSchemeException extends LogicException
}
$package = self::SCHEME_TO_PACKAGE_MAP[$provider] ?? null;
if ($package && !class_exists($package['class'])) {
- parent::__construct(sprintf('Unable to synchronize translations via "%s" as the provider is not installed. Try running "composer require %s".', $provider, $package['package']));
+ parent::__construct(\sprintf('Unable to synchronize translations via "%s" as the provider is not installed. Try running "composer require %s".', $provider, $package['package']));
return;
}
- $message = sprintf('The "%s" scheme is not supported', $dsn->getScheme());
+ $message = \sprintf('The "%s" scheme is not supported', $dsn->getScheme());
if ($name && $supported) {
- $message .= sprintf('; supported schemes for translation provider "%s" are: "%s"', $name, implode('", "', $supported));
+ $message .= \sprintf('; supported schemes for translation provider "%s" are: "%s"', $name, implode('", "', $supported));
}
parent::__construct($message.'.');
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Extractor/AbstractFileExtractor.php b/lam/lib/3rdParty/composer/symfony/translation/Extractor/AbstractFileExtractor.php
index 4c088b94f..8af022402 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Extractor/AbstractFileExtractor.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Extractor/AbstractFileExtractor.php
@@ -49,7 +49,7 @@ abstract class AbstractFileExtractor
protected function isFile(string $file): bool
{
if (!is_file($file)) {
- throw new InvalidArgumentException(sprintf('The "%s" file does not exist.', $file));
+ throw new InvalidArgumentException(\sprintf('The "%s" file does not exist.', $file));
}
return true;
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Extractor/PhpAstExtractor.php b/lam/lib/3rdParty/composer/symfony/translation/Extractor/PhpAstExtractor.php
index 06fc77de3..a5375f480 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Extractor/PhpAstExtractor.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Extractor/PhpAstExtractor.php
@@ -36,7 +36,7 @@ final class PhpAstExtractor extends AbstractFileExtractor implements ExtractorIn
private string $prefix = '',
) {
if (!class_exists(ParserFactory::class)) {
- throw new \LogicException(sprintf('You cannot use "%s" as the "nikic/php-parser" package is not installed. Try running "composer require nikic/php-parser".', static::class));
+ throw new \LogicException(\sprintf('You cannot use "%s" as the "nikic/php-parser" package is not installed. Try running "composer require nikic/php-parser".', static::class));
}
$this->parser = (new ParserFactory())->createForHostVersion();
@@ -77,7 +77,7 @@ final class PhpAstExtractor extends AbstractFileExtractor implements ExtractorIn
protected function extractFromDirectory(array|string $resource): iterable|Finder
{
if (!class_exists(Finder::class)) {
- throw new \LogicException(sprintf('You cannot use "%s" as the "symfony/finder" package is not installed. Try running "composer require symfony/finder".', static::class));
+ throw new \LogicException(\sprintf('You cannot use "%s" as the "symfony/finder" package is not installed. Try running "composer require symfony/finder".', static::class));
}
return (new Finder())->files()->name('*.php')->in($resource);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Extractor/PhpExtractor.php b/lam/lib/3rdParty/composer/symfony/translation/Extractor/PhpExtractor.php
index 7ff27f7c8..72afe4777 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Extractor/PhpExtractor.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Extractor/PhpExtractor.php
@@ -323,7 +323,7 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface
protected function extractFromDirectory(string|array $directory): iterable
{
if (!class_exists(Finder::class)) {
- throw new \LogicException(sprintf('You cannot use "%s" as the "symfony/finder" package is not installed. Try running "composer require symfony/finder".', static::class));
+ throw new \LogicException(\sprintf('You cannot use "%s" as the "symfony/finder" package is not installed. Try running "composer require symfony/finder".', static::class));
}
$finder = new Finder();
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Extractor/Visitor/ConstraintVisitor.php b/lam/lib/3rdParty/composer/symfony/translation/Extractor/Visitor/ConstraintVisitor.php
index 00fb9eedc..45cae3536 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Extractor/Visitor/ConstraintVisitor.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Extractor/Visitor/ConstraintVisitor.php
@@ -22,7 +22,7 @@ use PhpParser\NodeVisitor;
final class ConstraintVisitor extends AbstractVisitor implements NodeVisitor
{
public function __construct(
- private readonly array $constraintClassNames = []
+ private readonly array $constraintClassNames = [],
) {
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Formatter/IntlFormatter.php b/lam/lib/3rdParty/composer/symfony/translation/Formatter/IntlFormatter.php
index e62de253f..87cb00733 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Formatter/IntlFormatter.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Formatter/IntlFormatter.php
@@ -37,7 +37,7 @@ class IntlFormatter implements IntlFormatterInterface
try {
$this->cache[$locale][$message] = $formatter = new \MessageFormatter($locale, $message);
} catch (\IntlException $e) {
- throw new InvalidArgumentException(sprintf('Invalid message format (error #%d): ', intl_get_error_code()).intl_get_error_message(), 0, $e);
+ throw new InvalidArgumentException(\sprintf('Invalid message format (error #%d): ', intl_get_error_code()).intl_get_error_message(), 0, $e);
}
}
@@ -49,7 +49,7 @@ class IntlFormatter implements IntlFormatterInterface
}
if (false === $message = $formatter->format($parameters)) {
- throw new InvalidArgumentException(sprintf('Unable to format message (error #%s): ', $formatter->getErrorCode()).$formatter->getErrorMessage());
+ throw new InvalidArgumentException(\sprintf('Unable to format message (error #%s): ', $formatter->getErrorCode()).$formatter->getErrorMessage());
}
return $message;
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Loader/CsvFileLoader.php b/lam/lib/3rdParty/composer/symfony/translation/Loader/CsvFileLoader.php
index 93bee730b..9d26611e5 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Loader/CsvFileLoader.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Loader/CsvFileLoader.php
@@ -31,7 +31,7 @@ class CsvFileLoader extends FileLoader
try {
$file = new \SplFileObject($resource, 'rb');
} catch (\RuntimeException $e) {
- throw new NotFoundResourceException(sprintf('Error opening file "%s".', $resource), 0, $e);
+ throw new NotFoundResourceException(\sprintf('Error opening file "%s".', $resource), 0, $e);
}
$file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Loader/FileLoader.php b/lam/lib/3rdParty/composer/symfony/translation/Loader/FileLoader.php
index 877c3bbc7..94f6e2022 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Loader/FileLoader.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Loader/FileLoader.php
@@ -24,11 +24,11 @@ abstract class FileLoader extends ArrayLoader
public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue
{
if (!stream_is_local($resource)) {
- throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource));
}
if (!file_exists($resource)) {
- throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
+ throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource));
}
$messages = $this->loadResource($resource);
@@ -38,7 +38,7 @@ abstract class FileLoader extends ArrayLoader
// not an array
if (!\is_array($messages)) {
- throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('Unable to load file "%s".', $resource));
}
$catalogue = parent::load($messages, $locale, $domain);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Loader/IcuDatFileLoader.php b/lam/lib/3rdParty/composer/symfony/translation/Loader/IcuDatFileLoader.php
index 76e4e7f02..1af864303 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Loader/IcuDatFileLoader.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Loader/IcuDatFileLoader.php
@@ -26,11 +26,11 @@ class IcuDatFileLoader extends IcuResFileLoader
public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue
{
if (!stream_is_local($resource.'.dat')) {
- throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource));
}
if (!file_exists($resource.'.dat')) {
- throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
+ throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource));
}
try {
@@ -40,7 +40,7 @@ class IcuDatFileLoader extends IcuResFileLoader
}
if (!$rb) {
- throw new InvalidResourceException(sprintf('Cannot load resource "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('Cannot load resource "%s".', $resource));
} elseif (intl_is_failure($rb->getErrorCode())) {
throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode());
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Loader/IcuResFileLoader.php b/lam/lib/3rdParty/composer/symfony/translation/Loader/IcuResFileLoader.php
index 949dd9792..8ada43dca 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Loader/IcuResFileLoader.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Loader/IcuResFileLoader.php
@@ -26,11 +26,11 @@ class IcuResFileLoader implements LoaderInterface
public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue
{
if (!stream_is_local($resource)) {
- throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource));
}
if (!is_dir($resource)) {
- throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
+ throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource));
}
try {
@@ -40,7 +40,7 @@ class IcuResFileLoader implements LoaderInterface
}
if (!$rb) {
- throw new InvalidResourceException(sprintf('Cannot load resource "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('Cannot load resource "%s".', $resource));
} elseif (intl_is_failure($rb->getErrorCode())) {
throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode());
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Loader/QtFileLoader.php b/lam/lib/3rdParty/composer/symfony/translation/Loader/QtFileLoader.php
index 235f85ee9..1b167bd6d 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Loader/QtFileLoader.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Loader/QtFileLoader.php
@@ -32,17 +32,17 @@ class QtFileLoader implements LoaderInterface
}
if (!stream_is_local($resource)) {
- throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource));
}
if (!file_exists($resource)) {
- throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
+ throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource));
}
try {
$dom = XmlUtils::loadFile($resource);
} catch (\InvalidArgumentException $e) {
- throw new InvalidResourceException(sprintf('Unable to load "%s".', $resource), $e->getCode(), $e);
+ throw new InvalidResourceException(\sprintf('Unable to load "%s".', $resource), $e->getCode(), $e);
}
$internalErrors = libxml_use_internal_errors(true);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Loader/XliffFileLoader.php b/lam/lib/3rdParty/composer/symfony/translation/Loader/XliffFileLoader.php
index ffe4bbbd8..98c759fae 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Loader/XliffFileLoader.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Loader/XliffFileLoader.php
@@ -36,15 +36,15 @@ class XliffFileLoader implements LoaderInterface
if (!$this->isXmlString($resource)) {
if (!stream_is_local($resource)) {
- throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('This is not a local file "%s".', $resource));
}
if (!file_exists($resource)) {
- throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource));
+ throw new NotFoundResourceException(\sprintf('File "%s" not found.', $resource));
}
if (!is_file($resource)) {
- throw new InvalidResourceException(sprintf('This is neither a file nor an XLIFF string "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('This is neither a file nor an XLIFF string "%s".', $resource));
}
}
@@ -55,11 +55,11 @@ class XliffFileLoader implements LoaderInterface
$dom = XmlUtils::loadFile($resource);
}
} catch (\InvalidArgumentException|XmlParsingException|InvalidXmlException $e) {
- throw new InvalidResourceException(sprintf('Unable to load "%s": ', $resource).$e->getMessage(), $e->getCode(), $e);
+ throw new InvalidResourceException(\sprintf('Unable to load "%s": ', $resource).$e->getMessage(), $e->getCode(), $e);
}
if ($errors = XliffUtils::validateSchema($dom)) {
- throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: ', $resource).XliffUtils::getErrorsAsString($errors));
+ throw new InvalidResourceException(\sprintf('Invalid resource provided: "%s"; Errors: ', $resource).XliffUtils::getErrorsAsString($errors));
}
$catalogue = new MessageCatalogue($locale);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Loader/YamlFileLoader.php b/lam/lib/3rdParty/composer/symfony/translation/Loader/YamlFileLoader.php
index 48e735d16..39d5a0e99 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Loader/YamlFileLoader.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Loader/YamlFileLoader.php
@@ -29,7 +29,7 @@ class YamlFileLoader extends FileLoader
protected function loadResource(string $resource): array
{
if (!isset($this->yamlParser)) {
- if (!class_exists(\Symfony\Component\Yaml\Parser::class)) {
+ if (!class_exists(YamlParser::class)) {
throw new LogicException('Loading translations from the YAML format requires the Symfony Yaml component.');
}
@@ -39,11 +39,11 @@ class YamlFileLoader extends FileLoader
try {
$messages = $this->yamlParser->parseFile($resource, Yaml::PARSE_CONSTANT);
} catch (ParseException $e) {
- throw new InvalidResourceException(sprintf('The file "%s" does not contain valid YAML: ', $resource).$e->getMessage(), 0, $e);
+ throw new InvalidResourceException(\sprintf('The file "%s" does not contain valid YAML: ', $resource).$e->getMessage(), 0, $e);
}
if (null !== $messages && !\is_array($messages)) {
- throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource));
+ throw new InvalidResourceException(\sprintf('Unable to load file "%s".', $resource));
}
return $messages ?: [];
diff --git a/lam/lib/3rdParty/composer/symfony/translation/LoggingTranslator.php b/lam/lib/3rdParty/composer/symfony/translation/LoggingTranslator.php
index 4a560bd6a..629f3f7ad 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/LoggingTranslator.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/LoggingTranslator.php
@@ -30,7 +30,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface,
public function __construct(TranslatorInterface $translator, LoggerInterface $logger)
{
if (!$translator instanceof TranslatorBagInterface || !$translator instanceof LocaleAwareInterface) {
- throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator)));
+ throw new InvalidArgumentException(\sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator)));
}
$this->translator = $translator;
@@ -56,7 +56,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface,
return;
}
- $this->logger->debug(sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale));
+ $this->logger->debug(\sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale));
}
public function getLocale(): string
diff --git a/lam/lib/3rdParty/composer/symfony/translation/MessageCatalogue.php b/lam/lib/3rdParty/composer/symfony/translation/MessageCatalogue.php
index d56f04393..9098619e8 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/MessageCatalogue.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/MessageCatalogue.php
@@ -155,7 +155,7 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
public function addCatalogue(MessageCatalogueInterface $catalogue)
{
if ($catalogue->getLocale() !== $this->locale) {
- throw new LogicException(sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s".', $catalogue->getLocale(), $this->locale));
+ throw new LogicException(\sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s".', $catalogue->getLocale(), $this->locale));
}
foreach ($catalogue->all() as $domain => $messages) {
@@ -190,14 +190,14 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
$c = $catalogue;
while ($c = $c->getFallbackCatalogue()) {
if ($c->getLocale() === $this->getLocale()) {
- throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale()));
+ throw new LogicException(\sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale()));
}
}
$c = $this;
do {
if ($c->getLocale() === $catalogue->getLocale()) {
- throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale()));
+ throw new LogicException(\sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale()));
}
foreach ($catalogue->getResources() as $resource) {
@@ -237,6 +237,16 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
return $this->metadata;
}
+ if (isset($this->metadata[$domain.self::INTL_DOMAIN_SUFFIX])) {
+ if ('' === $key) {
+ return $this->metadata[$domain.self::INTL_DOMAIN_SUFFIX];
+ }
+
+ if (isset($this->metadata[$domain.self::INTL_DOMAIN_SUFFIX][$key])) {
+ return $this->metadata[$domain.self::INTL_DOMAIN_SUFFIX][$key];
+ }
+ }
+
if (isset($this->metadata[$domain])) {
if ('' == $key) {
return $this->metadata[$domain];
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Provider/TranslationProviderCollection.php b/lam/lib/3rdParty/composer/symfony/translation/Provider/TranslationProviderCollection.php
index b917415ba..878998fec 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Provider/TranslationProviderCollection.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Provider/TranslationProviderCollection.php
@@ -44,7 +44,7 @@ final class TranslationProviderCollection
public function get(string $name): ProviderInterface
{
if (!$this->has($name)) {
- throw new InvalidArgumentException(sprintf('Provider "%s" not found. Available: "%s".', $name, (string) $this));
+ throw new InvalidArgumentException(\sprintf('Provider "%s" not found. Available: "%s".', $name, (string) $this));
}
return $this->providers[$name];
diff --git a/lam/lib/3rdParty/composer/symfony/translation/TranslatableMessage.php b/lam/lib/3rdParty/composer/symfony/translation/TranslatableMessage.php
index c591e68c2..8f6063c50 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/TranslatableMessage.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/TranslatableMessage.php
@@ -52,9 +52,13 @@ class TranslatableMessage implements TranslatableInterface
public function trans(TranslatorInterface $translator, ?string $locale = null): string
{
- return $translator->trans($this->getMessage(), array_map(
- static fn ($parameter) => $parameter instanceof TranslatableInterface ? $parameter->trans($translator, $locale) : $parameter,
- $this->getParameters()
- ), $this->getDomain(), $locale);
+ $parameters = $this->getParameters();
+ foreach ($parameters as $k => $v) {
+ if ($v instanceof TranslatableInterface) {
+ $parameters[$k] = $v->trans($translator, $locale);
+ }
+ }
+
+ return $translator->trans($this->getMessage(), $parameters, $this->getDomain(), $locale);
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Translator.php b/lam/lib/3rdParty/composer/symfony/translation/Translator.php
index 1973d079f..d3396c515 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Translator.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Translator.php
@@ -290,7 +290,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleA
$this->initializeCatalogue($locale);
$fallbackContent = $this->getFallbackContent($this->catalogues[$locale]);
- $content = sprintf(<<addFallbackCatalogue($catalogue%s);
@@ -356,10 +356,10 @@ EOF
foreach ($this->resources[$locale] as $resource) {
if (!isset($this->loaders[$resource[0]])) {
if (\is_string($resource[1])) {
- throw new RuntimeException(sprintf('No loader is registered for the "%s" format when loading the "%s" resource.', $resource[0], $resource[1]));
+ throw new RuntimeException(\sprintf('No loader is registered for the "%s" format when loading the "%s" resource.', $resource[0], $resource[1]));
}
- throw new RuntimeException(sprintf('No loader is registered for the "%s" format.', $resource[0]));
+ throw new RuntimeException(\sprintf('No loader is registered for the "%s" format.', $resource[0]));
}
$this->catalogues[$locale]->addCatalogue($this->loaders[$resource[0]]->load($resource[1], $locale, $resource[2]));
}
@@ -438,7 +438,7 @@ EOF
protected function assertValidLocale(string $locale)
{
if (!preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) {
- throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale));
+ throw new InvalidArgumentException(\sprintf('Invalid "%s" locale.', $locale));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Util/XliffUtils.php b/lam/lib/3rdParty/composer/symfony/translation/Util/XliffUtils.php
index 335c34beb..e76e12284 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Util/XliffUtils.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Util/XliffUtils.php
@@ -41,7 +41,7 @@ class XliffUtils
$namespace = $xliff->attributes->getNamedItem('xmlns');
if ($namespace) {
if (0 !== substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34)) {
- throw new InvalidArgumentException(sprintf('Not a valid XLIFF namespace "%s".', $namespace));
+ throw new InvalidArgumentException(\sprintf('Not a valid XLIFF namespace "%s".', $namespace));
}
return substr($namespace, 34);
@@ -113,7 +113,7 @@ class XliffUtils
$errorsAsString = '';
foreach ($xmlErrors as $error) {
- $errorsAsString .= sprintf("[%s %s] %s (in %s - line %d, column %d)\n",
+ $errorsAsString .= \sprintf("[%s %s] %s (in %s - line %d, column %d)\n",
\LIBXML_ERR_WARNING === $error['level'] ? 'WARNING' : 'ERROR',
$error['code'],
$error['message'],
@@ -135,7 +135,7 @@ class XliffUtils
$schemaSource = file_get_contents(__DIR__.'/../Resources/schemas/xliff-core-2.0.xsd');
$xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd';
} else {
- throw new InvalidArgumentException(sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion));
+ throw new InvalidArgumentException(\sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion));
}
return self::fixXmlLocation($schemaSource, $xmlUri);
diff --git a/lam/lib/3rdParty/composer/symfony/translation/Writer/TranslationWriter.php b/lam/lib/3rdParty/composer/symfony/translation/Writer/TranslationWriter.php
index 61e03cb0e..464a83c5b 100644
--- a/lam/lib/3rdParty/composer/symfony/translation/Writer/TranslationWriter.php
+++ b/lam/lib/3rdParty/composer/symfony/translation/Writer/TranslationWriter.php
@@ -59,14 +59,14 @@ class TranslationWriter implements TranslationWriterInterface
public function write(MessageCatalogue $catalogue, string $format, array $options = [])
{
if (!isset($this->dumpers[$format])) {
- throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format));
+ throw new InvalidArgumentException(\sprintf('There is no dumper associated with format "%s".', $format));
}
// get the right dumper
$dumper = $this->dumpers[$format];
if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) {
- throw new RuntimeException(sprintf('Translation Writer was not able to create directory "%s".', $options['path']));
+ throw new RuntimeException(\sprintf('Translation Writer was not able to create directory "%s".', $options['path']));
}
// save
diff --git a/lam/lib/3rdParty/composer/symfony/uid/AbstractUid.php b/lam/lib/3rdParty/composer/symfony/uid/AbstractUid.php
index d556bb732..7eb7f1468 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/AbstractUid.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/AbstractUid.php
@@ -95,7 +95,7 @@ abstract class AbstractUid implements \JsonSerializable, \Stringable
*/
public function toBase58(): string
{
- return strtr(sprintf('%022s', BinaryUtil::toBase($this->toBinary(), BinaryUtil::BASE58)), '0', '1');
+ return strtr(\sprintf('%022s', BinaryUtil::toBase($this->toBinary(), BinaryUtil::BASE58)), '0', '1');
}
/**
@@ -108,7 +108,7 @@ abstract class AbstractUid implements \JsonSerializable, \Stringable
public function toBase32(): string
{
$uid = bin2hex($this->toBinary());
- $uid = sprintf('%02s%04s%04s%04s%04s%04s%04s',
+ $uid = \sprintf('%02s%04s%04s%04s%04s%04s%04s',
base_convert(substr($uid, 0, 2), 16, 32),
base_convert(substr($uid, 2, 5), 16, 32),
base_convert(substr($uid, 7, 5), 16, 32),
diff --git a/lam/lib/3rdParty/composer/symfony/uid/Command/GenerateUlidCommand.php b/lam/lib/3rdParty/composer/symfony/uid/Command/GenerateUlidCommand.php
index 6c8d16387..a41cf2840 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/Command/GenerateUlidCommand.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/Command/GenerateUlidCommand.php
@@ -40,7 +40,7 @@ class GenerateUlidCommand extends Command
->setDefinition([
new InputOption('time', null, InputOption::VALUE_REQUIRED, 'The ULID timestamp: a parsable date/time string'),
new InputOption('count', 'c', InputOption::VALUE_REQUIRED, 'The number of ULID to generate', 1),
- new InputOption('format', 'f', InputOption::VALUE_REQUIRED, sprintf('The ULID output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'base32'),
+ new InputOption('format', 'f', InputOption::VALUE_REQUIRED, \sprintf('The ULID output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'base32'),
])
->setHelp(<<<'EOF'
The %command.name% command generates a ULID.
@@ -71,7 +71,7 @@ EOF
try {
$time = new \DateTimeImmutable($time);
} catch (\Exception $e) {
- $io->error(sprintf('Invalid timestamp "%s": %s', $time, str_replace('DateTimeImmutable::__construct(): ', '', $e->getMessage())));
+ $io->error(\sprintf('Invalid timestamp "%s": %s', $time, str_replace('DateTimeImmutable::__construct(): ', '', $e->getMessage())));
return 1;
}
@@ -82,7 +82,7 @@ EOF
if (\in_array($formatOption, $this->getAvailableFormatOptions())) {
$format = 'to'.ucfirst($formatOption);
} else {
- $io->error(sprintf('Invalid format "%s", supported formats are "%s".', $formatOption, implode('", "', $this->getAvailableFormatOptions())));
+ $io->error(\sprintf('Invalid format "%s", supported formats are "%s".', $formatOption, implode('", "', $this->getAvailableFormatOptions())));
return 1;
}
diff --git a/lam/lib/3rdParty/composer/symfony/uid/Command/GenerateUuidCommand.php b/lam/lib/3rdParty/composer/symfony/uid/Command/GenerateUuidCommand.php
index 6dad923c4..858f44990 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/Command/GenerateUuidCommand.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/Command/GenerateUuidCommand.php
@@ -45,7 +45,7 @@ class GenerateUuidCommand extends Command
new InputOption('namespace', null, InputOption::VALUE_REQUIRED, 'The UUID to use at the namespace for named-based UUIDs, predefined namespaces keywords "dns", "url", "oid" and "x500" are accepted'),
new InputOption('random-based', null, InputOption::VALUE_NONE, 'To generate a random-based UUID'),
new InputOption('count', 'c', InputOption::VALUE_REQUIRED, 'The number of UUID to generate', 1),
- new InputOption('format', 'f', InputOption::VALUE_REQUIRED, sprintf('The UUID output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'rfc4122'),
+ new InputOption('format', 'f', InputOption::VALUE_REQUIRED, \sprintf('The UUID output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'rfc4122'),
])
->setHelp(<<<'EOF'
The %command.name% generates a UUID.
@@ -118,7 +118,7 @@ EOF
try {
$node = Uuid::fromString($node);
} catch (\InvalidArgumentException $e) {
- $io->error(sprintf('Invalid node "%s": %s', $node, $e->getMessage()));
+ $io->error(\sprintf('Invalid node "%s": %s', $node, $e->getMessage()));
return 1;
}
@@ -127,7 +127,7 @@ EOF
try {
new \DateTimeImmutable($time);
} catch (\Exception $e) {
- $io->error(sprintf('Invalid timestamp "%s": %s', $time, str_replace('DateTimeImmutable::__construct(): ', '', $e->getMessage())));
+ $io->error(\sprintf('Invalid timestamp "%s": %s', $time, str_replace('DateTimeImmutable::__construct(): ', '', $e->getMessage())));
return 1;
}
@@ -140,7 +140,7 @@ EOF
try {
$namespace = Uuid::fromString($namespace);
} catch (\InvalidArgumentException $e) {
- $io->error(sprintf('Invalid namespace "%s": %s', $namespace, $e->getMessage()));
+ $io->error(\sprintf('Invalid namespace "%s": %s', $namespace, $e->getMessage()));
return 1;
}
@@ -171,7 +171,7 @@ EOF
if (\in_array($formatOption, $this->getAvailableFormatOptions())) {
$format = 'to'.ucfirst($formatOption);
} else {
- $io->error(sprintf('Invalid format "%s", supported formats are "%s".', $formatOption, implode('", "', $this->getAvailableFormatOptions())));
+ $io->error(\sprintf('Invalid format "%s", supported formats are "%s".', $formatOption, implode('", "', $this->getAvailableFormatOptions())));
return 1;
}
diff --git a/lam/lib/3rdParty/composer/symfony/uid/Factory/UuidFactory.php b/lam/lib/3rdParty/composer/symfony/uid/Factory/UuidFactory.php
index d1935c4ba..f95082d2c 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/Factory/UuidFactory.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/Factory/UuidFactory.php
@@ -72,7 +72,7 @@ class UuidFactory
$namespace ??= $this->nameBasedNamespace;
if (null === $namespace) {
- throw new \LogicException(sprintf('A namespace should be defined when using "%s()".', __METHOD__));
+ throw new \LogicException(\sprintf('A namespace should be defined when using "%s()".', __METHOD__));
}
return new NameBasedUuidFactory($this->nameBasedClass, $this->getNamespace($namespace));
diff --git a/lam/lib/3rdParty/composer/symfony/uid/Ulid.php b/lam/lib/3rdParty/composer/symfony/uid/Ulid.php
index 5359067af..87f604a11 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/Ulid.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/Ulid.php
@@ -36,7 +36,7 @@ class Ulid extends AbstractUid implements TimeBasedUidInterface
$this->uid = $ulid;
} else {
if (!self::isValid($ulid)) {
- throw new \InvalidArgumentException(sprintf('Invalid ULID: "%s".', $ulid));
+ throw new \InvalidArgumentException(\sprintf('Invalid ULID: "%s".', $ulid));
}
$this->uid = strtoupper($ulid);
@@ -73,7 +73,7 @@ class Ulid extends AbstractUid implements TimeBasedUidInterface
}
$ulid = bin2hex($ulid);
- $ulid = sprintf('%02s%04s%04s%04s%04s%04s%04s',
+ $ulid = \sprintf('%02s%04s%04s%04s%04s%04s%04s',
base_convert(substr($ulid, 0, 2), 16, 32),
base_convert(substr($ulid, 2, 5), 16, 32),
base_convert(substr($ulid, 7, 5), 16, 32),
@@ -101,7 +101,7 @@ class Ulid extends AbstractUid implements TimeBasedUidInterface
{
$ulid = strtr($this->uid, 'ABCDEFGHJKMNPQRSTVWXYZ', 'abcdefghijklmnopqrstuv');
- $ulid = sprintf('%02s%05s%05s%05s%05s%05s%05s',
+ $ulid = \sprintf('%02s%05s%05s%05s%05s%05s%05s',
base_convert(substr($ulid, 0, 2), 32, 16),
base_convert(substr($ulid, 2, 4), 32, 16),
base_convert(substr($ulid, 6, 4), 32, 16),
@@ -133,7 +133,7 @@ class Ulid extends AbstractUid implements TimeBasedUidInterface
if (\PHP_INT_SIZE >= 8) {
$time = (string) hexdec(base_convert($time, 32, 16));
} else {
- $time = sprintf('%02s%05s%05s',
+ $time = \sprintf('%02s%05s%05s',
base_convert(substr($time, 0, 2), 32, 16),
base_convert(substr($time, 2, 4), 32, 16),
base_convert(substr($time, 6, 4), 32, 16)
@@ -190,14 +190,14 @@ class Ulid extends AbstractUid implements TimeBasedUidInterface
$time = base_convert($time, 10, 32);
} else {
$time = str_pad(bin2hex(BinaryUtil::fromBase($time, BinaryUtil::BASE10)), 12, '0', \STR_PAD_LEFT);
- $time = sprintf('%s%04s%04s',
+ $time = \sprintf('%s%04s%04s',
base_convert(substr($time, 0, 2), 16, 32),
base_convert(substr($time, 2, 5), 16, 32),
base_convert(substr($time, 7, 5), 16, 32)
);
}
- return strtr(sprintf('%010s%04s%04s%04s%04s',
+ return strtr(\sprintf('%010s%04s%04s%04s%04s',
$time,
base_convert(self::$rand[1], 10, 32),
base_convert(self::$rand[2], 10, 32),
diff --git a/lam/lib/3rdParty/composer/symfony/uid/Uuid.php b/lam/lib/3rdParty/composer/symfony/uid/Uuid.php
index 0c4cdf8c1..85968993d 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/Uuid.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/Uuid.php
@@ -32,13 +32,13 @@ class Uuid extends AbstractUid
$type = preg_match('{^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$}Di', $uuid) ? (int) $uuid[14] : false;
if (false === $type || (static::TYPE ?: $type) !== $type) {
- throw new \InvalidArgumentException(sprintf('Invalid UUID%s: "%s".', static::TYPE ? 'v'.static::TYPE : '', $uuid));
+ throw new \InvalidArgumentException(\sprintf('Invalid UUID%s: "%s".', static::TYPE ? 'v'.static::TYPE : '', $uuid));
}
$this->uid = strtolower($uuid);
if ($checkVariant && !\in_array($this->uid[19], ['8', '9', 'a', 'b'], true)) {
- throw new \InvalidArgumentException(sprintf('Invalid UUID%s: "%s".', static::TYPE ? 'v'.static::TYPE : '', $uuid));
+ throw new \InvalidArgumentException(\sprintf('Invalid UUID%s: "%s".', static::TYPE ? 'v'.static::TYPE : '', $uuid));
}
}
diff --git a/lam/lib/3rdParty/composer/symfony/uid/UuidV1.php b/lam/lib/3rdParty/composer/symfony/uid/UuidV1.php
index 1e6873708..ae21f92bf 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/UuidV1.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/UuidV1.php
@@ -54,7 +54,7 @@ class UuidV1 extends Uuid implements TimeBasedUidInterface
$seq = substr($uuid, 19, 4);
do {
- self::$clockSeq = sprintf('%04x', random_int(0, 0x3FFF) | 0x8000);
+ self::$clockSeq = \sprintf('%04x', random_int(0, 0x3FFF) | 0x8000);
} while ($seq === self::$clockSeq);
$seq = self::$clockSeq;
diff --git a/lam/lib/3rdParty/composer/symfony/uid/UuidV6.php b/lam/lib/3rdParty/composer/symfony/uid/UuidV6.php
index b3492083c..cd30082e2 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/UuidV6.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/UuidV6.php
@@ -58,7 +58,7 @@ class UuidV6 extends Uuid implements TimeBasedUidInterface
if (!isset(self::$node)) {
$seed = [random_int(0, 0xFFFFFF), random_int(0, 0xFFFFFF)];
$node = unpack('N2', hex2bin('00'.substr($uuidV1, 24, 6)).hex2bin('00'.substr($uuidV1, 30)));
- self::$node = sprintf('%06x%06x', ($seed[0] ^ $node[1]) | 0x010000, $seed[1] ^ $node[2]);
+ self::$node = \sprintf('%06x%06x', ($seed[0] ^ $node[1]) | 0x010000, $seed[1] ^ $node[2]);
}
return $uuid.self::$node;
diff --git a/lam/lib/3rdParty/composer/symfony/uid/UuidV7.php b/lam/lib/3rdParty/composer/symfony/uid/UuidV7.php
index 43740b67e..12c752095 100644
--- a/lam/lib/3rdParty/composer/symfony/uid/UuidV7.php
+++ b/lam/lib/3rdParty/composer/symfony/uid/UuidV7.php
@@ -60,7 +60,7 @@ class UuidV7 extends Uuid implements TimeBasedUidInterface
if ($time > self::$time || (null !== $mtime && $time !== self::$time)) {
randomize:
- self::$rand = unpack('n*', isset(self::$seed) ? random_bytes(10) : self::$seed = random_bytes(16));
+ self::$rand = unpack('S*', isset(self::$seed) ? random_bytes(10) : self::$seed = random_bytes(16));
self::$rand[1] &= 0x03FF;
self::$time = $time;
} else {
@@ -76,7 +76,7 @@ class UuidV7 extends Uuid implements TimeBasedUidInterface
// 24-bit number in the self::$seedParts list and decrement self::$seedIndex.
if (!self::$seedIndex) {
- $s = unpack('l*', self::$seed = hash('sha512', self::$seed, true));
+ $s = unpack(\PHP_INT_SIZE >= 8 ? 'L*' : 'l*', self::$seed = hash('sha512', self::$seed, true));
$s[] = ($s[1] >> 8 & 0xFF0000) | ($s[2] >> 16 & 0xFF00) | ($s[3] >> 24 & 0xFF);
$s[] = ($s[4] >> 8 & 0xFF0000) | ($s[5] >> 16 & 0xFF00) | ($s[6] >> 24 & 0xFF);
$s[] = ($s[7] >> 8 & 0xFF0000) | ($s[8] >> 16 & 0xFF00) | ($s[9] >> 24 & 0xFF);
@@ -113,7 +113,7 @@ class UuidV7 extends Uuid implements TimeBasedUidInterface
$time = bin2hex(BinaryUtil::fromBase($time, BinaryUtil::BASE10));
}
- return substr_replace(sprintf('%012s-%04x-%04x-%04x%04x%04x',
+ return substr_replace(\sprintf('%012s-%04x-%04x-%04x%04x%04x',
$time,
0x7000 | (self::$rand[1] << 2) | (self::$rand[2] >> 14),
0x8000 | (self::$rand[2] & 0x3FFF),
diff --git a/lam/lib/3rdParty/composer/web-auth/cose-lib/composer.json b/lam/lib/3rdParty/composer/web-auth/cose-lib/composer.json
index e095eacca..acef13265 100644
--- a/lam/lib/3rdParty/composer/web-auth/cose-lib/composer.json
+++ b/lam/lib/3rdParty/composer/web-auth/cose-lib/composer.json
@@ -19,7 +19,7 @@
"php": ">=8.1",
"ext-json": "*",
"ext-openssl": "*",
- "brick/math": "^0.9|^0.10|^0.11|^0.12",
+ "brick/math": "^0.9|^0.10|^0.11|^0.12|^0.13",
"spomky-labs/pki-framework": "^1.0"
},
"autoload": {
@@ -29,17 +29,17 @@
},
"require-dev": {
"infection/infection": "^0.29",
- "phpstan/phpstan": "^1.7",
- "phpstan/phpstan-deprecation-rules": "^1.0",
- "phpstan/phpstan-phpunit": "^1.1",
- "phpstan/phpstan-strict-rules": "^1.2",
- "phpunit/phpunit": "^10.1|^11.0",
- "rector/rector": "^1.0",
+ "phpstan/phpstan": "^1.7|^2.0",
+ "phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
+ "phpstan/phpstan-phpunit": "^1.1|^2.0",
+ "phpstan/phpstan-strict-rules": "^1.0|^2.0",
+ "phpunit/phpunit": "^10.1|^11.0|^12.0",
+ "rector/rector": "^2.0",
"symplify/easy-coding-standard": "^12.0",
"symfony/phpunit-bridge": "^6.4|^7.0",
- "ekino/phpstan-banned-code": "^1.0",
+ "ekino/phpstan-banned-code": "^1.0|^2.0|^3.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
- "qossmic/deptrac": "^2.0",
+ "deptrac/deptrac": "^3.0",
"phpstan/extension-installer": "^1.3"
},
"autoload-dev": {
diff --git a/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Algorithm/ManagerFactory.php b/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Algorithm/ManagerFactory.php
index 548e0a72d..380d1e0c7 100644
--- a/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Algorithm/ManagerFactory.php
+++ b/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Algorithm/ManagerFactory.php
@@ -6,6 +6,7 @@ namespace Cose\Algorithm;
use InvalidArgumentException;
use function array_key_exists;
+use function sprintf;
final class ManagerFactory
{
diff --git a/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Algorithm/Signature/EdDSA/EdDSA.php b/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Algorithm/Signature/EdDSA/EdDSA.php
index 7a0278b3e..37426e9fd 100644
--- a/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Algorithm/Signature/EdDSA/EdDSA.php
+++ b/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Algorithm/Signature/EdDSA/EdDSA.php
@@ -43,12 +43,10 @@ class EdDSA implements Signature
throw new InvalidArgumentException('Unsupported curve');
}
try {
- sodium_crypto_sign_verify_detached($signature, $data, $key->x());
+ return sodium_crypto_sign_verify_detached($signature, $data, $key->x());
} catch (Throwable) {
return false;
}
-
- return true;
}
public static function identifier(): int
diff --git a/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Key/Ec2Key.php b/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Key/Ec2Key.php
index ad770be30..38b916d29 100644
--- a/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Key/Ec2Key.php
+++ b/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Key/Ec2Key.php
@@ -14,6 +14,7 @@ use SpomkyLabs\Pki\ASN1\Type\Tagged\ExplicitlyTaggedType;
use function array_key_exists;
use function in_array;
use function is_int;
+use function sprintf;
use function strlen;
/**
diff --git a/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Key/Key.php b/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Key/Key.php
index 7b28f7b91..b35010ceb 100644
--- a/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Key/Key.php
+++ b/lam/lib/3rdParty/composer/web-auth/cose-lib/src/Key/Key.php
@@ -6,6 +6,7 @@ namespace Cose\Key;
use InvalidArgumentException;
use function array_key_exists;
+use function sprintf;
class Key
{