8000 Don't load class cache and bootstrap file on php 7 by derrabus · Pull Request #1030 · symfony/symfony-standard · GitHub
[go: up one dir, main page]

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

Don't load class cache and bootstrap file on php 7 #1030

Merged
merged 1 commit into from
Dec 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions web/app.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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