You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to learn how to create my own Rules to address some changes in my project. However, I'm struggling to find material on how to access previous Nodes and obtain the type of an argument. For example, I would like to resolve deprecation warnings resulting from the use of getReference without the argument $class. In my case, I'm having difficulty obtaining the type of the parameter of the setter that expects the result of the getReference method.
I'm trying to achive a result like this:
$causaPrescritiva = newCausaPrescritivaCredito();
- $causaPrescritiva->setCredito($this->getReference('Credito-016'));
- $causaPrescritiva->setTipoCausaPrescritiva($this->getReference('TipoCausaPrescritiva-SUSPENSÃO DA PRESCRIÇÃO POR DEFERIMENTO DE PARCELAMENTO'));
+ $causaPrescritiva->setCredito($this->getReference('Credito-016', Credito::class));
+ $causaPrescritiva->setTipoCausaPrescritiva($this->getReference('TipoCausaPrescritiva-SUSPENSÃO DA PRESCRIÇÃO POR DEFERIMENTO DE PARCELAMENTO', TipoCausaPrescritiva::class));
$causaPrescritiva->setDataInicio(DateTime::createFromFormat('d/m/y H:i:s', '01/01/02 00:00:00'));
$causaPrescritiva->setDataFim(DateTime::createFromFormat('d/m/y H:i:s', '01/01/05 00:00:00'));
The text was updated successfully, but these errors were encountered:
Hello, I'm trying to learn how to create my own Rules to address some changes in my project. However, I'm struggling to find material on how to access previous Nodes and obtain the type of an argument. For example, I would like to resolve deprecation warnings resulting from the use of getReference without the argument $class. In my case, I'm having difficulty obtaining the type of the parameter of the setter that expects the result of the getReference method.
I'm trying to achive a result like this:
The text was updated successfully, but these errors were encountered: