Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

Objects with __invoke method can not be used in custom methods #113

Description

@jmalloc

Not something I need, but still a bug IMO:

$callable = new class {
    public function __invoke() {}
};

Phony::mock(
    null,
    ['method' => $callable]
);

Probably just needs some logic to construct a Reflector from [$value, '__invoke'], as the failure is:

TypeError: ReflectionFunction::__construct() expects parameter 1 to be string, object given

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions