Skip to content

Commit d56921b

Browse files
committed
minor #884 Remove deprecated --env and --no-debug console options (Tobion)
This PR was merged into the master branch. Discussion ---------- Remove deprecated --env and --no-debug console options See symfony/recipes#479 Commits ------- 6c49d74 Remove deprecated --env and --no-debug console options
2 parents 7c6c261 + 6c49d74 commit d56921b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bin/console

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
use App\Kernel;
55
use Symfony\Bundle\FrameworkBundle\Console\Application;
6-
use Symfony\Component\Console\Input\ArgvInput;
76
use Symfony\Component\Debug\Debug;
87
use Symfony\Component\Dotenv\Dotenv;
98

@@ -22,9 +21,8 @@ if (!isset($_SERVER['APP_ENV'])) {
2221
(new Dotenv())->load(__DIR__.'/../.env');
2322
}
2423

25-
$input = new ArgvInput();
26-
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
27-
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
24+
$env = $_SERVER['APP_ENV'] ?? 'dev';
25+
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env));
2826

2927
if ($debug) {
3028
umask(0000);
@@ -36,4 +34,4 @@ if ($debug) {
3634

3735
$kernel = new Kernel($env, $debug);
3836
$application = new Application($kernel);
39-
$application->run($input);
37+
$application->run();

0 commit comments

Comments
 (0)