Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass::validateScope
Validates the scope of a single Reference.
Signature
private function validateScope(Reference
$reference,
[Definition
$definition = null] )
Parameters
$reference
— Symfony\Component\DependencyInjection\Reference
$definition
— Symfony\Component\DependencyInjection\Definition
Errors/Exceptions
-
ScopeWideningInjectionException
- when the definition references a service of a narrower scope
-
ScopeCrossingInjectionException
- when the definition references a service of another scope hierarchy