From 0aa91015ffcdb8740f0c8d7ecd860af0cf6b44d5 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sat, 19 Jan 2019 02:34:51 +0300 Subject: [PATCH] app/console, web{app,app_dev}.php updated according to new symfony-standard distribution. --- app/console | 19 +++++-------------- web/app.php | 17 +++++++---------- web/app_dev.php | 22 ++++++++-------------- 3 files changed, 20 insertions(+), 38 deletions(-) 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();