8000 [Console] Deprecate the "--env" and "--no-debug" options · symfony/symfony@399b5ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 399b5ac

Browse files
author
Robin Chalas
committed
[Console] Deprecate the "--env" and "--no-debug" options
1 parent d1fd432 commit 399b5ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ public function run(InputInterface $input = null, OutputInterface $output = null
195195
*/
196196
public function doRun(InputInterface $input, OutputInterface $output)
197197
{
198+
if ($input->hasParameterOption(array('-e', '--env'), true)) {
199+
@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);
200+
}
201+
202+
if ($input->hasParameterOption('--no-debug', true)) {
203+
@trigger_error('The "--no-debug" option is deprecated since Symfony 4.2. Set the "APP_DEBUG" environment variable to "0" instead.', E_USER_DEPRECATED);
204+
}
205+
198206
if (true === $input->hasParameterOption(array('--version', '-V'), true)) {
199207
$output->writeln($this->getLongVersion());
200208

0 commit comments

Comments
 (0)
0