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 "static" in callables is deprecated in PHP 8.2 #479

Closed
jnoordsij opened this issue Jun 10, 2022 · 4 comments · Fixed by #570
Closed

Use of "static" in callables is deprecated in PHP 8.2 #479

jnoordsij opened this issue Jun 10, 2022 · 4 comments · Fixed by #570
Labels
bug Something isn't working pinned

Comments

@jnoordsij
Copy link

Summary

While running my PHPUnit test suite on the first PHP 8.2 alpha release, I noticed the following deprecation warning:
Use of "static" in callables is deprecated in /app/vendor/fakerphp/faker/src/Faker/Provider/Base.php on line 374

Versions

Version
PHP 8.2.0alpha1
fakerphp/faker 1.19.0
@DvDty
Copy link

DvDty commented Jun 10, 2022

Yes, this usage falls under the deprecated callable patterns in version 8.2. More on that here, including two ways of fixing the issue: https://php.watch/versions/8.2/partially-supported-callable-deprecation#deprecated-patterns.

I don't think there has been a discussion on whether or not 1.* will support PHP 8.2, but since 2.x is still under discussion/development, I would guess it will.

@pimjansen
Copy link

I think we will support it indeed however lets wait until the feature freeze which is at:

Jul 19 2022 Feature freeze

From there we can prep the needed steps

@pimjansen pimjansen added the bug Something isn't working label Jun 10, 2022
@stale
Copy link

stale bot commented Jun 29, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 1 week if no further activity occurs. Thank you for your contributions.

@chris-doehring
Copy link

Hello everyone,

I just created the following PR which ensures php 8.2 compatibility: #528
As already mentioned in my PR, we have many of those deprecation errors with php 8.2 right now, but I think they probably cannot be fixed without causing a backward incompatible change. I think a better solution is to refactor those legacy Faker components into the new structure, so we will be compatible to php 9.0. It's not really necessary to fix those deprecation's right away, and I wouldn't consider them "bugs" either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants