File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/Symfony/Component/HttpKernel/Bundle Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,14 @@ public function build(ContainerBuilder $container)
65
65
public function getContainerExtension ()
66
66
{
67
67
if (null === $ this ->extension ) {
68
- $ class = $ this ->getNamespace ().'\\DependencyInjection \\' .str_replace ('Bundle ' , 'Extension ' , $ this ->getName ());
68
+ $ basename = preg_replace ('/Bundle$/ ' , '' , $ this ->getName ());
69
+
70
+ $ class = $ this ->getNamespace ().'\\DependencyInjection \\' .$ basename .'Extension ' ;
69
71
if (class_exists ($ class )) {
70
72
$ extension = new $ class ();
71
73
72
74
// check naming convention
73
- $ expectedAlias = Container::underscore (str_replace ( ' Bundle ' , '' , $ this -> getName ()) );
75
+ $ expectedAlias = Container::underscore ($ basename );
74
76
if ($ expectedAlias != $ extension ->getAlias ()) {
75
77
throw new \LogicException (sprintf (
76
78
'The extension alias for the default extension of a ' .
You can’t perform that action at this time.
0 commit comments