Skip to content

Conversation

@devnexen
Copy link
Member

resolution failures.

@devnexen devnexen force-pushed the gh20532 branch 6 times, most recently from 11a0841 to d90d227 Compare November 24, 2025 13:22
@devnexen devnexen marked this pull request as ready for review November 24, 2025 21:55
@devnexen devnexen removed the request for review from dstogov November 24, 2025 21:55
Comment on lines -2828 to +2830
if (getaddrinfo(ZSTR_VAL(hostname), service, &hints, &result) != 0) {
RETURN_FALSE;
if ((ret = getaddrinfo(ZSTR_VAL(hostname), service, &hints, &result)) != 0) {
RETURN_LONG(ret);
Copy link
Member

Choose a reason for hiding this comment

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

This is a BC break that might be quite problematic because users often do === false check so I don't think this acceptable in minor. You will need RFC for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

so I don't think this acceptable in minor.

not sure what do you mean by minor.

Copy link
Member

Choose a reason for hiding this comment

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

minor version :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah ok you would had accepted if it was PHP 9.0 rather 8.6 ?

Copy link
Member

Choose a reason for hiding this comment

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

I guess it would be more acceptable but not sure if it would be good idea either. The problem is that those BC breaks are really hard to catch so I would prefer RFC for it anyway.

@bukka
Copy link
Member

bukka commented Nov 29, 2025

Alternative solution could be a by ref param but not sure if it's really nice but would be safer and could still expose the contant. Not sure if we got any function that does it like it though?

@devnexen
Copy link
Member Author

sure I ll create a RFC. will probably go with the additional optional parameter then.

@bukka
Copy link
Member

bukka commented Nov 29, 2025

If it changes to additional parameter, I wouldn't strictly require RFC but might be still good to at least raise at internals to see if there are any objections.

@murrant
Copy link

murrant commented Nov 29, 2025

Would it be possible to use socket_last_error()?

@devnexen
Copy link
Member Author

devnexen commented Nov 29, 2025

I do not think this it's a good idea, last_error is for errno we would be mixing semantics ; also while EAI* constants are negative on Linux, they have positive values on macos/freebsd for example.

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