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

@@ -67,7 +67,7 @@ class Container implements ContainerInterface, ResetInterface
private static \Closure $make;
public function __construct(ParameterBagInterface $parameterBag = null)
public function __construct(?ParameterBagInterface $parameterBag = null)
{
$this->parameterBag = $parameterBag ?? new EnvPlaceholderParameterBag();
}
@@ -160,12 +160,12 @@ class Container implements ContainerInterface, ResetInterface
if (isset($this->syntheticIds[$id]) || !isset($this->getRemovedIds()[$id])) {
// no-op
} elseif (null === $service) {
throw new InvalidArgumentException(sprintf('The "%s" service is private, you cannot unset it.', $id));
throw new InvalidArgumentException(\sprintf('The "%s" service is private, you cannot unset it.', $id));
} else {
throw new InvalidArgumentException(sprintf('The "%s" service is private, you cannot replace it.', $id));
throw new InvalidArgumentException(\sprintf('The "%s" service is private, you cannot replace it.', $id));
}
} elseif (isset($this->services[$id])) {
throw new InvalidArgumentException(sprintf('The "%s" service is already initialized, you cannot replace it.', $id));
throw new InvalidArgumentException(\sprintf('The "%s" service is already initialized, you cannot replace it.', $id));
}
if (isset($this->aliases[$id])) {
@@ -243,10 +243,10 @@ class Container implements ContainerInterface, ResetInterface
throw new ServiceNotFoundException($id);
}
if (isset($container->syntheticIds[$id])) {
throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id));
throw new ServiceNotFoundException($id, null, null, [], \sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id));
}
if (isset($container->getRemovedIds()[$id])) {
throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id));
throw new ServiceNotFoundException($id, null, null, [], \sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id));
}
$alternatives = [];
@@ -288,7 +288,6 @@ class Container implements ContainerInterface, ResetInterface
public function reset()
{
$services = $this->services + $this->privates;
$this->services = $this->factories = $this->privates = [];
foreach ($services as $service) {
try {
@@ -299,6 +298,8 @@ class Container implements ContainerInterface, ResetInterface
continue;
}
}
$this->services = $this->factories = $this->privates = [];
}
/**