mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 01:58:47 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -40,7 +40,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
}
|
||||
$this->describeRoute($route, ['name' => $name]);
|
||||
if (($showAliases ??= $options['show_aliases'] ?? false) && $aliases = ($reverseAliases ??= $this->getReverseAliases($routes))[$name] ?? []) {
|
||||
$this->write(sprintf("- Aliases: \n%s", implode("\n", array_map(static fn (string $alias): string => sprintf(' - %s', $alias), $aliases))));
|
||||
$this->write(\sprintf("- Aliases: \n%s", implode("\n", array_map(static fn (string $alias): string => \sprintf(' - %s', $alias), $aliases))));
|
||||
}
|
||||
}
|
||||
$this->write("\n");
|
||||
@@ -75,11 +75,11 @@ class MarkdownDescriptor extends Descriptor
|
||||
|
||||
$this->write("Container parameters\n====================\n");
|
||||
foreach ($this->sortParameters($parameters) as $key => $value) {
|
||||
$this->write(sprintf(
|
||||
$this->write(\sprintf(
|
||||
"\n- `%s`: `%s`%s",
|
||||
$key,
|
||||
$this->formatParameter($value),
|
||||
isset($deprecatedParameters[$key]) ? sprintf(' *Since %s %s: %s*', $deprecatedParameters[$key][0], $deprecatedParameters[$key][1], sprintf(...\array_slice($deprecatedParameters[$key], 2))) : ''
|
||||
isset($deprecatedParameters[$key]) ? \sprintf(' *Since %s %s: %s*', $deprecatedParameters[$key][0], $deprecatedParameters[$key][1], \sprintf(...\array_slice($deprecatedParameters[$key], 2))) : ''
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -111,13 +111,13 @@ class MarkdownDescriptor extends Descriptor
|
||||
} elseif ($service instanceof Definition) {
|
||||
$this->describeContainerDefinition($service, $childOptions, $container);
|
||||
} else {
|
||||
$this->write(sprintf('**`%s`:** `%s`', $options['id'], $service::class));
|
||||
$this->write(\sprintf('**`%s`:** `%s`', $options['id'], $service::class));
|
||||
}
|
||||
}
|
||||
|
||||
protected function describeContainerDeprecations(ContainerBuilder $container, array $options = []): void
|
||||
{
|
||||
$containerDeprecationFilePath = sprintf('%s/%sDeprecations.log', $container->getParameter('kernel.build_dir'), $container->getParameter('kernel.container_class'));
|
||||
$containerDeprecationFilePath = \sprintf('%s/%sDeprecations.log', $container->getParameter('kernel.build_dir'), $container->getParameter('kernel.container_class'));
|
||||
if (!file_exists($containerDeprecationFilePath)) {
|
||||
throw new RuntimeException('The deprecation file does not exist, please try warming the cache first.');
|
||||
}
|
||||
@@ -132,11 +132,11 @@ class MarkdownDescriptor extends Descriptor
|
||||
$formattedLogs = [];
|
||||
$remainingCount = 0;
|
||||
foreach ($logs as $log) {
|
||||
$formattedLogs[] = sprintf("- %sx: \"%s\" in %s:%s\n", $log['count'], $log['message'], $log['file'], $log['line']);
|
||||
$formattedLogs[] = \sprintf("- %sx: \"%s\" in %s:%s\n", $log['count'], $log['message'], $log['file'], $log['line']);
|
||||
$remainingCount += $log['count'];
|
||||
}
|
||||
|
||||
$this->write(sprintf("## Remaining deprecations (%s)\n\n", $remainingCount));
|
||||
$this->write(\sprintf("## Remaining deprecations (%s)\n\n", $remainingCount));
|
||||
foreach ($formattedLogs as $formattedLog) {
|
||||
$this->write($formattedLog);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
$this->write("\n\nServices\n--------\n");
|
||||
foreach ($services['services'] as $id => $service) {
|
||||
$this->write("\n");
|
||||
$this->write(sprintf('- `%s`: `%s`', $id, $service::class));
|
||||
$this->write(\sprintf('- `%s`: `%s`', $id, $service::class));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
if ($factory[0] instanceof Reference) {
|
||||
$output .= "\n".'- Factory Service: `'.$factory[0].'`';
|
||||
} elseif ($factory[0] instanceof Definition) {
|
||||
$output .= "\n".sprintf('- Factory Service: inline factory service (%s)', $factory[0]->getClass() ? sprintf('`%s`', $factory[0]->getClass()) : 'not configured');
|
||||
$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].'`';
|
||||
}
|
||||
@@ -273,7 +273,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
$inEdges = null !== $container && isset($options['id']) ? $this->getServiceEdges($container, $options['id']) : [];
|
||||
$output .= "\n".'- Usages: '.($inEdges ? implode(', ', $inEdges) : 'none');
|
||||
|
||||
$this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output);
|
||||
$this->write(isset($options['id']) ? \sprintf("### %s\n\n%s\n", $options['id'], $output) : $output);
|
||||
}
|
||||
|
||||
protected function describeContainerAlias(Alias $alias, array $options = [], ?ContainerBuilder $container = null): void
|
||||
@@ -287,7 +287,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
return;
|
||||
}
|
||||
|
||||
$this->write(sprintf("### %s\n\n%s\n", $options['id'], $output));
|
||||
$this->write(\sprintf("### %s\n\n%s\n", $options['id'], $output));
|
||||
|
||||
if (!$container) {
|
||||
return;
|
||||
@@ -300,7 +300,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
protected function describeContainerParameter(mixed $parameter, ?array $deprecation, array $options = []): void
|
||||
{
|
||||
if (isset($options['parameter'])) {
|
||||
$this->write(sprintf("%s\n%s\n\n%s%s", $options['parameter'], str_repeat('=', \strlen($options['parameter'])), $this->formatParameter($parameter), $deprecation ? sprintf("\n\n*Since %s %s: %s*", $deprecation[0], $deprecation[1], sprintf(...\array_slice($deprecation, 2))) : ''));
|
||||
$this->write(\sprintf("%s\n%s\n\n%s%s", $options['parameter'], str_repeat('=', \strlen($options['parameter'])), $this->formatParameter($parameter), $deprecation ? \sprintf("\n\n*Since %s %s: %s*", $deprecation[0], $deprecation[1], \sprintf(...\array_slice($deprecation, 2))) : ''));
|
||||
} else {
|
||||
$this->write($parameter);
|
||||
}
|
||||
@@ -319,35 +319,35 @@ class MarkdownDescriptor extends Descriptor
|
||||
$title = 'Registered listeners';
|
||||
|
||||
if (null !== $dispatcherServiceName) {
|
||||
$title .= sprintf(' of event dispatcher "%s"', $dispatcherServiceName);
|
||||
$title .= \sprintf(' of event dispatcher "%s"', $dispatcherServiceName);
|
||||
}
|
||||
|
||||
if (null !== $event) {
|
||||
$title .= sprintf(' for event `%s` ordered by descending priority', $event);
|
||||
$title .= \sprintf(' for event `%s` ordered by descending priority', $event);
|
||||
$registeredListeners = $eventDispatcher->getListeners($event);
|
||||
} else {
|
||||
// Try to see if "events" exists
|
||||
$registeredListeners = \array_key_exists('events', $options) ? array_combine($options['events'], array_map(fn ($event) => $eventDispatcher->getListeners($event), $options['events'])) : $eventDispatcher->getListeners();
|
||||
}
|
||||
|
||||
$this->write(sprintf('# %s', $title)."\n");
|
||||
$this->write(\sprintf('# %s', $title)."\n");
|
||||
|
||||
if (null !== $event) {
|
||||
foreach ($registeredListeners as $order => $listener) {
|
||||
$this->write("\n".sprintf('## Listener %d', $order + 1)."\n");
|
||||
$this->write("\n".\sprintf('## Listener %d', $order + 1)."\n");
|
||||
$this->describeCallable($listener);
|
||||
$this->write(sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($event, $listener))."\n");
|
||||
$this->write(\sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($event, $listener))."\n");
|
||||
}
|
||||
} else {
|
||||
ksort($registeredListeners);
|
||||
|
||||
foreach ($registeredListeners as $eventListened => $eventListeners) {
|
||||
$this->write("\n".sprintf('## %s', $eventListened)."\n");
|
||||
$this->write("\n".\sprintf('## %s', $eventListened)."\n");
|
||||
|
||||
foreach ($eventListeners as $order => $eventListener) {
|
||||
$this->write("\n".sprintf('### Listener %d', $order + 1)."\n");
|
||||
$this->write("\n".\sprintf('### Listener %d', $order + 1)."\n");
|
||||
$this->describeCallable($eventListener);
|
||||
$this->write(sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($eventListened, $eventListener))."\n");
|
||||
$this->write(\sprintf('- Priority: `%d`', $eventDispatcher->getListenerPriority($eventListened, $eventListener))."\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,16 +361,16 @@ class MarkdownDescriptor extends Descriptor
|
||||
$string .= "\n- Type: `function`";
|
||||
|
||||
if (\is_object($callable[0])) {
|
||||
$string .= "\n".sprintf('- Name: `%s`', $callable[1]);
|
||||
$string .= "\n".sprintf('- Class: `%s`', $callable[0]::class);
|
||||
$string .= "\n".\sprintf('- Name: `%s`', $callable[1]);
|
||||
$string .= "\n".\sprintf('- Class: `%s`', $callable[0]::class);
|
||||
} else {
|
||||
if (!str_starts_with($callable[1], 'parent::')) {
|
||||
$string .= "\n".sprintf('- Name: `%s`', $callable[1]);
|
||||
$string .= "\n".sprintf('- Class: `%s`', $callable[0]);
|
||||
$string .= "\n".\sprintf('- Name: `%s`', $callable[1]);
|
||||
$string .= "\n".\sprintf('- Class: `%s`', $callable[0]);
|
||||
$string .= "\n- Static: yes";
|
||||
} else {
|
||||
$string .= "\n".sprintf('- Name: `%s`', substr($callable[1], 8));
|
||||
$string .= "\n".sprintf('- Class: `%s`', $callable[0]);
|
||||
$string .= "\n".\sprintf('- Name: `%s`', substr($callable[1], 8));
|
||||
$string .= "\n".\sprintf('- Class: `%s`', $callable[0]);
|
||||
$string .= "\n- Static: yes";
|
||||
$string .= "\n- Parent: yes";
|
||||
}
|
||||
@@ -385,12 +385,12 @@ class MarkdownDescriptor extends Descriptor
|
||||
$string .= "\n- Type: `function`";
|
||||
|
||||
if (!str_contains($callable, '::')) {
|
||||
$string .= "\n".sprintf('- Name: `%s`', $callable);
|
||||
$string .= "\n".\sprintf('- Name: `%s`', $callable);
|
||||
} else {
|
||||
$callableParts = explode('::', $callable);
|
||||
|
||||
$string .= "\n".sprintf('- Name: `%s`', $callableParts[1]);
|
||||
$string .= "\n".sprintf('- Class: `%s`', $callableParts[0]);
|
||||
$string .= "\n".\sprintf('- Name: `%s`', $callableParts[1]);
|
||||
$string .= "\n".\sprintf('- Class: `%s`', $callableParts[0]);
|
||||
$string .= "\n- Static: yes";
|
||||
}
|
||||
|
||||
@@ -408,10 +408,10 @@ class MarkdownDescriptor extends Descriptor
|
||||
|
||||
return;
|
||||
}
|
||||
$string .= "\n".sprintf('- Name: `%s`', $r->name);
|
||||
$string .= "\n".\sprintf('- Name: `%s`', $r->name);
|
||||
|
||||
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
|
||||
$string .= "\n".sprintf('- Class: `%s`', $class->name);
|
||||
$string .= "\n".\sprintf('- Class: `%s`', $class->name);
|
||||
if (!$r->getClosureThis()) {
|
||||
$string .= "\n- Static: yes";
|
||||
}
|
||||
@@ -424,7 +424,7 @@ class MarkdownDescriptor extends Descriptor
|
||||
|
||||
if (method_exists($callable, '__invoke')) {
|
||||
$string .= "\n- Type: `object`";
|
||||
$string .= "\n".sprintf('- Name: `%s`', $callable::class);
|
||||
$string .= "\n".\sprintf('- Name: `%s`', $callable::class);
|
||||
|
||||
$this->write($string."\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user