-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Replace @deprecated
with #[\Deprecated]
for internal constants
#18780
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
base: master
Are you sure you want to change the base?
Replace @deprecated
with #[\Deprecated]
for internal constants
#18780
Conversation
Only covers constants declared via stub files, others will be handled separately in a later commit. Does not include the intl extension, since that had some errors relating to the cpp code; that extension will be updated separately. Also fix an undefined variable warning in gen_stub.php.
550eb12
to
2792802
Compare
If you look at the filter arginfo you can see that the same strings are allocated twice. Do you think you can avoid this at least within the same arginfo file? |
Not easily - I'll add it to my list of improvements for gen_stub.php, but this isn't anything new |
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.
ok for ext/random
It should probably be safe to just intern them all. They are always allocated on start-up, so the memory will be used either way. Interning should just reduce it, no? |
Probably, and I will definitely look into this, but I'd prefer not to block the rest of the patch |
Yes I agree. |
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.
OK for DOM, Enchant, SOAP
Pinky promise - I have #18665 and a few other bits of cleanup in mind that shouldn't change any of the generated arginfo files, and then I'll address the improvements that will affect arginfo (like adding interned strings) |
Code owner approvals:
|
*/ | ||
#[\Deprecated(since: '8.4', message: 'as enabling all functions is a possible security concern')] |
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 don't know if this is truly useful but I guess one could add that it's possible to add them by flattening the array received from get_defined_functions()
.
This is already fixed differently in master.
Only covers constants declared via stub files, others will be handled separately in a later commit.
Does not include the intl extension, since that had some errors relating to the cpp code; that extension will be updated separately.
Also fix an undefined variable warning in gen_stub.php.