Symfony List of all kernel options available as% kernel.debug%

How can I get a list of all kernel options available for use in config files. For example, in config.yml I know I can access the% kernel.debug% file, which either returns true or false depending on the AppKernel initialization in the app.php (or app_dev.php) file.

+3


source to share


1 answer


Since version 2.3 you can use the debug: container / container: debug command.

> = 2.3 <= 2.5

List all parameters in a container
php app/console container:debug -- parameters

For * nix use grep to limit results
php app/console container:debug --parameters | grep kernel

Viewing a specific parameter
php app/console container:debug --parameter=kernel.debug

> = 2.6 <3.0 (if not using the 3.0 directory)

List all parameters in a container
php app/console debug:container -- parameters



For * nix use grep to limit results
php app/console debug:container --parameters | grep kernel

Viewing a specific parameter
php app/console debug:container --parameter=kernel.debug

> = 3.0 (or lower when using the 3.0 directory)

List all parameters in a container
php bin/console debug:container -- parameters

For * nix use grep to limit results
php bin/console debug:container --parameters | grep kernel

Viewing a specific parameter
php bin/console debug:container --parameter=kernel.debug

+14


source







All Articles