Re-dump autoloader and composer.lock

This commit is contained in:
Stephen Abello
2025-09-18 10:26:38 +02:00
parent 7e515e7216
commit edbe4974ac
613 changed files with 5661 additions and 4259 deletions

View File

@@ -46,7 +46,7 @@ class YamlReferenceDumper
foreach (explode('.', $path) as $step) {
if (!$node instanceof ArrayNode) {
throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
throw new \UnexpectedValueException(\sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
}
/** @var NodeInterface[] $children */
@@ -60,7 +60,7 @@ class YamlReferenceDumper
}
}
throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
throw new \UnexpectedValueException(\sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
}
return $this->dumpNode($node);
@@ -130,7 +130,7 @@ class YamlReferenceDumper
// deprecated?
if ($node instanceof BaseNode && $node->isDeprecated()) {
$deprecation = $node->getDeprecation($node->getName(), $parentNode ? $parentNode->getPath() : $node->getPath());
$comments[] = sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']);
$comments[] = \sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']);
}
// example
@@ -142,12 +142,12 @@ class YamlReferenceDumper
$comments = \count($comments) ? '# '.implode(', ', $comments) : '';
$key = $prototypedArray ? '-' : $node->getName().':';
$text = rtrim(sprintf('%-21s%s %s', $key, $default, $comments), ' ');
$text = rtrim(\sprintf('%-21s%s %s', $key, $default, $comments), ' ');
if ($node instanceof BaseNode && $info = $node->getInfo()) {
$this->writeLine('');
// indenting multi-line info
$info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info);
$info = str_replace("\n", \sprintf("\n%".($depth * 4).'s# ', ' '), $info);
$this->writeLine('# '.$info, $depth * 4);
}
@@ -189,7 +189,7 @@ class YamlReferenceDumper
$indent = \strlen($text) + $indent;
$format = '%'.$indent.'s';
$this->reference .= sprintf($format, $text)."\n";
$this->reference .= \sprintf($format, $text)."\n";
}
private function writeArray(array $array, int $depth, bool $asComment = false): void
@@ -208,7 +208,7 @@ class YamlReferenceDumper
if ($isIndexed) {
$this->writeLine($prefix.'- '.$val, $depth * 4);
} else {
$this->writeLine(sprintf('%s%-20s %s', $prefix, $key.':', $val), $depth * 4);
$this->writeLine(\sprintf('%s%-20s %s', $prefix, $key.':', $val), $depth * 4);
}
if (\is_array($value)) {