mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
60 lines
1.4 KiB
PHP
60 lines
1.4 KiB
PHP
<?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);
|
|
/*
|
|
* 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.
|
|
*/
|
|
|
|
use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer;
|
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
|
use Symfony\Component\HttpKernel\Kernel;
|
|
|
|
class AppKernel extends Kernel
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function registerBundles(): array
|
|
{
|
|
return [
|
|
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
|
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
|
|
new Sylius\Bundle\GridBundle\SyliusGridBundle(),
|
|
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function registerContainerConfiguration(LoaderInterface $loader): void
|
|
{
|
|
$loader->load(__DIR__ . '/config/config.yml');
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function getContainerBaseClass(): string
|
|
{
|
|
if ('test' === $this->environment) {
|
|
return MockerContainer::class;
|
|
}
|
|
|
|
return parent::getContainerBaseClass();
|
|
}
|
|
}
|