-
Notifications
You must be signed in to change notification settings - Fork 7.9k
main: Disable $_SERVER
JIT when register_argc_argv=1
#19833
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
Conversation
Fixes php#19823 and makes the deprecation more reliable by triggering even when `$_SERVER` is not accessed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so convinced that changing the auto global JITting just for a deprecation is the right move.
Although one could argue that register_argc_argv=1 is sufficiently rare for most applications that this doesn't matter in practice? I don't know. |
Generally speaking, deprecations go through slower code paths (e.g. FCALL instead of ICALL / UCALL), since the expectation is that they'll become gradually less used (since they'll be removed). In this specific case |
Okay sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No RM objections 👍
Note that these tests only fail with a primed opcache file cache ( |
Yes. The error message is recorded in OPcache, because the super-global JIT triggers the deprecation during compilation. With this change, the deprecation is triggered at SAPI start-up and will thus not be picked up by OPcache (and it's also arguably more correct to not trigger it at random stages during compilation, since it doesn't check what field of |
Fixes #19823 and makes the deprecation more reliable by triggering even when
$_SERVER
is not accessed./cc @nicolas-grekas