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
As pointed out in issue #1403 the matchers order changed since PHP 8.0.
In our case a problem arises because ObjectStateMatcher takes precedence now over ScalarMatcher when we use $object->shouldNotBeNull().
Then test breaks with the error method [array:2] not found. and phpspec prompts us to create a method with the message:
Do you want me to create
`OurClass::isNull()` for you?
Our solution was simply to increment the ScalarMatcher priority to 51. If this is the best solution I can open a PR, otherwise depending of what the solution is I'l be glad if I can be of any help.
The text was updated successfully, but these errors were encountered:
As pointed out in issue #1403 the matchers order changed since PHP 8.0.
In our case a problem arises because ObjectStateMatcher takes precedence now over ScalarMatcher when we use
$object->shouldNotBeNull()
.Then test breaks with the error
method [array:2] not found.
and phpspec prompts us to create a method with the message:Our solution was simply to increment the ScalarMatcher priority to 51. If this is the best solution I can open a PR, otherwise depending of what the solution is I'l be glad if I can be of any help.
The text was updated successfully, but these errors were encountered: