Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False DeprecatedMethod positives for expects #90

Open
leighman opened this issue Oct 5, 2020 · 0 comments
Open

False DeprecatedMethod positives for expects #90

leighman opened this issue Oct 5, 2020 · 0 comments

Comments

@leighman
Copy link

leighman commented Oct 5, 2020

Not sure if this is a psalm issue but thought I'd come here to clarify how stubs work.
Using PHPUnit 7 which has

    /**
     * Registers a new expectation in the mock object and returns the match
     * object which can be infused with further details.
     *
     * @return InvocationMocker
     */
    public function expects(Invocation $matcher);

in MockObject.
This doesn't seem to appear in the stub but no error in IDE (possibly because psalm warning level is not high enough?)

When calling createMock(MyClass::class) and deprecating __call on MyClass, I get errors about DeprecatedMethod for uses of expects.
Is that expected behaviour or is something incorrect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant