src/Core/DevOps/DevOps.php line 15

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\DevOps;
  3. use Shopware\Core\Framework\Bundle;
  4. use Shopware\Core\Framework\Log\Package;
  5. use Symfony\Component\Config\FileLocator;
  6. use Symfony\Component\DependencyInjection\ContainerBuilder;
  7. use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
  8. /**
  9.  * @internal
  10.  */
  11. #[Package('core')]
  12. class DevOps extends Bundle
  13. {
  14.     /**
  15.      * {@inheritdoc}
  16.      */
  17.     public function build(ContainerBuilder $container): void
  18.     {
  19.         parent::build($container);
  20.         $loader = new XmlFileLoader($container, new FileLocator(__DIR__ '/DependencyInjection'));
  21.         $loader->load('services.xml');
  22.         $environment $container->getParameter('kernel.environment');
  23.         if ($environment === 'e2e') {
  24.             $loader->load('services_e2e.xml');
  25.         }
  26.     }
  27. }