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

@@ -35,7 +35,7 @@ class DebugAutowiringCommand extends ContainerDebugCommand
{
private ?FileLinkFormatter $fileLinkFormatter;
public function __construct(string $name = null, FileLinkFormatter $fileLinkFormatter = null)
public function __construct(?string $name = null, ?FileLinkFormatter $fileLinkFormatter = null)
{
$this->fileLinkFormatter = $fileLinkFormatter;
parent::__construct($name);
@@ -78,7 +78,7 @@ EOF
$serviceIds = array_filter($serviceIds, fn ($serviceId) => false !== stripos(str_replace('\\', '', $serviceId), $searchNormalized) && !str_starts_with($serviceId, '.'));
if (!$serviceIds) {
$errorIo->error(sprintf('No autowirable classes or interfaces found matching "%s"', $search));
$errorIo->error(\sprintf('No autowirable classes or interfaces found matching "%s"', $search));
return 1;
}
@@ -97,7 +97,7 @@ EOF
$io->title('Autowirable Types');
$io->text('The following classes & interfaces can be used as type-hints when autowiring:');
if ($search) {
$io->text(sprintf('(only showing classes/interfaces matching <comment>%s</comment>)', $search));
$io->text(\sprintf('(only showing classes/interfaces matching <comment>%s</comment>)', $search));
}
$hasAlias = [];
$all = $input->getOption('all');
@@ -120,10 +120,10 @@ EOF
}
}
$serviceLine = sprintf('<fg=yellow>%s</>', $serviceId);
$serviceLine = \sprintf('<fg=yellow>%s</>', $serviceId);
if ('' !== $fileLink = $this->getFileLink($previousId)) {
$serviceLine = substr($serviceId, \strlen($previousId));
$serviceLine = sprintf('<fg=yellow;href=%s>%s</>', $fileLink, $previousId).('' !== $serviceLine ? sprintf('<fg=yellow>%s</>', $serviceLine) : '');
$serviceLine = \sprintf('<fg=yellow;href=%s>%s</>', $fileLink, $previousId).('' !== $serviceLine ? \sprintf('<fg=yellow>%s</>', $serviceLine) : '');
}
if ($container->hasAlias($serviceId)) {
@@ -168,7 +168,7 @@ EOF
$io->newLine();
if (0 < $serviceIdsNb) {
$io->text(sprintf('%s more concrete service%s would be displayed when adding the "--all" option.', $serviceIdsNb, $serviceIdsNb > 1 ? 's' : ''));
$io->text(\sprintf('%s more concrete service%s would be displayed when adding the "--all" option.', $serviceIdsNb, $serviceIdsNb > 1 ? 's' : ''));
}
if ($all) {
$io->text('Pro-tip: use interfaces in your type-hints instead of classes to benefit from the dependency inversion principle.');