From 328bbfb0713595e591b8a178576b08a25487edac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Bogusz?= Date: Sun, 20 Jan 2019 15:09:54 +0100 Subject: [PATCH] updated RegisterControllerArgumentLocatorsPass and fixed CI issues --- .../Component/DependencyInjection/Argument/BoundArgument.php | 2 +- .../DependencyInjection/Compiler/ResolveBindingsPass.php | 2 +- .../RegisterControllerArgumentLocatorsPass.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php b/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php index f75bbf39caaba..73c2c08706b22 100644 --- a/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php +++ b/src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php @@ -20,7 +20,7 @@ final class BoundArgument implements ArgumentInterface const DEFAULTS_BIND = 1; const INSTANCEOF_BIND = 2; - const MESSAGES = [ + public static $messages = [ 1 => 'under "_defaults"', 2 => 'under "_instanceof"', ]; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php index 8f184fa5b7bf5..1415bf354755d 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php @@ -41,7 +41,7 @@ public function process(ContainerBuilder $container) $message = sprintf('You have a "bind" configured for an argument named "%s" ', $key); if ($type) { - $message .= BoundArgument::MESSAGES[$type]; + $message .= BoundArgument::$messages[$type]; } else { $message .= sprintf('in service "%s"', $serviceId); } diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index d021c6ee8a126..cdfe02f89fc98 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -12,6 +12,7 @@ namespace Symfony\Component\HttpKernel\DependencyInjection; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\DependencyInjection\Argument\BoundArgument; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; @@ -141,7 +142,7 @@ public function process(ContainerBuilder $container) continue; } - $binding->setValues([$bindingValue, $bindingId, true]); + $binding->setValues([$bindingValue, $bindingId, true, BoundArgument::SERVICE_BIND, null]); $args[$p->name] = $bindingValue; continue;