-
-
Notifications
You must be signed in to change notification settings - Fork 91
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(tests): update IPv6 test to align with PHP 8.4.3 behavior #885
Conversation
Reverted my changes here but kept the skipping removed to see whether it's actually just Windows failing, or it's a global issue. Apparently, it affects Linux as well. Weird, to say the least. I'll mark this PR as draft, I'm confident this is a GH Actions issue, let's not merge this one, at least until we get more information on this. Feel free to close if you wish. |
Since PHP 8.4.3, you need an additional flag to check global reserved IPv6 addresses. See these for more details: With this in mind, one question remains, though. Do we want to add a switch for this flag? What if someone only wants to restrict locally reserved ranges but not globally reserved ones? Seems like an extreme edge-case to me, but hey. |
@xHeaven let me take a look at this please. The test case is testing an address that falls in |
That's right - according to RFC 3849 - however, FILTER_FLAG_NO_RES_RANGE adheres to RFC 6890. Since So with only
With the So with the
|
FYI, ... or we can close this entire PR and change the test to check |
Okay, here's what I think we should do here... Let's defer to PHP on the behavior for We should probably also add an option to this rule regarding the global range, but that probably deserves a different PR. Thanks for your research and detail here, @xHeaven! |
Sounds good to me and honestly, makes more sense than the original approach of changing the code. |
Thanks! |
This PR aims to fix the issue that came with PHP 8.4.3 regarding reserved IPv6 address handling. From PHP 8.4.3, you need to add an additional flag to allow checking for global reserved IPv6 addresses, otherwise only local ones will be taken into account (for example
::1
).