From 3330c433d485465ead6bd6a7e47ffdb65448c998 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Mon, 19 Dec 2016 03:36:48 +0300 Subject: [PATCH] app/console and web/app.php updated. --- app/console | 28 ++-- web/app.php | 32 ++-- web/config.php | 422 ------------------------------------------------- 3 files changed, 19 insertions(+), 463 deletions(-) delete mode 100644 web/config.php diff --git a/app/console b/app/console index f7954bd..f76d471 100644 --- a/app/console +++ b/app/console @@ -1,29 +1,21 @@ #!/usr/bin/env php getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); -$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; - +$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); +$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $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 a163359..105669e 100644 --- a/web/app.php +++ b/web/app.php @@ -1,32 +1,18 @@ unregister(); -$apcLoader->register(true); -*/ - -umask(0002); - -require_once __DIR__.'/../app/AppKernel.php'; -//require_once __DIR__.'/../app/AppCache.php'; - +/** @var \Composer\Autoload\ClassLoader $loader */ +$loader = require __DIR__.'/../app/autoload.php'; +if (PHP_VERSION_ID < 70000) { + include_once __DIR__.'/../var/bootstrap.php.cache'; +} $kernel = new AppKernel('prod', false); -$kernel->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(); $response = $kernel->handle($request); $response->send(); -$kernel->terminate($request, $response); +$kernel->terminate($request, $response); \ No newline at end of file diff --git a/web/config.php b/web/config.php deleted file mode 100644 index 8bdfd46..0000000 --- a/web/config.php +++ /dev/null @@ -1,422 +0,0 @@ -getFailedRequirements(); -$minorProblems = $symfonyRequirements->getFailedRecommendations(); -$hasMajorProblems = (bool) count($majorProblems); -$hasMinorProblems = (bool) count($minorProblems); - -?> - - - - - - Symfony Configuration Checker - - - -
-
- - - -
- -
-
-
-

Configuration Checker

-

- This script analyzes your system to check whether is - ready to run Symfony applications. -

- - -

Major problems

-

Major problems have been detected and must be fixed before continuing:

-
    - -
  1. getTestMessage() ?> -

    getHelpHtml() ?>

    -
  2. - -
- - - -

Recommendations

-

- Additionally, toTo enhance your Symfony experience, - it’s recommended that you fix the following: -

-
    - -
  1. getTestMessage() ?> -

    getHelpHtml() ?>

    -
  2. - -
- - - hasPhpIniConfigIssue()): ?> -

* - getPhpIniConfigPath()): ?> - Changes to the php.ini file must be done in "getPhpIniConfigPath() ?>". - - To change settings, create a "php.ini". - -

- - - -

All checks passed successfully. Your system is ready to run Symfony applications.

- - - -
-
-
-
Symfony Standard Edition
-
- -