Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Commit

Permalink
Don't load class cache and bootstrap file on php 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Dec 3, 2016
1 parent 98f42c7 commit 9b2e12f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions web/app.php
Expand Up @@ -4,10 +4,14 @@

/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__.'/../app/autoload.php';
include_once __DIR__.'/../var/bootstrap.php.cache';
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
Expand Down
4 changes: 3 additions & 1 deletion web/app_dev.php
Expand Up @@ -23,7 +23,9 @@
Debug::enable();

$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
if (PHP_VERSION_ID < 70000) {
$kernel->loadClassCache();
}
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
Expand Down

0 comments on commit 9b2e12f

Please sign in to comment.