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

@@ -41,7 +41,15 @@ class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass
$seenAliasTargets = [];
$replacements = [];
foreach ($container->getAliases() as $definitionId => $target) {
// Sort aliases so non-deprecated ones come first. This ensures that when
// multiple aliases point to the same private definition, non-deprecated
// aliases get priority for renaming. Otherwise, the definition might be
// renamed to a deprecated alias ID, causing the original service ID to
// become an alias to the deprecated one (inverting the alias chain).
$aliases = $container->getAliases();
uasort($aliases, static fn ($a, $b) => $a->isDeprecated() <=> $b->isDeprecated());
foreach ($aliases as $definitionId => $target) {
$targetId = (string) $target;
// Special case: leave this target alone
if ('service_container' === $targetId) {
@@ -95,7 +103,7 @@ class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass
// Perform the replacement
$newId = $this->replacements[$referenceId];
$value = new Reference($newId, $value->getInvalidBehavior());
$this->container->log($this, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $this->currentId, $referenceId, $newId));
$this->container->log($this, \sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $this->currentId, $referenceId, $newId));
}
return parent::processValue($value, $isRoot);