I use the Symfony CLI tool and I'm looking for a way to check the environment. I could not find anything like
$ php bin/console get environment
Is there another way for that? Is it possible / How to find out, which environment is currently active?
EDIT
The application is running in a concrete environment (and using then the app.php
for prod
or an app_{env}
for any other environment).
So what I actually want to achieve is to find out, which environment is currently being used by the application (when the app is called via HTTP, e.g. in a browser).
php bin/console about
This will display info about your app, one row will concern Environment:
What about
$this->getContainer()->getParameter('kernel.environment');
in ContainerAwareCommand?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With