Skip to content

Commit

Permalink
bug #30616 Fix case when multiple loaders are providing paths for the…
Browse files Browse the repository at this point in the history
… same namespace (yceruto)

This PR was merged into the 4.2 branch.

Discussion
----------

Fix case when multiple loaders are providing paths for the same namespace

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

Fixes @stof #30440 (comment)

Let me know if a test case is necessary for this.

Cheers!

Commits
-------

393d728 Fix case when multiple loaders are providing paths for the same namespace
  • Loading branch information
fabpot committed Mar 20, 2019
2 parents 2de59a1 + 393d728 commit b296860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/Command/DebugCommand.php
Expand Up @@ -264,7 +264,7 @@ private function getLoaderPaths(string $name = null): array
$namespace = '@'.$namespace;
}

$loaderPaths[$namespace] = $paths;
$loaderPaths[$namespace] = array_merge($loaderPaths[$namespace] ?? [], $paths);
}
}

Expand Down

0 comments on commit b296860

Please sign in to comment.