Open Jean85 opened 3 years ago
Ouch, we would need to declare PHPSpec compatible with Prophecy 2.0 in advance :cry: I'll revert the dev-master
alias change to make the build happy.
If we're going to bump the version number we should re-think the behaviour more comprehensively
What do you think of #528 ?
Fixes #472, declares a new major bump to 2.0.
As suggested by @stof in https://github.com/phpspec/prophecy/issues/472#issuecomment-801142387, this is an attempt to revert #441 and go back to the old behavior, with a fast bailout when the prophecy hits an unregistered method call. This avoids returning
null
in those cases, since it would probably lead to\TypeError
s or other unpredictable behaviours, as originally pointed out in https://github.com/phpspec/prophecy/pull/441/files#r388191626.