1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Switch to Symfony 3 structure

This commit is contained in:
Jeremy Benoist 2016-01-14 18:15:07 +01:00
parent 1d405d0e62
commit 73cd160bfc
21 changed files with 65 additions and 33 deletions

View file

@ -7,7 +7,7 @@ class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
@ -33,9 +33,9 @@ class AppKernel extends Kernel
new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
new Wallabag\ImportBundle\WallabagImportBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
);
];
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
@ -46,6 +46,21 @@ class AppKernel extends Kernel
return $bundles;
}
public function getRootDir()
{
return __DIR__;
}
public function getCacheDir()
{
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
}
public function getLogDir()
{
return dirname(__DIR__).'/var/logs';
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');