diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-10-23 11:09:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 11:09:17 +0200 |
commit | 1953a872932a63792293b4aec087880265ba89f7 (patch) | |
tree | fd16599e737fcdaf193c933ef3ec4a4ee248b117 /app/AppKernel.php | |
parent | d83d25dadec2c38460a32d96f5d2903426fec9d3 (diff) | |
parent | 702f2d67d60ca963492b90dad74cb5f8dcc84e51 (diff) | |
download | wallabag-1953a872932a63792293b4aec087880265ba89f7.tar.gz wallabag-1953a872932a63792293b4aec087880265ba89f7.tar.zst wallabag-1953a872932a63792293b4aec087880265ba89f7.zip |
Merge pull request #3011 from wallabag/2.3
wallabag 2.3.0
Diffstat (limited to 'app/AppKernel.php')
-rw-r--r-- | app/AppKernel.php | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php index c8382d5f..90e9f1d8 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php | |||
@@ -1,7 +1,7 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use Symfony\Component\HttpKernel\Kernel; | ||
4 | use Symfony\Component\Config\Loader\LoaderInterface; | 3 | use Symfony\Component\Config\Loader\LoaderInterface; |
4 | use Symfony\Component\HttpKernel\Kernel; | ||
5 | 5 | ||
6 | class AppKernel extends Kernel | 6 | class AppKernel extends Kernel |
7 | { | 7 | { |
@@ -48,28 +48,37 @@ class AppKernel extends Kernel | |||
48 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); | 48 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); |
49 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); | 49 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); |
50 | $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); | 50 | $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(); |
51 | $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle(); | ||
52 | |||
53 | if ('test' === $this->getEnvironment()) { | ||
54 | $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle(); | ||
55 | } | ||
51 | } | 56 | } |
52 | 57 | ||
53 | return $bundles; | 58 | return $bundles; |
54 | } | 59 | } |
55 | 60 | ||
56 | public function getRootDir() | ||
57 | { | ||
58 | return __DIR__; | ||
59 | } | ||
60 | |||
61 | public function getCacheDir() | 61 | public function getCacheDir() |
62 | { | 62 | { |
63 | return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); | 63 | return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); |
64 | } | 64 | } |
65 | 65 | ||
66 | public function getLogDir() | 66 | public function getLogDir() |
67 | { | 67 | { |
68 | return dirname(__DIR__).'/var/logs'; | 68 | return dirname(__DIR__) . '/var/logs'; |
69 | } | 69 | } |
70 | 70 | ||
71 | public function registerContainerConfiguration(LoaderInterface $loader) | 71 | public function registerContainerConfiguration(LoaderInterface $loader) |
72 | { | 72 | { |
73 | $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); | 73 | $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml'); |
74 | $loader->load(function ($container) { | ||
75 | if ($container->getParameter('use_webpack_dev_server')) { | ||
76 | $container->loadFromExtension('framework', [ | ||
77 | 'assets' => [ | ||
78 | 'base_url' => 'http://localhost:8080/', | ||
79 | ], | ||
80 | ]); | ||
81 | } | ||
82 | }); | ||
74 | } | 83 | } |
75 | } | 84 | } |