Skip to content

Commit

Permalink
minor #884 Remove deprecated --env and --no-debug console options (To…
Browse files Browse the repository at this point in the history
…bion)

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
  • Loading branch information
javiereguiluz committed Nov 6, 2018
2 parents 7c6c261 + 6c49d74 commit d56921b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;

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

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

if ($debug) {
umask(0000);
Expand All @@ -36,4 +34,4 @@ if ($debug) {

$kernel = new Kernel($env, $debug);
$application = new Application($kernel);
$application->run($input);
$application->run();

0 comments on commit d56921b

Please sign in to comment.