Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony List of all kernel parameters available like %kernel.debug%

Tags:

symfony

How can I get a list of all kernel parameters that are available for use in my configuration files. E.g., in config.yml I know I can access %kernel.debug% which either returns true or false depending on AppKernel's initialization in the app.php (or app_dev.php) file.

like image 956
user1949229 Avatar asked Jul 10 '15 11:07

user1949229


1 Answers

>=3.0 (or lower if using 3.0 directory structure)

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

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

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


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

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

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

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


>=2.3 <=2.5

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

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

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

like image 192
qooplmao Avatar answered Oct 18 '22 05:10

qooplmao