Skip to content

Commit

Permalink
Merge branch refs/heads/1.11.x into 1.12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
phpstan-bot authored Jul 14, 2024
2 parents 928e50d + db71f04 commit c1e2e96
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Diagnose/PHPStanDiagnoseExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
namespace PHPStan\Diagnose;

use PHPStan\Command\Output;
use PHPStan\ExtensionInstaller\GeneratedConfig;
use PHPStan\Internal\ComposerHelper;
use PHPStan\Php\PhpVersion;
use function class_exists;
use function count;
use function sprintf;
use const PHP_VERSION_ID;

Expand Down Expand Up @@ -32,6 +35,18 @@ public function print(Output $output): void
ComposerHelper::getPhpStanVersion(),
));
$output->writeLineFormatted('');
if (class_exists('PHPStan\ExtensionInstaller\GeneratedConfig')) {
$output->writeLineFormatted('<info>Extension installer:</info>');
if (count(GeneratedConfig::EXTENSIONS) === 0) {
$output->writeLineFormatted('No extensions installed');
}
foreach (GeneratedConfig::EXTENSIONS as $name => $extensionConfig) {
$output->writeLineFormatted(sprintf('%s: %s', $name, $extensionConfig['version'] ?? 'Unknown version'));
}
} else {
$output->writeLineFormatted('<info>Extension installer:</info> Not installed');
}
$output->writeLineFormatted('');
}

}

0 comments on commit c1e2e96

Please sign in to comment.