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 3
3
namespace PHPStan \Diagnose ;
4
4
5
5
use PHPStan \Command \Output ;
6
+ use PHPStan \ExtensionInstaller \GeneratedConfig ;
6
7
use PHPStan \Internal \ComposerHelper ;
7
8
use PHPStan \Php \PhpVersion ;
9
+ use function class_exists ;
10
+ use function count ;
8
11
use function sprintf ;
9
12
use const PHP_VERSION_ID ;
10
13
@@ -32,6 +35,18 @@ public function print(Output $output): void
32
35
ComposerHelper::getPhpStanVersion (),
33
36
));
34
37
$ 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 ('' );
35
50
}
36
51
37
52
}
You can’t perform that action at this time.
0 commit comments