-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSmartboxIntegrationFrameworkBundle.php
More file actions
27 lines (22 loc) · 1.24 KB
/
SmartboxIntegrationFrameworkBundle.php
File metadata and controls
27 lines (22 loc) · 1.24 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
26
27
<?php
namespace Smartbox\Integration\FrameworkBundle;
use Smartbox\Integration\FrameworkBundle\DependencyInjection\CompilerPasses\EventDeferringCompilerPass;
use Smartbox\Integration\FrameworkBundle\DependencyInjection\CompilerPasses\ExpressionLanguageCachePass;
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());
$container->addCompilerPass(new ExpressionLanguageCachePass());
if ('test' == $container->getParameter('kernel.environment')) {
$container->addCompilerPass(new MockWebserviceClientsCompilerPass(), PassConfig::TYPE_AFTER_REMOVING);
}
}
}