merged branch chx/master (PR #7261)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7261). Commits ------- ff8c5ca Unset loading[$id] in ContainerBuilder on exception Discussion ---------- Unset loading[$id] in ContainerBuilder on exception This is the same functionality that Container provides. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | --------------------------------------------------------------------------- by vicb at 2013-03-04T22:43:07Z could you add a unit test and use the standard PR header (symfony.com > doc > contributing). thanks. --------------------------------------------------------------------------- by igorw at 2013-03-04T22:48:02Z Can you add a test case? EDIT: I guess someone beat me to that comment. :)
This commit is contained in:
commit
71cba81b89
@ -350,7 +350,12 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
|
|
||||||
$this->loading[$id] = true;
|
$this->loading[$id] = true;
|
||||||
|
|
||||||
|
try {
|
||||||
$service = $this->createService($definition, $id);
|
$service = $this->createService($definition, $id);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
unset($this->loading[$id]);
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
unset($this->loading[$id]);
|
unset($this->loading[$id]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user