Skip to content

Missing rector to downgrade Closure::fromCallable (PHP 7.1) #6671

@bobab12

Description

@bobab12

Feature Request

There should be a rector rule to be able to downgrade Closure::fromCallable (PHP 7.1), see https://www.php.net/manual/en/closure.fromcallable.php.

Diff

-\Closure::fromCallable('strtolower');
+$callable = 'strtolower';
+function () use ($callable) {
+    return $callable(...func_get_args());
+};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions