Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Compiler/AutowirePass.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 |
---|---|
231 // be false when isOptional() returns true. If the | 231 // be false when isOptional() returns true. If the |
232 // argument *is* optional, allow it to be missing | 232 // argument *is* optional, allow it to be missing |
233 if ($parameter->isOptional()) { | 233 if ($parameter->isOptional()) { |
234 continue; | 234 continue; |
235 } | 235 } |
236 throw new AutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" must have a type-hint or be given a value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method)); | 236 $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, false); |
237 $type = $type ? sprintf('is type-hinted "%s"', $type) : 'has no type-hint'; | |
238 | |
239 throw new AutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" %s, you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method, $type)); | |
237 } | 240 } |
238 | 241 |
239 // specifically pass the default value | 242 // specifically pass the default value |
240 $arguments[$index] = $parameter->getDefaultValue(); | 243 $arguments[$index] = $parameter->getDefaultValue(); |
241 | 244 |