25
25
* A console command to display information about the current installation.
26
26
*
27
27
* @author Roland Franssen <[email protected] >
28
+ * @author Joppe De Cuyper <[email protected] >
28
29
*
29
30
* @final
30
31
*/
@@ -57,6 +58,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
57
58
$ buildDir = $ kernel ->getCacheDir ();
58
59
}
59
60
61
+ $ xdebugMode = getenv ('XDEBUG_MODE ' ) ?: \ini_get ('xdebug.mode ' );
62
+
60
63
$ rows = [
61
64
['<info>Symfony</> ' ],
62
65
new TableSeparator (),
@@ -81,9 +84,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
81
84
['Architecture ' , (\PHP_INT_SIZE * 8 ).' bits ' ],
82
85
['Intl locale ' , class_exists (\Locale::class, false ) && \Locale::getDefault () ? \Locale::getDefault () : 'n/a ' ],
83
86
['Timezone ' , date_default_timezone_get ().' (<comment> ' .(new \DateTimeImmutable ())->format (\DateTimeInterface::W3C ).'</>) ' ],
84
- ['OPcache ' , \extension_loaded ('Zend OPcache ' ) && filter_var (\ini_get ('opcache.enable ' ), \ FILTER_VALIDATE_BOOL ) ? 'true ' : 'false ' ],
85
- ['APCu ' , \extension_loaded ('apcu ' ) && filter_var (\ini_get ('apc.enabled ' ), \ FILTER_VALIDATE_BOOL ) ? 'true ' : 'false ' ],
86
- ['Xdebug ' , \extension_loaded ('xdebug ' ) ? ' true ' : 'false ' ],
87
+ ['OPcache ' , \extension_loaded ('Zend OPcache ' ) ? ( filter_var (\ini_get ('opcache.enable ' ), FILTER_VALIDATE_BOOLEAN ) ? 'Enabled ' : 'Not enabled ' ) : ' Not installed ' ],
88
+ ['APCu ' , \extension_loaded ('apcu ' ) ? ( filter_var (\ini_get ('apc.enabled ' ), FILTER_VALIDATE_BOOLEAN ) ? 'Enabled ' : 'Not enabled ' ) : ' Not installed ' ],
89
+ ['Xdebug ' , \extension_loaded ('xdebug ' ) ? ( $ xdebugMode && $ xdebugMode !== ' off ' ? ' Enabled ( ' . $ xdebugMode . ' ) ' : 'Not enabled ' ) : ' Not installed ' ],
87
90
];
88
91
89
92
$ io ->table ([], $ rows );
0 commit comments