Browse Source

[DependencyInjection] create inlined private service from it's definition

everzet 14 years ago
parent
commit
b6ce137e2d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/Symfony/Component/DependencyInjection/ContainerBuilder.php

+ 3 - 1
src/Symfony/Component/DependencyInjection/ContainerBuilder.php

@@ -742,8 +742,10 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
             foreach ($value as &$v) {
                 $v = $this->resolveServices($v);
             }
-        } else if (is_object($value) && $value instanceof Reference) {
+        } elseif (is_object($value) && $value instanceof Reference) {
             $value = $this->get((string) $value, $value->getInvalidBehavior());
+        } elseif (is_object($value) && $value instanceof Definition) {
+            $value = $this->createService($value, null);
         }
 
         return $value;