Skip to content

Commit c090c68

Browse files
Merge branch '4.0'
* 4.0: PhpDoc: There is no attempt to create the directory Avoiding an error when an unused service has a missing base class Add an implementation just for php 7.0 bumped Symfony version to 2.7.47 Fix #27011: Session ini_set bug [Cache] TagAwareAdapterInterface::invalidateTags() should commit deferred items updated VERSION for 2.7.46 update CONTRIBUTORS for 2.7.46 updated CHANGELOG for 2.7.46 bug #25844 [HttpKernel] Catch HttpExceptions when templating is not installed
2 parents 2e8e960 + 1f99622 commit c090c68

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Compiler/ResolveBindingsPass.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\Definition;
1717
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
18+
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
1819
use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
1920
use Symfony\Component\DependencyInjection\TypedReference;
2021
use Symfony\Component\DependencyInjection\Reference;
@@ -88,8 +89,14 @@ protected function processValue($value, $isRoot = false)
8889

8990
$calls = $value->getMethodCalls();
9091

91-
if ($constructor = $this->getConstructor($value, false)) {
92-
$calls[] = array($constructor, $value->getArguments());
92+
try {
93+
if ($constructor = $this->getConstructor($value, false)) {
94+
$calls[] = array($constructor, $value->getArguments());
95+
}
96+
} catch (RuntimeException $e) {
97+
$this->container->getDefinition($this->currentId)->addError($e->getMessage());
98+
99+
return parent::processValue($value, $isRoot);
93100
}
94101

95102
foreach ($calls as $i => $call) {

0 commit comments

Comments
 (0)