vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php line 27

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\CoreBundle;
  12. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\BackwardsCompatibility\ResolveShopUserTargetEntityPass;
  13. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\IgnoreAnnotationsPass;
  14. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\LazyCacheWarmupPass;
  15. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\LiipImageFiltersPass;
  16. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterTaxCalculationStrategiesPass;
  17. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterUriBasedSectionResolverPass;
  18. use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\TranslatableEntityLocalePass;
  19. use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
  20. use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
  21. use Symfony\Component\DependencyInjection\ContainerBuilder;
  22. final class SyliusCoreBundle extends AbstractResourceBundle
  23. {
  24.     public function getSupportedDrivers(): array
  25.     {
  26.         return [
  27.             SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
  28.         ];
  29.     }
  30.     public function build(ContainerBuilder $container): void
  31.     {
  32.         parent::build($container);
  33.         $container->addCompilerPass(new LazyCacheWarmupPass());
  34.         $container->addCompilerPass(new RegisterTaxCalculationStrategiesPass());
  35.         $container->addCompilerPass(new TranslatableEntityLocalePass());
  36.         $container->addCompilerPass(new IgnoreAnnotationsPass());
  37.         $container->addCompilerPass(new ResolveShopUserTargetEntityPass());
  38.         $container->addCompilerPass(new RegisterUriBasedSectionResolverPass());
  39.         $container->addCompilerPass(new LiipImageFiltersPass());
  40.     }
  41.     /**
  42.      * @psalm-suppress MismatchingDocblockReturnType https://github.com/vimeo/psalm/issues/2345
  43.      */
  44.     protected function getModelNamespace(): string
  45.     {
  46.         return 'Sylius\Component\Core\Model';
  47.     }
  48. }