Skip to content

False DeprecatedMethod positives for expects #90

Description

@leighman

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions