Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"ergebnis/composer-normalize": "^2.50",
"friendsofphp/php-cs-fixer": "^3.94",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-strict-rules": "^1.6",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^10.5",
"symfony/console": "^6.4",
"symplify/monorepo-builder": "^11.2.0",
"symplify/phpstan-rules": "^13.0"
"symplify/phpstan-rules": "^14.9"
},
"replace": {
"symfony/polyfill-php80": "*",
Expand Down
104 changes: 52 additions & 52 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/typo3-docs-theme/src/Api/Typo3ApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ private function decodeJson(string $jsonData): ?array
return null;
}

/** @var array<string, array<string, string>> $apiData */
return $apiData;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function enterNode(Node $node, CompilerContextInterface $compilerContext)
return $node;
}

public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node|null
public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node
{
return $node;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function enterNode(Node $node, CompilerContextInterface $compilerContext)
return $node;
}

public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node|null
public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node
{
return $node;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function enterNode(Node $node, CompilerContextInterface $compilerContext)
return $node;
}

public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node|null
public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node
{
if ($node instanceof DocumentNode) {
$this->documentStack->pop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function enterNode(Node $node, CompilerContextInterface $compilerContext)
return $node;
}

public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node|null
public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node
{
assert($node instanceof ConfvalMenuNode);
if (count($node->getConfvals()) > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function enterNode(Node $node, CompilerContextInterface $compilerContext)
return $node;
}

public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node|null
public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node
{
assert($node instanceof CrossReferenceNode);
if ($node->getInterlinkDomain() === '') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function enterNode(Node $node, CompilerContextInterface $compilerContext)
return $node;
}

public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node|null
public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node
{
assert($node instanceof CrossReferenceNode);
if (!$this->themeSettings->hasSettings('interlink_shortcode')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function enterNode(Node $node, CompilerContextInterface $compilerContext)
return $node;
}

public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node|null
public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node
{
assert($node instanceof HyperLinkNode);
if (!str_starts_with($node->getTargetReference(), 'https://docs.typo3.org/permalink/')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function enterNode(Node $node, CompilerContextInterface $compilerContext)
return $node;
}

public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node|null
public function leaveNode(Node $node, CompilerContextInterface $compilerContext): Node
{
if ($node instanceof DocumentNode) {
$this->sectionStack = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Typo3DocsThemeExtension extends Extension implements PrependExtensionInter
YoutubeNode::class => 'body/directive/youtube.html.twig',
];

/** @param mixed[] $configs */
/** @param array<int, mixed> $configs */
public function load(array $configs, ContainerBuilder $container): void
Comment on lines +35 to 36
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new phpdoc for $configs uses array<int, mixed>, which is narrower than Symfony’s ExtensionInterface expectation (array<array> / array<array-key, array>). This mismatch is now being suppressed via the PHPStan baseline. Adjust the phpdoc to use array<array-key, mixed> (or array<array-key, array<string, mixed>> if you want to reflect the real structure) so the method is contravariant with the interface and the baseline entry can be removed.

Copilot uses AI. Check for mistakes.
{
$loader = new PhpFileLoader(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function process(
'align' => $scalarOptions['align'] ?? null,
]);

$figureNode = new FigureNode($image, new CollectionNode($collectionNode->getChildren()));
$figureNode = new FigureNode($image, new CollectionNode(array_values($collectionNode->getChildren())));

// Build filtered options - copy all options but validate zoom mode
// We must set all options ourselves because DirectiveRule::postProcessNode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function processSub(
$directive->getData(),
$directive->getDataNode() ?? new InlineCompoundNode(),
$key,
$collectionNode->getChildren(),
array_values($collectionNode->getChildren()),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function getCollectionFromPath(\League\Flysystem\FilesystemInterface|\php
if ($directive->getOptionBool('show-buttons')) {
$buttons[] = new EditOnGithubIncludeNode($path);
}
return new CollectionNode(array_merge($buttons, $document->getChildren()));
return new CollectionNode(array_values(array_merge($buttons, $document->getChildren())));
}

/**
Expand Down
Loading