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

@@ -239,7 +239,13 @@ class RouteCollection implements \IteratorAggregate, \Countable
}
foreach ($this->aliases as $name => $alias) {
$prefixedAliases[$prefix.$name] = $alias->withId($prefix.$alias->getId());
$targetId = $alias->getId();
if (isset($this->routes[$targetId]) || isset($this->aliases[$targetId])) {
$targetId = $prefix.$targetId;
}
$prefixedAliases[$prefix.$name] = $alias->withId($targetId);
}
$this->routes = $prefixedRoutes;
@@ -387,7 +393,7 @@ class RouteCollection implements \IteratorAggregate, \Countable
public function addAlias(string $name, string $alias): Alias
{
if ($name === $alias) {
throw new InvalidArgumentException(sprintf('Route alias "%s" can not reference itself.', $name));
throw new InvalidArgumentException(\sprintf('Route alias "%s" can not reference itself.', $name));
}
unset($this->routes[$name], $this->priorities[$name]);
@@ -407,4 +413,9 @@ class RouteCollection implements \IteratorAggregate, \Countable
{
return $this->aliases[$name] ?? null;
}
public function getPriority(string $name): ?int
{
return $this->priorities[$name] ?? null;
}
}