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.