Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit f3b73e7

Browse files
committed
minor #1128 Improve the console script (stof)
This PR was merged into the 3.4 branch. Discussion ---------- Improve the console script - look for the `--env` and `--no-debug` only before a `--` separator, to respect the support for `--` - avoid passing an empty string as parameter option name (which would never match anyway, but causes php warning is some Symfony versions instead of being ignored silently, because of symfony/symfony#26136). Same change than symfony/recipes#367 Commits ------- 126ce57 Improve the console script
2 parents fc5e8d7 + 126ce57 commit f3b73e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/console

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ set_time_limit(0);
1515
require __DIR__.'/../vendor/autoload.php';
1616

1717
$input = new ArgvInput();
18-
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
19-
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
18+
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev', true);
19+
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption('--no-debug', true) && $env !== 'prod';
2020

2121
if ($debug) {
2222
Debug::enable();

0 commit comments

Comments
 (0)