[HttpKernel] don't try to wire Request argument with controller.service_arguments
This does not make sense as Request is not a service and it's already handled by RequestValueResolver.
This commit is contained in:
parent
ed42760b41
commit
09b9eb2395
@ -22,6 +22,7 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
|||||||
use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
|
use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
|
||||||
use Symfony\Component\DependencyInjection\Reference;
|
use Symfony\Component\DependencyInjection\Reference;
|
||||||
use Symfony\Component\DependencyInjection\TypedReference;
|
use Symfony\Component\DependencyInjection\TypedReference;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the service-locators required by ServiceValueResolver.
|
* Creates the service-locators required by ServiceValueResolver.
|
||||||
@ -148,6 +149,10 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Request::class === $type) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($type && !$p->isOptional() && !$p->allowsNull() && !class_exists($type) && !interface_exists($type, false)) {
|
if ($type && !$p->isOptional() && !$p->allowsNull() && !class_exists($type) && !interface_exists($type, false)) {
|
||||||
$message = sprintf('Cannot determine controller argument for "%s::%s()": the $%s argument is type-hinted with the non-existent class or interface: "%s".', $class, $r->name, $p->name, $type);
|
$message = sprintf('Cannot determine controller argument for "%s::%s()": the $%s argument is type-hinted with the non-existent class or interface: "%s".', $class, $r->name, $p->name, $type);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user