mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°6002 - Update Symfony libs to 5.4.19
This commit is contained in:
@@ -245,7 +245,7 @@ class JsonDescriptor extends Descriptor
|
||||
if ($factory[0] instanceof Reference) {
|
||||
$data['factory_service'] = (string) $factory[0];
|
||||
} elseif ($factory[0] instanceof Definition) {
|
||||
throw new \InvalidArgumentException('Factory is not describable.');
|
||||
$data['factory_service'] = sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'class not configured');
|
||||
} else {
|
||||
$data['factory_class'] = $factory[0];
|
||||
}
|
||||
@@ -361,7 +361,7 @@ class JsonDescriptor extends Descriptor
|
||||
}
|
||||
$data['name'] = $r->name;
|
||||
|
||||
if ($class = $r->getClosureScopeClass()) {
|
||||
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
|
||||
$data['class'] = $class->name;
|
||||
if (!$r->getClosureThis()) {
|
||||
$data['static'] = true;
|
||||
|
||||
@@ -224,7 +224,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
if ($factory[0] instanceof Reference) {
|
||||
$output .= "\n".'- Factory Service: `'.$factory[0].'`';
|
||||
} elseif ($factory[0] instanceof Definition) {
|
||||
throw new \InvalidArgumentException('Factory is not describable.');
|
||||
$output .= "\n".sprintf('- Factory Service: inline factory service (%s)', $factory[0]->getClass() ? sprintf('`%s`', $factory[0]->getClass()) : 'not configured');
|
||||
} else {
|
||||
$output .= "\n".'- Factory Class: `'.$factory[0].'`';
|
||||
}
|
||||
@@ -377,7 +377,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
}
|
||||
$string .= "\n".sprintf('- Name: `%s`', $r->name);
|
||||
|
||||
if ($class = $r->getClosureScopeClass()) {
|
||||
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
|
||||
$string .= "\n".sprintf('- Class: `%s`', $class->name);
|
||||
if (!$r->getClosureThis()) {
|
||||
$string .= "\n- Static: yes";
|
||||
|
||||
@@ -315,7 +315,7 @@ class TextDescriptor extends Descriptor
|
||||
if ($factory[0] instanceof Reference) {
|
||||
$tableRows[] = ['Factory Service', $factory[0]];
|
||||
} elseif ($factory[0] instanceof Definition) {
|
||||
throw new \InvalidArgumentException('Factory is not describable.');
|
||||
$tableRows[] = ['Factory Service', sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'class not configured')];
|
||||
} else {
|
||||
$tableRows[] = ['Factory Class', $factory[0]];
|
||||
}
|
||||
@@ -614,7 +614,7 @@ class TextDescriptor extends Descriptor
|
||||
if (str_contains($r->name, '{closure}')) {
|
||||
return 'Closure()';
|
||||
}
|
||||
if ($class = $r->getClosureScopeClass()) {
|
||||
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
|
||||
return sprintf('%s::%s()', $class->name, $r->name);
|
||||
}
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ class XmlDescriptor extends Descriptor
|
||||
if ($factory[0] instanceof Reference) {
|
||||
$factoryXML->setAttribute('service', (string) $factory[0]);
|
||||
} elseif ($factory[0] instanceof Definition) {
|
||||
throw new \InvalidArgumentException('Factory is not describable.');
|
||||
$factoryXML->setAttribute('service', sprintf('inline factory service (%s)', $factory[0]->getClass() ?? 'not configured'));
|
||||
} else {
|
||||
$factoryXML->setAttribute('class', $factory[0]);
|
||||
}
|
||||
@@ -548,7 +548,7 @@ class XmlDescriptor extends Descriptor
|
||||
}
|
||||
$callableXML->setAttribute('name', $r->name);
|
||||
|
||||
if ($class = $r->getClosureScopeClass()) {
|
||||
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
|
||||
$callableXML->setAttribute('class', $class->name);
|
||||
if (!$r->getClosureThis()) {
|
||||
$callableXML->setAttribute('static', 'true');
|
||||
|
||||
Reference in New Issue
Block a user