vendor/sylius/sylius/src/Sylius/Bundle/PayumBundle/SyliusPayumBundle.php line 24

  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\PayumBundle;
  12. use Sylius\Bundle\PayumBundle\DependencyInjection\Compiler\InjectContainerIntoControllersPass;
  13. use Sylius\Bundle\PayumBundle\DependencyInjection\Compiler\RegisterGatewayConfigTypePass;
  14. use Sylius\Bundle\PayumBundle\DependencyInjection\Compiler\UnregisterStripeGatewayTypePass;
  15. use Sylius\Bundle\PayumBundle\DependencyInjection\Compiler\UseTweakedDoctrineStoragePass;
  16. use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
  17. use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
  18. use Symfony\Component\DependencyInjection\ContainerBuilder;
  19. final class SyliusPayumBundle extends AbstractResourceBundle
  20. {
  21.     public function getSupportedDrivers(): array
  22.     {
  23.         return [
  24.             SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
  25.         ];
  26.     }
  27.     public function build(ContainerBuilder $container): void
  28.     {
  29.         parent::build($container);
  30.         $container->addCompilerPass(new InjectContainerIntoControllersPass());
  31.         $container->addCompilerPass(new RegisterGatewayConfigTypePass());
  32.         $container->addCompilerPass(new UseTweakedDoctrineStoragePass());
  33.         $container->addCompilerPass(new UnregisterStripeGatewayTypePass(), priority128);
  34.     }
  35. }