composer update
This commit is contained in:
@@ -122,7 +122,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface
|
||||
$args = array();
|
||||
foreach ($parameters as $p) {
|
||||
/** @var \ReflectionParameter $p */
|
||||
$type = $target = ProxyHelper::getTypeHint($r, $p, true);
|
||||
$type = ltrim($target = ProxyHelper::getTypeHint($r, $p), '\\');
|
||||
$invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
|
||||
|
||||
if (isset($arguments[$r->name][$p->name])) {
|
||||
@@ -134,7 +134,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface
|
||||
} elseif ($p->allowsNull() && !$p->isOptional()) {
|
||||
$invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
|
||||
}
|
||||
} elseif (isset($bindings[$bindingName = '$'.$p->name]) || isset($bindings[$bindingName = $type])) {
|
||||
} elseif (isset($bindings[$bindingName = $type.' $'.$p->name]) || isset($bindings[$bindingName = '$'.$p->name]) || isset($bindings[$bindingName = $type])) {
|
||||
$binding = $bindings[$bindingName];
|
||||
|
||||
list($bindingValue, $bindingId) = $binding->getValues();
|
||||
@@ -150,7 +150,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface
|
||||
}
|
||||
|
||||
continue;
|
||||
} elseif (!$type || !$autowire) {
|
||||
} elseif (!$type || !$autowire || '\\' !== $target[0]) {
|
||||
continue;
|
||||
} elseif (!$p->allowsNull()) {
|
||||
$invalidBehavior = ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE;
|
||||
@@ -171,7 +171,8 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface
|
||||
throw new InvalidArgumentException($message);
|
||||
}
|
||||
|
||||
$args[$p->name] = $type ? new TypedReference($target, $type, $invalidBehavior) : new Reference($target, $invalidBehavior);
|
||||
$target = ltrim($target, '\\');
|
||||
$args[$p->name] = $type ? new TypedReference($target, $type, $invalidBehavior, $p->name) : new Reference($target, $invalidBehavior);
|
||||
}
|
||||
// register the maps as a per-method service-locators
|
||||
if ($args) {
|
||||
|
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\DependencyInjection;
|
||||
|
||||
use Symfony\Contracts\Service\ResetInterface;
|
||||
|
||||
/**
|
||||
* Resets provided services.
|
||||
*
|
||||
@@ -19,7 +21,7 @@ namespace Symfony\Component\HttpKernel\DependencyInjection;
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class ServicesResetter
|
||||
class ServicesResetter implements ResetInterface
|
||||
{
|
||||
private $resettableServices;
|
||||
private $resetMethods;
|
||||
|
Reference in New Issue
Block a user