} /**
* Returns the bundle's container extension.
*
* @throws \LogicException
*/
public function getContainerExtension(): ?ExtensionInterface
{ if (null ===
$this->extension
) { $extension =
$this->
createContainerExtension();
if (null !==
$extension) { if (!
$extension instanceof ExtensionInterface
) { throw new \
LogicException(sprintf('Extension "%s" must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.',
get_debug_type($extension)));
} // check naming convention
$basename =
preg_replace('/Bundle$/', '',
$this->
getName());
$expectedAlias = Container::
underscore($basename);
if ($expectedAlias !=
$extension->
getAlias()) {