Skip to content

Use of "self" in callables is deprecated in php8.2 #60

Description

@umherirrender

When running "liuggio/statsd-php-client": "1.0.18" under php8.2 the following error is shown:

Use of "self" in callables is deprecated

/workspace/src/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClient.php:94

The code:

    public function reduceCount($arrayData)
    {
        if (is_array($arrayData)) {
            $arrayData = array_reduce($arrayData, "self::doReduce", array());
        }

        return $arrayData;
    }

Change "self::doReduce" to [ self::class, 'doReduce' ] or similiar callable

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions