-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
AppKernel.php
48 lines (41 loc) · 1.44 KB
/
AppKernel.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
public function registerBundles(): iterable
{
return [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sylius\Bundle\LocaleBundle\SyliusLocaleBundle(),
new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
];
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config.yml');
}
protected function getContainerBaseClass(): string
{
if (str_starts_with($this->environment, 'test')) {
return MockerContainer::class;
}
return parent::getContainerBaseClass();
}
}