From 6c2da98b59122091ae61eb2ac4c72576914f3619 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sat, 19 Jan 2019 21:32:32 +0300 Subject: [PATCH] Entrypoints updated according to symfony 3.4 state. --- app/console | 9 ++++----- web/app.php | 5 ++--- web/app_dev.php | 17 +++++++---------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/app/console b/app/console index f76d471..f14e052 100644 --- a/app/console +++ b/app/console @@ -4,15 +4,14 @@ use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Debug\Debug; // if you don't want to setup permissions the proper way, just uncomment the following PHP line -// read http://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup +// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup // for more information umask(0002); set_time_limit(0); -/** @var Composer\Autoload\ClassLoader $loader */ -$loader = require __DIR__.'/../app/autoload.php'; +require __DIR__.'/../vendor/autoload.php'; $input = new ArgvInput(); -$env = $input->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(); } diff --git a/web/app.php b/web/app.php index 105669e..433163b 100644 --- a/web/app.php +++ b/web/app.php @@ -1,9 +1,8 @@ loadClassCache(); +if (PHP_VERSION_ID < 70000) { + $kernel->loadClassCache(); +} $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send();