Skip to content

Commit fb0ed54

Browse files
committed
symfony 2.8 bootstrap
1 parent 0f5b1a3 commit fb0ed54

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Bootstraps/Symfony.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,26 @@ public function getStaticDirectory()
4545
*/
4646
public function getApplication()
4747
{
48+
49+
50+
4851
// include applications autoload
4952
$appAutoLoader = './app/autoload.php';
5053
if (file_exists($appAutoLoader)) {
5154
require $appAutoLoader;
52-
} else {
55+
$app = new \AppKernel($this->appenv, $this->debug);
56+
} elseif(file_exists('./vendor/autoload.php')) {
5357
require './vendor/autoload.php';
58+
$app = new \AppKernel($this->appenv, $this->debug);
59+
} else {
60+
$loader = require_once __DIR__.'./app/bootstrap.php.cache';
61+
require_once __DIR__.'/../app/AppKernel.php';
62+
$kernel = new AppKernel('prod', false);
63+
5464
}
5565

5666
//since we need to change some services, we need to manually change some services
57-
$app = new \AppKernel($this->appenv, $this->debug);
67+
5868

5969
//we need to change some services, before the boot, because they would otherwise
6070
//be instantiated and passed to other classes which makes it impossible to replace them.

0 commit comments

Comments
 (0)