php - Symfony2, How to change environment? -


i have read lot clear cache command symfony2, have question :

is php app/console cache:clear --env=prod --env, changes environment or clean cache environment?

if clear cache environment, line mean in app.php :

$kernel = new appkernel('prod', false);  

i think when want use symfony2 production environment have change line

$kernel = new appkernel('prod', true); 

am in right spot?

the 2 constructor arguments symfony\component\httpkernel\kernel $environment , $debug.

so, answer question directly, app.php uses production environment. you'll notice app_dev.php instantiates kernel this

$kernel = new appkernel('dev', true);  

so, environment name pass kernel constructor maps environment name you'd use in console commands (i.e., --env).

does clear you?


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -