Skip to content

Commit

Permalink
Resolve parameter placeholders in values injected into Doctrine repos…
Browse files Browse the repository at this point in the history
…itories.

Fixes schmittjoh#219.
  • Loading branch information
Adirelle committed Dec 22, 2015
1 parent 15f74d3 commit 11e6d73
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Generator/RepositoryInjectionGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,9 @@ public function generate(\ReflectionClass $original, PhpClass $proxy)
->indent()
->writeln('$processed[] = $this->container->get((string) $arg, $arg->getInvalidBehavior());')
->outdent()
->writeln('} else if ($arg instanceof \Symfony\Component\DependencyInjection\Parameter) {')
->indent()
->writeln('$processed[] = $this->container->getParameter((string) $arg);')
->outdent()
->writeln('} else {')
->indent()
->writeln('$processed[] = $arg;')
->writeln('$processed[] = $this->container->getParameterBag()->resolveValue((string) $arg);')
->outdent()
->writeln('}')
->outdent()
Expand Down

0 comments on commit 11e6d73

Please sign in to comment.