@@ -19,25 +19,17 @@ class AppKernel extends Kernel
19
19
*/
20
20
private static $ cacheDir ;
21
21
22
- /**
23
- * {@inheritdoc}
24
- */
25
22
public function registerBundles (): iterable
26
23
{
27
- $ bundles = [
24
+ return [
28
25
new \Symfony \Bundle \FrameworkBundle \FrameworkBundle (),
29
26
new \Symfony \Bundle \TwigBundle \TwigBundle (),
30
27
new \Http \HttplugBundle \HttplugBundle (),
28
+ new Symfony \Bundle \WebProfilerBundle \WebProfilerBundle (),
31
29
];
32
-
33
- if (in_array ($ this ->getEnvironment (), ['dev ' , 'test ' , 'psr18 ' ])) {
34
- $ bundles [] = new Symfony \Bundle \WebProfilerBundle \WebProfilerBundle ();
35
- }
36
-
37
- return $ bundles ;
38
30
}
39
31
40
- public function registerContainerConfiguration (LoaderInterface $ loader )
32
+ public function registerContainerConfiguration (LoaderInterface $ loader ): void
41
33
{
42
34
$ loader ->load (function (ContainerBuilder $ container ) use ($ loader ) {
43
35
$ container ->loadFromExtension ('framework ' , [
@@ -54,8 +46,12 @@ public function registerContainerConfiguration(LoaderInterface $loader)
54
46
->setSynthetic (true )
55
47
->setPublic (true )
56
48
;
49
+ // hack around problem with lowest versions build
50
+ if ('dev ' === ($ env = $ this ->getEnvironment ())) {
51
+ $ env = 'test ' ;
52
+ }
57
53
58
- $ loader ->load (__DIR__ .' /config/config_ ' . $ this -> getEnvironment (). ' . yml' );
54
+ $ loader ->load (__DIR__ ." /config/config_ $ env . yml" );
59
55
if ($ this ->isDebug ()) {
60
56
$ loader ->load (__DIR__ .'/config/config_debug.yml ' );
61
57
}
@@ -79,9 +75,6 @@ public function loadRoutes(LoaderInterface $loader): RouteCollection
79
75
return $ collection ;
80
76
}
81
77
82
- /**
83
- * {@inheritdoc}
84
- */
85
78
public function getCacheDir (): string
86
79
{
87
80
if (null === self ::$ cacheDir ) {
@@ -91,15 +84,12 @@ public function getCacheDir(): string
91
84
return sys_get_temp_dir ().'/httplug-bundle/ ' .self ::$ cacheDir ;
92
85
}
93
86
94
- /**
95
- * {@inheritdoc}
96
- */
97
87
public function getLogDir (): string
98
88
{
99
89
return sys_get_temp_dir ().'/httplug-bundle/logs ' ;
100
90
}
101
91
102
- public function indexAction ()
92
+ public function indexAction (): Response
103
93
{
104
94
return new Response ();
105
95
}
0 commit comments