Skip to content

Return type 'never' on Actor::__call() causes our entire test framework to stop working. #6857

@troy-rudolph

Description

@troy-rudolph

The PR at https://github.com/Codeception/Codeception/pull/6849/files changes the return type of Actor::__call() to 'never'. Thus, any class that inherits from Actor must also declare the return type of __call() as 'never'.

Unfortunately for us, this change breaks our entire framework. We override the implementation of __call() and use it to delegate method calls to extensions that we have added. (It's much more than that, but that's the gist of it.)

I'm not exaggerating. Our acceptance and regression suites (thousand of test) are inoperable as of this change.

Additionally, I cannot see any reason for the change. The PHP documentation at https://www.php.net/manual/en/language.oop5.overloading.php#object.call clearly states that the return type of __call() is 'mixed'.

Could you please revert that change in the PR above so that we can move forward with updates to Codeception. I can raise a PR if you like.

Thank you
Troy Rudolph
Architect
Alchemy Systems
www.alchemysystems.com
www.sistemlms.com.

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