-
Notifications
You must be signed in to change notification settings - Fork 18
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
[Bug]: PHP 8.1 PHP Deprecated: Constant Inpsyde\Wonolog\Data\FILTER_SANITIZE_STRING is deprecated #67
Comments
@thefrosty we have a couple of lefotover instances of that string in v2, because PHP did not provide a replacement for it :(, and so we need to refactor https://github.com/inpsyde/Wonolog/blob/2.x/src/Data/Log.php I will fix them in v2, but likely not in in v1 |
That's fine, I wasn't aware of a v2, would love to see a beta or alpha tag to try out. |
@thefrosty The branch "2.x" is the alpha right now https://github.com/inpsyde/Wonolog/tree/2.x And it needs testing :) Docs: https://github.com/inpsyde/Wonolog/tree/2.x/docs are already updated |
Hello @gmazzap, Any news regarding this issue ? We are already using branch 2.x in production on a few projects, and it seems pretty much stable at this point, but we're still running them in PHP 8.0. Now, with PHP 8.0 end of support coming before the end of the year, upgrade to 8.1 or 8.2 is becoming urgent. I started to work on a PR a few weeks ago, but I didn't manage to have a strictly equivalent behavior with Bests regards, |
Hi @pierre-dargham I should be able to fix this and release v2 in beta very soon. |
v2.0.0-beta.1 Should fix this already. |
v2 already tests in both unit and integration in all PHP version from 7.2 to 8.2. |
@gmazzap We are looking to test Wonolog 2.x in order to fix these PHP 8 deprecations. I've looked through the docs, but cannot see any sort of upgrade guide. Does that mean Wonolog 2.x should be a drop-in replacement for Wonolog 1.x. In other words - are there breaking changes we need to be aware of? |
@braders It's not a drop-in replacement. As you know, Wonolog is very extensible and can do many things. The "basics" that you get out of the box are the same for v1 and v2. But if you have extended v1 in some way, it might need adjustment to get the same extension work in v2, even if we tried to make it as much backward compatible as possible. But it is still a major version, so some breaking changes exist. However, there're relevant changes in the configuration. You right, we need to work on an upgrade guide, in the meantime if you tell me how you're configuring your v1 I can tell you the way to obtain same things in v2. |
Description of the bug
Using
FILTER_SANITIZE_STRING
is deprecated in PHP 8.1.Reproduction instructions
Install PHP 8.1, and turn on WP_DEBUG, note logs after logging in a traversing the admin core pages.
Expected behavior
No deprecation notices.
Environment info
Relevant log output
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: