phpspec / prophecy

Highly opinionated mocking framework for PHP 5.3+
MIT License
8.53k stars 241 forks source link

Call to undefined method Prophecy\Argument::in() #522

Closed tyteen4a03 closed 3 years ago

tyteen4a03 commented 3 years ago

Unlike other functions in Argument, in() and notIn() are not static methods, causing an error when trying to call it statically.

It should be changed to static to be in line with other methods.

stof commented 3 years ago

this is indeed a mistake.

Can you send a PR doing the change ?

tyteen4a03 commented 3 years ago

@stof I have no problem doing a PR but I'm just wondering if this would constitute an API breaking change? (I can also keep both in and deprecate the non-static one.)

ciaranmcnulty commented 3 years ago

We've only ever documented static calls and it's clearly an error so I'd count it as a bug fix