Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 1fec387a4317 |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
116 return $this->getReflectionMethod(new Definition($class), $method); | 116 return $this->getReflectionMethod(new Definition($class), $method); |
117 } | 117 } |
118 | 118 |
119 $class = $definition->getClass(); | 119 $class = $definition->getClass(); |
120 | 120 |
121 if (!$r = $this->container->getReflectionClass($class)) { | 121 try { |
122 throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class)); | 122 if (!$r = $this->container->getReflectionClass($class)) { |
123 throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class)); | |
124 } | |
125 } catch (\ReflectionException $e) { | |
126 throw new RuntimeException(sprintf('Invalid service "%s": %s.', $this->currentId, lcfirst(rtrim($e->getMessage(), '.')))); | |
123 } | 127 } |
124 if (!$r = $r->getConstructor()) { | 128 if (!$r = $r->getConstructor()) { |
125 if ($required) { | 129 if ($required) { |
126 throw new RuntimeException(sprintf('Invalid service "%s": class%s has no constructor.', $this->currentId, sprintf($class !== $this->currentId ? ' "%s"' : '', $class))); | 130 throw new RuntimeException(sprintf('Invalid service "%s": class%s has no constructor.', $this->currentId, sprintf($class !== $this->currentId ? ' "%s"' : '', $class))); |
127 } | 131 } |