8000 [FrameworkBundle] Deprecate the "--env" and "--no-debug" console options · symfony/symfony@48a49e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 48a49e1

Browse files
author
Robin Chalas
committed
[FrameworkBundle] Deprecate the "--env" and "--no-debug" console options
1 parent d1fd432 commit 48a49e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Application.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ public function getKernel()
6262
*/
6363
public function doRun(InputInterface $input, OutputInterface $output)
6464
{
65+
if ($input->hasParameterOption(array('-e', '--env'), true)) {
66+
@trigger_error('The "--env" option and its "-e" shortcut are deprecated since Symfony 4.2. Set the "APP_ENV" environment variable instead.', E_USER_DEPRECATED);
67+
}
68+
69+
if ($input->hasParameterOption('--no-debug', true)) {
70+
@trigger_error('The "--no-debug" option is deprecated since Symfony 4.2. Set the "APP_DEBUG" environment variable to "0" instead.', E_USER_DEPRECATED);
71+
}
72+
6573
$this->kernel->boot();
6674

6775
$this->setDispatcher($this->kernel->getContainer()->get('event_dispatcher'));

0 commit comments

Comments
 (0)
0