Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3330c40

Browse files
committed
[HttpKernel] made a small optimization to Bundle initialization
1 parent 4ba6c0b commit 3330c40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,9 @@ protected function initializeBundles()
495495
}
496496

497497
// look for orphans
498-
if (!empty($directChildren) && count($diff = array_values(array_diff(array_keys($directChildren), array_keys($this->bundles))))) {
498+
if (!empty($directChildren) && count($diff = array_diff_key($directChildren, $this->bundles))) {
499+
$diff = array_keys($diff);
500+
499501
throw new \LogicException(sprintf('Bundle "%s" extends bundle "%s", which is not registered.', $directChildren[$diff[0]], $diff[0]));
500502
}
501503

0 commit comments

Comments
 (0)