Skip to content

Commit bfd5797

Browse files
Merge branch '4.4' into 5.0
* 4.4: [DI] fix Use "composer/package-versions-deprecated" when possible Fix
2 parents 66e5020 + 363a2d1 commit bfd5797

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Exception/InvalidParameterTypeException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public function __construct(string $serviceId, string $type, \ReflectionParamete
2323
{
2424
$acceptedType = $parameter->getType();
2525
$acceptedType = $acceptedType instanceof \ReflectionNamedType ? $acceptedType->getName() : (string) $acceptedType;
26+
$this->code = $type;
2627

27-
parent::__construct(sprintf('Invalid definition for service "%s": argument %d of "%s::%s" accepts "%s", "%s" passed.', $serviceId, 1 + $parameter->getPosition(), $parameter->getDeclaringClass()->getName(), $parameter->getDeclaringFunction()->getName(), $acceptedType, $type), $type);
28+
parent::__construct(sprintf('Invalid definition for service "%s": argument %d of "%s::%s" accepts "%s", "%s" passed.', $serviceId, 1 + $parameter->getPosition(), $parameter->getDeclaringClass()->getName(), $parameter->getDeclaringFunction()->getName(), $acceptedType, $type));
2829
}
2930
}

0 commit comments

Comments
 (0)