Skip to content

streams: move some stream related globals from std to main - #25344

Merged
Girgias merged 3 commits into
php:masterfrom
Girgias:2026-11-move-globals-php-core
Nov 22, 2026
Merged

Girgias merged 3 commits into
php:masterfrom
Girgias:2026-11-move-globals-php-core

Conversation

@Girgias

@Girgias Girgias commented Nov 9, 2026

Copy link
Copy Markdown
Member

This is to try and fix our header dependency mess so that main does not depend on ext/standard

Comment thread main/streams/xp_socket.c
if (value == -1) {
if (sock->timeout.tv_sec == -1) {
tv.tv_sec = FG(default_socket_timeout);
tv.tv_sec = PG(default_socket_timeout);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you no longer need ext/standard/file.h then.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I also thought we could get rid of the php.h include but that's needed for PHPAPI, mighe make sense to create a new php_portability.h to remove some more cyclic dependencies.

Comment thread ext/openssl/xp_ssl.c
if (sslsock->s.timeout.tv_sec == -1) {
#ifdef _WIN32
tv.tv_sec = (long)FG(default_socket_timeout);
tv.tv_sec = (long)PG(default_socket_timeout);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the change might deserve an entry in UPGRADING.INTERNALS because of users like this one.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an entry :)

This is to try and fix out dependency mess so that main does not depend on ext/standard
@Girgias
Girgias force-pushed the 2026-11-move-globals-php-core branch from 3aee00f to 61762fe Compare November 22, 2026 14:19
@Girgias
Girgias merged commit adcd9b0 into php:master Nov 22, 2026
15 of 19 checks passed
@Girgias
Girgias deleted the 2026-11-move-globals-php-core branch November 22, 2026 17:46
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.

2 participants