-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix php81 deprecated warnings #74
Conversation
Thank you. However, this will be a breaking change, since the mixed keyword doesn't exist in older PHP versions. So to get rid of these notices, way more work is required (e.g. publish a new tag >= 0.8), PHP unit updates, etc. |
That is very true. Any plans from your side to migrate to at least PHP 8.0? I could potentially help out but I don't know how much work that would be as I am not aware of all the side-effects that could create. |
PHP 8.0+ is officially supported and covered by our automatic tests (see https://github.com/SoftCreatR/JSONPath/blob/main/.github/workflows/Test.yml#L24). However, if there's any need, I'll release a new version for sure. |
How about just adding #[\ReturnTypeWillChange] attribute? |
That's the current plan. |
That's also a breaking change, because it doesn't work with older PHP versions. |
Should I update the PR to remove the mixed and replace it with the Attribute then? |
No. A new version (for PHP 8.0+) is required here. |
Actually I think this works because for previous PHP versions attributes are regarded as comments:
|
Yeah, my bad. I forgot to put that on a separate line, so all tests failed locally :) But I'm already working on updates. |
Resolved via 37f949d |
@SoftCreatR thank you for the quick fix! |
Please let me know, if the provided solution works for you. |
Hello
This new attribute that supports php:^81 is required Please advise. |
Are you using the latest version 0.8.2? |
I update the version, and the solution presents itself |
Means? |
Updating to version 0.8.2 has fixed the issue. Thanks |
🔀 Pull Request
What does this PR do?
Fix deprecated warnings for PHP 8.1:
Test Plan
No automated test plan only manual testing done.
Related PRs and Issues
No related PRs or Issues