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

@@ -34,13 +34,13 @@ class GraphvizDumper extends Dumper
private array $edges;
// All values should be strings
private array $options = [
'graph' => ['ratio' => 'compress'],
'node' => ['fontsize' => '11', 'fontname' => 'Arial', 'shape' => 'record'],
'edge' => ['fontsize' => '9', 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => '0.5'],
'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'],
'node.definition' => ['fillcolor' => '#eeeeee'],
'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'],
];
'graph' => ['ratio' => 'compress'],
'node' => ['fontsize' => '11', 'fontname' => 'Arial', 'shape' => 'record'],
'edge' => ['fontsize' => '9', 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => '0.5'],
'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'],
'node.definition' => ['fillcolor' => '#eeeeee'],
'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'],
];
/**
* Dumps the service container as a graphviz graph.
@@ -88,7 +88,7 @@ class GraphvizDumper extends Dumper
foreach ($this->nodes as $id => $node) {
$aliases = $this->getAliases($id);
$code .= sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id.($aliases ? ' ('.implode(', ', $aliases).')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes']));
$code .= \sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id.($aliases ? ' ('.implode(', ', $aliases).')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes']));
}
return $code;
@@ -99,7 +99,7 @@ class GraphvizDumper extends Dumper
$code = '';
foreach ($this->edges as $id => $edges) {
foreach ($edges as $edge) {
$code .= sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"%s];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed', $edge['lazy'] ? ' color="#9999ff"' : '');
$code .= \sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"%s];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed', $edge['lazy'] ? ' color="#9999ff"' : '');
}
}
@@ -198,7 +198,7 @@ class GraphvizDumper extends Dumper
private function startDot(): string
{
return sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n",
return \sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n",
$this->addOptions($this->options['graph']),
$this->addOptions($this->options['node']),
$this->addOptions($this->options['edge'])
@@ -214,7 +214,7 @@ class GraphvizDumper extends Dumper
{
$code = [];
foreach ($attributes as $k => $v) {
$code[] = sprintf('%s="%s"', $k, $v);
$code[] = \sprintf('%s="%s"', $k, $v);
}
return $code ? ', '.implode(', ', $code) : '';
@@ -224,7 +224,7 @@ class GraphvizDumper extends Dumper
{
$code = [];
foreach ($options as $k => $v) {
$code[] = sprintf('%s="%s"', $k, $v);
$code[] = \sprintf('%s="%s"', $k, $v);
}
return implode(' ', $code);