Skip to content

Commit

Permalink
Invoker: Add initiator parameter on parameterDoesNotSet exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored Aug 6, 2021
1 parent 8ca8ba2 commit f42443e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ServiceMethodInvoker.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,14 @@ className: $parameterType,
);
}

RuntimeInvokeException::parameterDoesNotSet($service, $parameter->getName(), $parameter->getPosition(), $methodName ?? '');
$initiator = $parameter->getDeclaringClass();
RuntimeInvokeException::parameterDoesNotSet(
service: $service,
parameter: $parameter->getName(),
position: $parameter->getPosition(),
method: $methodName ?? '',
initiator: $initiator === null ? null : $initiator->getName(),
);

return null;
}
Expand Down

0 comments on commit f42443e

Please # to comment.