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

* N°8834 - Add compatibility with PHP 8.4

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

View File

@@ -47,7 +47,7 @@ class CliDescriptor implements DumpDescriptorInterface
if (isset($context['request'])) {
$request = $context['request'];
$this->lastIdentifier = $request['identifier'];
$section = sprintf('%s %s', $request['method'], $request['uri']);
$section = \sprintf('%s %s', $request['method'], $request['uri']);
if ($controller = $request['controller']) {
$rows[] = ['controller', rtrim($this->dumper->dump($controller, true), "\n")];
}
@@ -62,9 +62,9 @@ class CliDescriptor implements DumpDescriptorInterface
if (isset($context['source'])) {
$source = $context['source'];
$sourceInfo = sprintf('%s on line %d', $source['name'], $source['line']);
$sourceInfo = \sprintf('%s on line %d', $source['name'], $source['line']);
if ($fileLink = $source['file_link'] ?? null) {
$sourceInfo = sprintf('<href=%s>%s</>', $fileLink, $sourceInfo);
$sourceInfo = \sprintf('<href=%s>%s</>', $fileLink, $sourceInfo);
}
$rows[] = ['source', $sourceInfo];
$file = $source['file_relative'] ?? $source['file'];

View File

@@ -45,7 +45,7 @@ class HtmlDescriptor implements DumpDescriptorInterface
if (isset($context['request'])) {
$request = $context['request'];
$controller = "<span class='dumped-tag'>{$this->dumper->dump($request['controller'], true, ['maxDepth' => 0])}</span>";
$title = sprintf('<code>%s</code> <a href="%s">%s</a>', $request['method'], $uri = $request['uri'], $uri);
$title = \sprintf('<code>%s</code> <a href="%s">%s</a>', $request['method'], $uri = $request['uri'], $uri);
$dedupIdentifier = $request['identifier'];
} elseif (isset($context['cli'])) {
$title = '<code>$ </code>'.$context['cli']['command_line'];
@@ -58,9 +58,9 @@ class HtmlDescriptor implements DumpDescriptorInterface
if (isset($context['source'])) {
$source = $context['source'];
$projectDir = $source['project_dir'] ?? null;
$sourceDescription = sprintf('%s on line %d', $source['name'], $source['line']);
$sourceDescription = \sprintf('%s on line %d', $source['name'], $source['line']);
if (isset($source['file_link'])) {
$sourceDescription = sprintf('<a href="%s">%s</a>', $source['file_link'], $sourceDescription);
$sourceDescription = \sprintf('<a href="%s">%s</a>', $source['file_link'], $sourceDescription);
}
}
@@ -105,7 +105,7 @@ HTML
$renderedTags = '';
foreach ($tags as $key => $value) {
$renderedTags .= sprintf('<li><span class="badge">%s</span>%s</li>', $key, $value);
$renderedTags .= \sprintf('<li><span class="badge">%s</span>%s</li>', $key, $value);
}
return <<<HTML

View File

@@ -57,7 +57,7 @@ class ServerDumpCommand extends Command
protected function configure(): void
{
$this
->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', implode(', ', $this->getAvailableFormats())), 'cli')
->addOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format (%s)', implode(', ', $this->getAvailableFormats())), 'cli')
->setHelp(<<<'EOF'
<info>%command.name%</info> starts a dump server that collects and displays
dumps in a single place for debugging you application:
@@ -80,7 +80,7 @@ EOF
$format = $input->getOption('format');
if (!$descriptor = $this->descriptors[$format] ?? null) {
throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $format));
throw new InvalidArgumentException(\sprintf('Unsupported format "%s".', $format));
}
$errorIo = $io->getErrorStyle();
@@ -88,7 +88,7 @@ EOF
$this->server->start();
$errorIo->success(sprintf('Server listening on %s', $this->server->getHost()));
$errorIo->success(\sprintf('Server listening on %s', $this->server->getHost()));
$errorIo->comment('Quit the server with CONTROL-C.');
$this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) {