File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/Symfony/Component/HttpKernel Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -424,9 +424,13 @@ protected function initializeBundles()
424
424
$ this ->topMostBundles = array ();
425
425
$ this ->directChildrenBundles = array ();
426
426
427
+ // Register root bundles
427
428
foreach ($ this ->registerBundles () as $ bundle ) {
428
429
$ this ->addBundle ($ bundle );
430
+ }
429
431
432
+ // Register dependencies
433
+ foreach ($ this ->bundles as $ bundle ) {
430
434
foreach ($ bundle ->getBundleDependencies () as $ bundleDependency ) {
431
435
$ this ->addBundle ($ bundleDependency , true );
432
436
}
@@ -466,11 +470,7 @@ protected function addBundle($bundle, $dependency = false)
466
470
{
467
471
$ name = $ bundle ->getName ();
468
472
469
- // Register dependencies only if not already registered
470
- if (isset ($ this ->bundles [$ name ]) && true === $ dependency ) {
471
- return ;
472
- }
473
- if (isset ($ this ->bundles [$ name ])) {
473
+ if (isset ($ this ->bundles [$ name ]) && false === $ dependency ) {
474
474
throw new \LogicException (sprintf ('Trying to register two bundles with the same name "%s" ' , $ name ));
475
475
}
476
476
$ this ->bundles [$ name ] = $ bundle ;
You can’t perform that action at this time.
0 commit comments