Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
umherirrender opened this issue Jan 6, 2023 · 1 comment · May be fixed by #65
Open

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

umherirrender opened this issue Jan 6, 2023 · 1 comment · May be fixed by #65

Comments

@umherirrender
Copy link

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

reedy added a commit to reedy/statsd-php-client that referenced this issue Jan 10, 2023
@reedy reedy mentioned this issue Jan 10, 2023
@reedy
Copy link

reedy commented Jan 16, 2023

This can be resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants