Skip to content

Commit a76ee34

Browse files
committed
fix lowest build
1 parent 3d74b19 commit a76ee34

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

tests/Resources/app/AppKernel.php

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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,11 @@ public function registerContainerConfiguration(LoaderInterface $loader)
5446
->setSynthetic(true)
5547
->setPublic(true)
5648
;
49+
if ('dev' === ($env = $this->getEnvironment())) {
50+
$env = 'test';
51+
}
5752

58-
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
53+
$loader->load(__DIR__."/config/config_$env.yml");
5954
if ($this->isDebug()) {
6055
$loader->load(__DIR__.'/config/config_debug.yml');
6156
}
@@ -79,9 +74,6 @@ public function loadRoutes(LoaderInterface $loader): RouteCollection
7974
return $collection;
8075
}
8176

82-
/**
83-
* {@inheritdoc}
84-
*/
8577
public function getCacheDir(): string
8678
{
8779
if (null === self::$cacheDir) {
@@ -91,15 +83,12 @@ public function getCacheDir(): string
9183
return sys_get_temp_dir().'/httplug-bundle/'.self::$cacheDir;
9284
}
9385

94-
/**
95-
* {@inheritdoc}
96-
*/
9786
public function getLogDir(): string
9887
{
9988
return sys_get_temp_dir().'/httplug-bundle/logs';
10089
}
10190

102-
public function indexAction()
91+
public function indexAction(): Response
10392
{
10493
return new Response();
10594
}

0 commit comments

Comments
 (0)