@@ -19,25 +19,17 @@ class AppKernel extends Kernel
1919 */
2020 private static $ cacheDir ;
2121
22- /**
23- * {@inheritdoc}
24- */
2522 public function registerBundles (): iterable
2623 {
27- $ bundles = [
24+ return [
2825 new \Symfony \Bundle \FrameworkBundle \FrameworkBundle (),
2926 new \Symfony \Bundle \TwigBundle \TwigBundle (),
3027 new \Http \HttplugBundle \HttplugBundle (),
28+ new Symfony \Bundle \WebProfilerBundle \WebProfilerBundle (),
3129 ];
32-
33- if (in_array ($ this ->getEnvironment (), ['dev ' , 'test ' , 'psr18 ' ])) {
34- $ bundles [] = new Symfony \Bundle \WebProfilerBundle \WebProfilerBundle ();
35- }
36-
37- return $ bundles ;
3830 }
3931
40- public function registerContainerConfiguration (LoaderInterface $ loader )
32+ public function registerContainerConfiguration (LoaderInterface $ loader ): void
4133 {
4234 $ loader ->load (function (ContainerBuilder $ container ) use ($ loader ) {
4335 $ container ->loadFromExtension ('framework ' , [
@@ -54,8 +46,12 @@ public function registerContainerConfiguration(LoaderInterface $loader)
5446 ->setSynthetic (true )
5547 ->setPublic (true )
5648 ;
49+ // hack around problem with lowest versions build
50+ if ('dev ' === ($ env = $ this ->getEnvironment ())) {
51+ $ env = 'test ' ;
52+ }
5753
58- $ loader ->load (__DIR__ .' /config/config_ ' . $ this -> getEnvironment (). ' . yml' );
54+ $ loader ->load (__DIR__ ." /config/config_ $ env . yml" );
5955 if ($ this ->isDebug ()) {
6056 $ loader ->load (__DIR__ .'/config/config_debug.yml ' );
6157 }
@@ -79,9 +75,6 @@ public function loadRoutes(LoaderInterface $loader): RouteCollection
7975 return $ collection ;
8076 }
8177
82- /**
83- * {@inheritdoc}
84- */
8578 public function getCacheDir (): string
8679 {
8780 if (null === self ::$ cacheDir ) {
@@ -91,15 +84,12 @@ public function getCacheDir(): string
9184 return sys_get_temp_dir ().'/httplug-bundle/ ' .self ::$ cacheDir ;
9285 }
9386
94- /**
95- * {@inheritdoc}
96- */
9787 public function getLogDir (): string
9888 {
9989 return sys_get_temp_dir ().'/httplug-bundle/logs ' ;
10090 }
10191
102- public function indexAction ()
92+ public function indexAction (): Response
10393 {
10494 return new Response ();
10595 }
0 commit comments