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
A new variable type was introduced in PHP 8.0.0 aka "mixed". When one of the variables in the class constructor is of type "mixed" DICE tries to construct the argument of the function 'call_user_func()' for test this arguments and obtains "is_mixed" which, obviously, does not exist yet in PHP and there, I think the error arises.
I don't have enough PHP knowledge to create a fork but someone with more knowledge could probably resolve this issue easily.
(sorry, google translate)
The text was updated successfully, but these errors were encountered:
When the class ToBeInjected is created, Dice will exception at Dice.php line 257, Call to undefined method ReflectionUnionType::getName()
If you change $b to be only string or only array or even ?string or ?array it works just fine. Trying to set up a constructParams rule doesn't work either. So I can only conclude that Dice's ability to figure out the arguments does not work for these types of types ...
So new it yourself (instead of $dice->create()), or change your params to be more precise...
Just FYI, in my use case, it makes sense because the input is EITHER a string, or an array, and for each case we handle things slightly differently. Having the input to be string|array makes sure (forces) that we have only one input, and not end up a situation where we were given both a string and an array and have to choose between one or the other.
A new variable type was introduced in PHP 8.0.0 aka "mixed". When one of the variables in the class constructor is of type "mixed" DICE tries to construct the argument of the function 'call_user_func()' for test this arguments and obtains "is_mixed" which, obviously, does not exist yet in PHP and there, I think the error arises.
I don't have enough PHP knowledge to create a fork but someone with more knowledge could probably resolve this issue easily.
(sorry, google translate)
The text was updated successfully, but these errors were encountered: