BundleDependenciesResolver.php
private function prioritizeBundle(
        array &$bundleStack,
        $elementToPrioritize
    ) {
        $elementNamespace = $this->getBundleDefinitionNamespace($elementToPrioritize);
        foreach ($bundleStack as $bundlePosition => $bundle) {
            $bundleNamespace = $this->getBundleDefinitionNamespace($bundle);

            if ($elementNamespace == $bundleNamespace) {
                unset($bundleStack[$bundlePosition]);
            }
        }
        array_unshift($bundleStack, $elementToPrioritize);
    }
private function prioritizeBundle(
        array &$bundleStack,
        $elementToPrioritize
    ) {
        $elementNamespace = $this->getBundleDefinitionNamespace($elementToPrioritize);
        foreach ($bundleStack as $bundlePosition => $bundle) {
            $bundleNamespace = $this->getBundleDefinitionNamespace($bundle);

            if ($elementNamespace == $bundleNamespace) {
                unset($bundleStack[$bundlePosition]);
            }
        }
        array_unshift($bundleStack, $elementToPrioritize);
    }
private function prioritizeBundle ( array & $ bundleStack , $ elementToPrioritize ) { $ elementNamespace = $ this -> getBundleDefinitionNamespace ( $ elementToPrioritize ) ; foreach ( $ bundleStack as $ bundlePosition => $ bundle ) { $ bundleNamespace = $ this -> getBundleDefinitionNamespace ( $ bundle ) ; if ( $ elementNamespace == $ bundleNamespace ) { unset ( $ bundleStack [ $ bundlePosition ] ) ; } } array_unshift ( $ bundleStack , $ elementToPrioritize ) ; }
Given the global bundle stack and a bundle definition, considering this
bundle definition as an instance or a namespace, prioritize this bundle
inside this stack.

To prioritize a bundle means that must be placed in the beginning of the
stack. If already exists, then remove the old entry just before adding it
again.

@param array                  $bundleStack
@param BundleInterface|string $elementToPrioritize
Given the global bundle stack and a bundle definition considering this bundle definition as an instance or a namespace prioritize this bundle inside this stack .