diff --git a/app/console b/app/console index ade8bbc..f14e052 100755 --- a/app/console +++ b/app/console @@ -1,29 +1,20 @@ #!/usr/bin/env php getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); -$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod'; - +$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev', true); +$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption('--no-debug', true) && $env !== 'prod'; if ($debug) { Debug::enable(); } - $kernel = new AppKernel($env, $debug); $application = new Application($kernel); -$application->run($input); +$application->run($input); \ No newline at end of file diff --git a/web/app.php b/web/app.php index 6b784b9..433163b 100644 --- a/web/app.php +++ b/web/app.php @@ -1,17 +1,14 @@ loadClassCache(); +if (PHP_VERSION_ID < 70000) { + $kernel->loadClassCache(); +} //$kernel = new AppCache($kernel); - // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter //Request::enableHttpMethodParameterOverride(); $request = Request::createFromGlobals(); diff --git a/web/app_dev.php b/web/app_dev.php index ad4e9af..1d9e45f 100644 --- a/web/app_dev.php +++ b/web/app_dev.php @@ -1,31 +1,25 @@ loadClassCache(); +if (PHP_VERSION_ID < 70000) { + $kernel->loadClassCache(); +} $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send();