@@ -40,6 +40,8 @@ public function collect(Request $request, Response $response, ?\Throwable $excep
40
40
$ eom = \DateTimeImmutable::createFromFormat ('d/m/Y ' , '01/ ' .Kernel::END_OF_MAINTENANCE );
41
41
$ eol = \DateTimeImmutable::createFromFormat ('d/m/Y ' , '01/ ' .Kernel::END_OF_LIFE );
42
42
43
+ $ xdebugMode = getenv ('XDEBUG_MODE ' ) ?: \ini_get ('xdebug.mode ' );
44
+
43
45
$ this ->data = [
44
46
'token ' => $ response ->headers ->get ('X-Debug-Token ' ),
45
47
'symfony_version ' => Kernel::VERSION ,
@@ -55,8 +57,11 @@ public function collect(Request $request, Response $response, ?\Throwable $excep
55
57
'php_intl_locale ' => class_exists (\Locale::class, false ) && \Locale::getDefault () ? \Locale::getDefault () : 'n/a ' ,
56
58
'php_timezone ' => date_default_timezone_get (),
57
59
'xdebug_enabled ' => \extension_loaded ('xdebug ' ),
60
+ 'xdebug_status ' => \extension_loaded ('xdebug ' ) ? ($ xdebugMode && $ xdebugMode !== 'off ' ? 'Enabled ( ' . $ xdebugMode . ') ' : 'Not enabled ' ) : 'Not installed ' ,
58
61
'apcu_enabled ' => \extension_loaded ('apcu ' ) && filter_var (\ini_get ('apc.enabled ' ), \FILTER_VALIDATE_BOOL ),
62
+ 'apcu_status ' => \extension_loaded ('apcu ' ) ? (filter_var (\ini_get ('apc.enabled ' ), FILTER_VALIDATE_BOOLEAN ) ? 'Enabled ' : 'Not enabled ' ) : 'Not installed ' ,
59
63
'zend_opcache_enabled ' => \extension_loaded ('Zend OPcache ' ) && filter_var (\ini_get ('opcache.enable ' ), \FILTER_VALIDATE_BOOL ),
64
+ 'zend_opcache_status ' => \extension_loaded ('Zend OPcache ' ) ? (filter_var (\ini_get ('opcache.enable ' ), FILTER_VALIDATE_BOOLEAN ) ? 'Enabled ' : 'Not enabled ' ) : 'Not installed ' ,
60
65
'bundles ' => [],
61
66
'sapi_name ' => \PHP_SAPI ,
62
67
];
@@ -192,6 +197,11 @@ public function hasXdebug(): bool
192
197
return $ this ->data ['xdebug_enabled ' ];
193
198
}
194
199
200
+ public function getXdebugStatus (): string
201
+ {
202
+ return $ this ->data ['xdebug_status ' ];
203
+ }
204
+
195
205
/**
196
206
* Returns true if the function xdebug_info is available.
197
207
*/
@@ -208,6 +218,11 @@ public function hasApcu(): bool
208
218
return $ this ->data ['apcu_enabled ' ];
209
219
}
210
220
221
+ public function getApcuStatus (): string
222
+ {
223
+ return $ this ->data ['apcu_status ' ];
224
+ }
225
+
211
226
/**
212
227
* Returns true if Zend OPcache is enabled.
213
228
*/
@@ -216,6 +231,11 @@ public function hasZendOpcache(): bool
216
231
return $ this ->data ['zend_opcache_enabled ' ];
217
232
}
218
233
234
+ public function getZendOpcacheStatus (): string
235
+ {
236
+ return $ this ->data ['zend_opcache_status ' ];
237
+ }
238
+
219
239
public function getBundles (): array |Data
220
240
{
221
241
return $ this ->data ['bundles ' ];
0 commit comments