mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°5809 Update Symfony artifacts from 6.4.0 to 6.4.2
symfony/console symfony/dotenv symfony/framework-bundle symfony/http-foundation symfony/http-kernel symfony/var-dumper symfony/web-profiler-bundle
This commit is contained in:
@@ -190,16 +190,19 @@ class ResolveBindingsPass extends AbstractRecursivePass
|
||||
|
||||
$typeHint = ltrim(ProxyHelper::exportType($parameter) ?? '', '?');
|
||||
|
||||
$name = Target::parseName($parameter);
|
||||
$name = Target::parseName($parameter, parsedName: $parsedName);
|
||||
|
||||
if ($typeHint && \array_key_exists($k = preg_replace('/(^|[(|&])\\\\/', '\1', $typeHint).' $'.$name, $bindings)) {
|
||||
if ($typeHint && (
|
||||
\array_key_exists($k = preg_replace('/(^|[(|&])\\\\/', '\1', $typeHint).' $'.$name, $bindings)
|
||||
|| \array_key_exists($k = preg_replace('/(^|[(|&])\\\\/', '\1', $typeHint).' $'.$parsedName, $bindings)
|
||||
)) {
|
||||
$arguments[$key] = $this->getBindingValue($bindings[$k]);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (\array_key_exists('$'.$name, $bindings)) {
|
||||
$arguments[$key] = $this->getBindingValue($bindings['$'.$name]);
|
||||
if (\array_key_exists($k = '$'.$name, $bindings) || \array_key_exists($k = '$'.$parsedName, $bindings)) {
|
||||
$arguments[$key] = $this->getBindingValue($bindings[$k]);
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -210,7 +213,7 @@ class ResolveBindingsPass extends AbstractRecursivePass
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($bindingNames[$name]) || isset($bindingNames[$parameter->name])) {
|
||||
if (isset($bindingNames[$name]) || isset($bindingNames[$parsedName]) || isset($bindingNames[$parameter->name])) {
|
||||
$bindingKey = array_search($binding, $bindings, true);
|
||||
$argumentType = substr($bindingKey, 0, strpos($bindingKey, ' '));
|
||||
$this->errorMessages[] = sprintf('Did you forget to add the type "%s" to argument "$%s" of method "%s::%s()"?', $argumentType, $parameter->name, $reflectionMethod->class, $reflectionMethod->name);
|
||||
|
||||
Reference in New Issue
Block a user