Skip to content

Commit 206d19d

Browse files
committed
fixup! Changed DI alias to ez_platform_cache by renaming EzSystemsPlatformHttpCacheExtension class
1 parent fb3905e commit 206d19d

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

src/EzSystemsPlatformHttpCacheBundle.php

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use EzSystems\PlatformHttpCacheBundle\DependencyInjection\Compiler\DriverPass;
88
use Symfony\Component\DependencyInjection\ContainerBuilder;
99
use Symfony\Component\HttpKernel\Bundle\Bundle;
10-
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
10+
use EzSystems\PlatformHttpCacheBundle\DependencyInjection\EzPlatformHttpCacheExtension;
1111

1212
class 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

Comments
 (0)