Skip to content

Remove unused includes of php_random.h #13131

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
merged 1 commit into from
Jan 12, 2024

Conversation

TimWolla
Copy link
Member

Before this change php_random.h was listed in 146 different *.dep files for a

env CC=clang ./configure --without-sqlite3 --without-pdo-sqlite

build, after this change it's only listed in 110 of them, preventing uselessly recompiling those files when working on ext/random, mostly caused by the include in ext/standard/basic_functions.h.

Before this change php_random.h was listed in 146 different *.dep files for a

    env CC=clang ./configure --without-sqlite3 --without-pdo-sqlite

build, after this change it's only listed in 110 of them, preventing uselessly
recompiling those files when working on ext/random, mostly caused by the include
in ext/standard/basic_functions.h.
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.

LCTM, nice find.
One thing I'm not sure about is if third party extensions may include basic_functions.h and therefore implicitly assume php_random.h is included. In that case an UPGRADING.INTERNALS note may be necessary, but I'm not sure if this is the case.

@TimWolla
Copy link
Member Author

In that case an UPGRADING.INTERNALS note may be necessary

Using a feature and not including the header is a bug. I understand that after a certain time observable behavior becomes a feature, but in this case I believe the fix to be sufficiently simple and the failure mode sufficiently obvious to not add a note to UPGRADING.INTERNALS, because too many notes can also distract from the important stuff.

@nielsdos
Copy link
Member

That's fair

@TimWolla TimWolla merged commit 2b30f18 into php:master Jan 12, 2024
@TimWolla TimWolla deleted the random-h-inclusions branch January 12, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants