Closed
Description
In #26636 (4.1) the $requiringClass
argument in TypedReference
has been deprecated: https://github.com/symfony/symfony/pull/26636/files#diff-6561cf4254b86cdc43ada0985f87e4a4R29
While helping someone on Slack whom received this deprecation, we had a hard time figuring out what the actual issue was. As $requiringClass
is removed, the deprecation is referencing to a non-existing argument. I was thinking about something shown below as alternative, though I'm not 100% sure about it.
public function __construct(string $id, string $type, /* $requiringClass, */ $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name = null)
With as message:
The $requiringClass argument of "%s()" is deprecated since Symfony 4.1. All existing arguments should move 1 position to the left.
Edit: can make a PR based on this change: f473c24