X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FAppKernel.php;h=f1140943dbc952c56635357e6175fb4ce97eb94a;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=fe61b255dd9c80b37f606d0f2185801b22db5057;hpb=dcae2fc25d81229d15a8ace1949d6f443ab6036f;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/AppKernel.php b/app/AppKernel.php index fe61b255..f1140943 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -1,42 +1,88 @@ getEnvironment(), array('dev', 'test'))) { + // wallabag bundles + new Wallabag\CoreBundle\WallabagCoreBundle(), + new Wallabag\ApiBundle\WallabagApiBundle(), + new Wallabag\UserBundle\WallabagUserBundle(), + new Wallabag\ImportBundle\WallabagImportBundle(), + new Wallabag\AnnotationBundle\WallabagAnnotationBundle(), + new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(), + ]; + + 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(); $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); + + if ('test' === $this->getEnvironment()) { + $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle(); + } } 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(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); + $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); + $loader->load(function ($container) { + if ($container->getParameter('use_webpack_dev_server')) { + $container->loadFromExtension('framework', [ + 'assets' => [ + 'base_url' => 'http://localhost:8080/', + ], + ]); + } + }); } }