Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged

Conversation

Copy link
Member

@DanielEScherzer DanielEScherzer commented Jun 5, 2025
edited
Loading

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.

Copy link
Member

nielsdos commented Jun 6, 2025

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?

Copy link
Member Author

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

Copy link
Member

@TimWolla TimWolla left a 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

Copy link
Member

TimWolla commented Jun 9, 2025

the same strings are allocated twice

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?

Copy link
Member Author

the same strings are allocated twice

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

Copy link
Member

nielsdos commented Jun 9, 2025

the same strings are allocated twice

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?

Yes I agree.
If you pinky promise that you're gonna look at it before 8.5's release I'll allow it.

DanielEScherzer reacted with laugh emoji

Copy link
Member

@nielsdos nielsdos left a 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

Copy link
Member Author

the same strings are allocated twice

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?

Yes I agree. If you pinky promise that you're gonna look at it before 8.5's release I'll allow it.

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)

nielsdos reacted with thumbs up emoji

Copy link
Member Author

DanielEScherzer commented Jun 9, 2025
edited
Loading

Code owner approvals:

  • curl - adoy
  • date - derickr
  • dom - nielsdos
  • enchant - No owner or current maintainer (approved by neilsdos)
  • filter - No owner or current maintainer
  • mysqli - bukka / kamil-tekiela (approved by bukka)
  • pgsql - devnexen
  • random - timwolla / zeriyoshi (approved by tim wolla)
  • reflection - me
  • soap - neilsdos
  • standard - bukka

Copy link
Member Author

Barring any further review I plan to merge this in the next few days

DanielEScherzer and others added 3 commits June 26, 2025 10:46
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.
@DanielEScherzer DanielEScherzer merged commit 171501b into php:master Jun 26, 2025
9 checks passed
@DanielEScherzer DanielEScherzer deleted the constants-stubs-use-deprecated branch June 26, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@TimWolla TimWolla TimWolla approved these changes

@Girgias Girgias Girgias left review comments

@bukka bukka bukka approved these changes

@kocsismate kocsismate kocsismate approved these changes

@nielsdos nielsdos nielsdos approved these changes

@zeriyoshi zeriyoshi Awaiting requested review from zeriyoshi zeriyoshi is a code owner

@devnexen devnexen Awaiting requested review from devnexen devnexen is a code owner

@kamil-tekiela kamil-tekiela Awaiting requested review from kamil-tekiela kamil-tekiela is a code owner

@derickr derickr Awaiting requested review from derickr derickr is a code owner

@adoy adoy Awaiting requested review from adoy adoy is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /