Skip to content

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

@umherirrender

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

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