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
In this case, both examples will ask for the generation of foo. But applyignt he current logic will typehint it as ArrayToken or ObjectToken (depending of which example wins) and the other example will explode with a fatal error.
But the spec here allows you to know that none of these typehints are the expected one. In such case, it should look for all cases asking for generation, and find the common type (by looking at the common ancestor class in the inheritance hierarchy or a common interface)
The text was updated successfully, but these errors were encountered:
I'd be interested to hear more how you'd approach this though, currently phpspec handles each exception sequentially in a listener so I can't quite see a way to get the sort of aggregated view you're talking about without hooking into and changing the Listener behaviour substantially.
This continues the discussion started by @docteurklein in phpspec/phpspec#230 (comment) as he made a valid argument:
Take the following spec:
In this case, both examples will ask for the generation of
foo
. But applyignt he current logic will typehint it asArrayToken
orObjectToken
(depending of which example wins) and the other example will explode with a fatal error.But the spec here allows you to know that none of these typehints are the expected one. In such case, it should look for all cases asking for generation, and find the common type (by looking at the common ancestor class in the inheritance hierarchy or a common interface)
The text was updated successfully, but these errors were encountered: