8000 updated RegisterControllerArgumentLocatorsPass and fixed CI issues · symfony/symfony@ffbdd40 · GitHub
[go: up one dir, main page]

Skip to content

Commit ffbdd40

Browse files
updated RegisterControllerArgumentLocatorsPass and fixed CI issues
1 parent 958ff16 commit ffbdd40

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class BoundArgument implements ArgumentInterface
2020
const DEFAULTS_BIND = 1;
2121
const INSTANCEOF_BIND = 2;
2222

23-
const MESSAGES = [
23+
public static $messages = [
2424
1 => 'under "_defaults"',
2525
2 => 'under "_instanceof"',
2626
];
@@ -33,12 +33,12 @@ final class BoundArgument implements ArgumentInterface
3333
private $type;
3434
private $file;
3535

36-
public function __construct($value, int $type = 0, string $file = null)
36+
public function __construct($value, $type = 0, $file = null)
3737
{
3838
$this->value = $value;
3939
$this->identifier = ++self::$sequence;
40-
$this->type = $type;
41-
$this->file = $file;
40+
$this->type = (int) $type;
41+
$this->file = (string) $file;
4242
}
4343

4444
/**

src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function process(ContainerBuilder $container)
4141
$message = sprintf('You have a "bind" configured for an argument named "%s" ', $key);
4242

4343
if ($type) {
44-
$message .= BoundArgument::MESSAGES[$type];
44+
$message .= BoundArgument::$messages[$type];
4545
} else {
4646
$message .= sprintf('in service "%s"', $serviceId);
4747
}

src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\HttpKernel\DependencyInjection;
1313

1414
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
15+
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
1516
use Symfony\Component\DependencyInjection\ChildDefinition;
1617
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1718
use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
@@ -141,7 +142,7 @@ public function process(ContainerBuilder $container)
141142
continue;
142143
}
143144

144-
$binding->setValues([$bindingValue, $bindingId, true]);
145+
$binding->setValues([$bindingValue, $bindingId, true, BoundArgument::SERVICE_BIND, null]);
145146
$args[$p->name] = $bindingValue;
146147

147148
continue;

0 commit comments

Comments
 (0)
0