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

@@ -91,7 +91,7 @@ class Router implements RouterInterface, RequestMatcherInterface
private static ?array $cache = [];
public function __construct(LoaderInterface $loader, mixed $resource, array $options = [], RequestContext $context = null, LoggerInterface $logger = null, string $defaultLocale = null)
public function __construct(LoaderInterface $loader, mixed $resource, array $options = [], ?RequestContext $context = null, ?LoggerInterface $logger = null, ?string $defaultLocale = null)
{
$this->loader = $loader;
$this->resource = $resource;
@@ -144,7 +144,7 @@ class Router implements RouterInterface, RequestMatcherInterface
}
if ($invalid) {
throw new \InvalidArgumentException(sprintf('The Router does not support the following options: "%s".', implode('", "', $invalid)));
throw new \InvalidArgumentException(\sprintf('The Router does not support the following options: "%s".', implode('", "', $invalid)));
}
}
@@ -158,7 +158,7 @@ class Router implements RouterInterface, RequestMatcherInterface
public function setOption(string $key, mixed $value)
{
if (!\array_key_exists($key, $this->options)) {
throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key));
throw new \InvalidArgumentException(\sprintf('The Router does not support the "%s" option.', $key));
}
$this->options[$key] = $value;
@@ -172,7 +172,7 @@ class Router implements RouterInterface, RequestMatcherInterface
public function getOption(string $key): mixed
{
if (!\array_key_exists($key, $this->options)) {
throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key));
throw new \InvalidArgumentException(\sprintf('The Router does not support the "%s" option.', $key));
}
return $this->options[$key];
@@ -272,6 +272,7 @@ class Router implements RouterInterface, RequestMatcherInterface
}
$cache->write($dumper->dump(), $this->getRouteCollection()->getResources());
unset(self::$cache[$cache->getPath()]);
}
);
@@ -301,6 +302,7 @@ class Router implements RouterInterface, RequestMatcherInterface
$dumper = $this->getGeneratorDumperInstance();
$cache->write($dumper->dump(), $this->getRouteCollection()->getResources());
unset(self::$cache[$cache->getPath()]);
}
);