File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 33namespace PHPStan \Diagnose ;
44
55use PHPStan \Command \Output ;
6+ use PHPStan \ExtensionInstaller \GeneratedConfig ;
67use PHPStan \Internal \ComposerHelper ;
78use PHPStan \Php \PhpVersion ;
9+ use function class_exists ;
10+ use function count ;
811use function sprintf ;
912use const PHP_VERSION_ID ;
1013
@@ -32,6 +35,18 @@ public function print(Output $output): void
3235 ComposerHelper::getPhpStanVersion (),
3336 ));
3437 $ output ->writeLineFormatted ('' );
38+ if (class_exists ('PHPStan\ExtensionInstaller\GeneratedConfig ' )) {
39+ $ output ->writeLineFormatted ('<info>Extension installer:</info> ' );
40+ if (count (GeneratedConfig::EXTENSIONS ) === 0 ) {
41+ $ output ->writeLineFormatted ('No extensions installed ' );
42+ }
43+ foreach (GeneratedConfig::EXTENSIONS as $ name => $ extensionConfig ) {
44+ $ output ->writeLineFormatted (sprintf ('%s: %s ' , $ name , $ extensionConfig ['version ' ] ?? 'Unknown version ' ));
45+ }
46+ } else {
47+ $ output ->writeLineFormatted ('<info>Extension installer:</info> Not installed ' );
48+ }
49+ $ output ->writeLineFormatted ('' );
3550 }
3651
3752}
You can’t perform that action at this time.
0 commit comments