2525 * A console command to display information about the current installation.
2626 *
2727 * @author Roland Franssen <franssen.roland@gmail.com>
28+ * @author Joppe De Cuyper <hello@joppe.dev>
2829 *
2930 * @final
3031 */
@@ -57,6 +58,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5758 $ buildDir = $ kernel ->getCacheDir ();
5859 }
5960
61+ $ xdebugMode = getenv ('XDEBUG_MODE ' ) ?: \ini_get ('xdebug.mode ' );
62+
6063 $ rows = [
6164 ['<info>Symfony</> ' ],
6265 new TableSeparator (),
@@ -81,9 +84,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8184 ['Architecture ' , (\PHP_INT_SIZE * 8 ).' bits ' ],
8285 ['Intl locale ' , class_exists (\Locale::class, false ) && \Locale::getDefault () ? \Locale::getDefault () : 'n/a ' ],
8386 ['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 ' ],
8790 ];
8891
8992 $ io ->table ([], $ rows );
0 commit comments