forked from smartboxgroup/integration-framework-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmartboxIntegrationFrameworkBundle.php
More file actions
25 lines (20 loc) · 1.07 KB
/
SmartboxIntegrationFrameworkBundle.php
File metadata and controls
25 lines (20 loc) · 1.07 KB
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
<?php
namespace Smartbox\Integration\FrameworkBundle;
use Smartbox\Integration\FrameworkBundle\DependencyInjection\CompilerPasses\EventDeferringCompilerPass;
use Smartbox\Integration\FrameworkBundle\DependencyInjection\CompilerPasses\MockWebserviceClientsCompilerPass;
use Smartbox\Integration\FrameworkBundle\DependencyInjection\CompilerPasses\SmokeTestConnectivityCompilerPass;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class SmartboxIntegrationFrameworkBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new EventDeferringCompilerPass(), PassConfig::TYPE_AFTER_REMOVING);
$container->addCompilerPass(new SmokeTestConnectivityCompilerPass());
if ($container->getParameter('kernel.environment') == 'test') {
$container->addCompilerPass(new MockWebserviceClientsCompilerPass(), PassConfig::TYPE_AFTER_REMOVING);
}
}
}