@@ -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,11 @@ public function registerContainerConfiguration(LoaderInterface $loader)
54
46
->setSynthetic (true )
55
47
->setPublic (true )
56
48
;
49
+ if ('dev ' === ($ env = $ this ->getEnvironment ())) {
50
+ $ env = 'test ' ;
51
+ }
57
52
58
- $ loader ->load (__DIR__ .' /config/config_ ' . $ this -> getEnvironment (). ' . yml' );
53
+ $ loader ->load (__DIR__ ." /config/config_ $ env . yml" );
59
54
if ($ this ->isDebug ()) {
60
55
$ loader ->load (__DIR__ .'/config/config_debug.yml ' );
61
56
}
@@ -79,9 +74,6 @@ public function loadRoutes(LoaderInterface $loader): RouteCollection
79
74
return $ collection ;
80
75
}
81
76
82
- /**
83
- * {@inheritdoc}
84
- */
85
77
public function getCacheDir (): string
86
78
{
87
79
if (null === self ::$ cacheDir ) {
@@ -91,15 +83,12 @@ public function getCacheDir(): string
91
83
return sys_get_temp_dir ().'/httplug-bundle/ ' .self ::$ cacheDir ;
92
84
}
93
85
94
- /**
95
- * {@inheritdoc}
96
- */
97
86
public function getLogDir (): string
98
87
{
99
88
return sys_get_temp_dir ().'/httplug-bundle/logs ' ;
100
89
}
101
90
102
- public function indexAction ()
91
+ public function indexAction (): Response
103
92
{
104
93
return new Response ();
105
94
}
0 commit comments