77use EzSystems \PlatformHttpCacheBundle \DependencyInjection \Compiler \DriverPass ;
88use Symfony \Component \DependencyInjection \ContainerBuilder ;
99use Symfony \Component \HttpKernel \Bundle \Bundle ;
10- use Symfony \ Component \DependencyInjection \Extension \ ExtensionInterface ;
10+ use EzSystems \ PlatformHttpCacheBundle \DependencyInjection \EzPlatformHttpCacheExtension ;
1111
1212class EzSystemsPlatformHttpCacheBundle extends Bundle
1313{
@@ -22,30 +22,6 @@ public function build(ContainerBuilder $container)
2222
2323 public function getContainerExtension ()
2424 {
25- // We need to overload Bundle::getContainerExtension() because we change DI alias in
26- // EzSystemsPlatformHttpCacheExtension::getAlias()
27- // Bundle::getContainerExtension() has a check that alias matches underscored version of the bundle name
28- if (null === $ this ->extension ) {
29- $ extension = $ this ->createContainerExtension ();
30-
31- if (null !== $ extension ) {
32- if (!$ extension instanceof ExtensionInterface) {
33- throw new \LogicException (sprintf ('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface. ' , get_class ($ extension )));
34- }
35-
36- $ this ->extension = $ extension ;
37- } else {
38- $ this ->extension = false ;
39- }
40- }
41-
42- if ($ this ->extension ) {
43- return $ this ->extension ;
44- }
45- }
46-
47- protected function getContainerExtensionClass ()
48- {
49- return 'EzSystems\PlatformHttpCacheBundle\DependencyInjection\EzPlatformHttpCacheExtension ' ;
25+ return new EzPlatformHttpCacheExtension ();
5026 }
5127}
0 commit comments