Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
10 */ | 10 */ |
11 | 11 |
12 namespace Symfony\Component\DependencyInjection\Compiler; | 12 namespace Symfony\Component\DependencyInjection\Compiler; |
13 | 13 |
14 use Symfony\Component\DependencyInjection\Definition; | 14 use Symfony\Component\DependencyInjection\Definition; |
15 use Symfony\Component\DependencyInjection\Exception\RuntimeException; | |
15 use Symfony\Component\DependencyInjection\Reference; | 16 use Symfony\Component\DependencyInjection\Reference; |
16 use Symfony\Component\DependencyInjection\Exception\RuntimeException; | |
17 | 17 |
18 /** | 18 /** |
19 * Checks the validity of references. | 19 * Checks the validity of references. |
20 * | 20 * |
21 * The following checks are performed by this pass: | 21 * The following checks are performed by this pass: |
32 } | 32 } |
33 if ($value instanceof Reference && $this->container->hasDefinition((string) $value)) { | 33 if ($value instanceof Reference && $this->container->hasDefinition((string) $value)) { |
34 $targetDefinition = $this->container->getDefinition((string) $value); | 34 $targetDefinition = $this->container->getDefinition((string) $value); |
35 | 35 |
36 if ($targetDefinition->isAbstract()) { | 36 if ($targetDefinition->isAbstract()) { |
37 throw new RuntimeException(sprintf( | 37 throw new RuntimeException(sprintf('The definition "%s" has a reference to an abstract definition "%s". Abstract definitions cannot be the target of references.', $this->currentId, $value)); |
38 'The definition "%s" has a reference to an abstract definition "%s". ' | |
39 .'Abstract definitions cannot be the target of references.', | |
40 $this->currentId, | |
41 $value | |
42 )); | |
43 } | 38 } |
44 } | 39 } |
45 | 40 |
46 return parent::processValue($value, $isRoot); | 41 return parent::processValue($value, $isRoot); |
47 } | 42 } |