From 6488f0698287523bdb046de39b38f7eb112523ca Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Tue, 4 Apr 2023 11:15:04 +0800 Subject: [PATCH] Fix extension:outdated to correctly check extension name Bug: #231 --- src/Command/ExtensionOutdatedCommand.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Command/ExtensionOutdatedCommand.php b/src/Command/ExtensionOutdatedCommand.php index b22fe17..12bf492 100644 --- a/src/Command/ExtensionOutdatedCommand.php +++ b/src/Command/ExtensionOutdatedCommand.php @@ -100,6 +100,13 @@ private function getAvailableExtensions(): ?array { $this->io->error( "Unable to decode JSON in $extJsonFilename" ); return null; } - return $extData; + + // Reindex by name, because only the name is available from the wiki and not the short name. + $extsAll = []; + foreach ( $extData as $ext ) { + $extsAll[$ext['name']] = $ext; + } + + return $extsAll; } }