mirror of
https://github.com/quentin-g-dev/afup.git
synced 2026-03-24 09:12:16 +01:00
On utilise la vrsion 1.5.13 en la forçant dans le composer.json car la version 1.5.14 ne fonctionne pas avec notre ancienne version de twig.
54 lines
1.7 KiB
PHP
54 lines
1.7 KiB
PHP
<?php
|
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
|
use Symfony\Component\HttpKernel\Kernel;
|
|
|
|
class AppKernel extends Kernel
|
|
{
|
|
public function registerBundles()
|
|
{
|
|
$bundles = [
|
|
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
|
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
|
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
|
new Symfony\Bundle\MonologBundle\MonologBundle(),
|
|
new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
|
|
new \CCMBenchmark\TingBundle\TingBundle(),
|
|
new \KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle(),
|
|
new AppBundle\AppBundle(),
|
|
new \JMS\SerializerBundle\JMSSerializerBundle(),
|
|
new Presta\SitemapBundle\PrestaSitemapBundle(),
|
|
new EWZ\Bundle\RecaptchaBundle\EWZRecaptchaBundle(),
|
|
];
|
|
|
|
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();
|
|
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
|
}
|
|
|
|
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');
|
|
}
|
|
}
|