Skip to content
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

Remove superfluous determination of cURL version #16787

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Nov 13, 2024

This was originally meant to distinguish between libcurl 7.59.0 and earlier; only the latter would need to be linked against normalize.lib, libssh2.lib and nghttp2.lib[1]. That would only have catered to our builds, and might not have been correct anyway. However, the version check was wrong (paren error), and has been removed in the meantime[2].

Given that cURL 7.59.0 is rather old, we do not reinstate the version check, but rather drop the now superfluous (and improper) determination of the cURL version. A nice bonus is that we get rid of some global variables.

[1] a1ba300
[2] 94a12d5

This was originally meant to distinguish between libcurl 7.59.0 and
earlier; only the latter would need to be linked against normalize.lib,
libssh2.lib and nghttp2.lib[1].  That would only have catered to our
builds, and might not have been correct anyway.  However, the version
check was wrong (paren error), and has been removed in the meantime[2].

Given that cURL 7.59.0 is rather old, we do not reinstate the version
check, but rather drop the now superfluous (and improper) determination
of the cURL version.  A nice bonus is that we get rid of some global
variables.

[1] <php@a1ba300>
[2] <php@94a12d5>
Copy link
Member

@petk petk left a comment

Choose a reason for hiding this comment

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

@cmb69 even if this should be added back with the correct paren, the 0x073b00 version is 7.59

The minimum required Curl version as of PHP 8.4 is 7.61. So, I'm not sure what should be added back here as noted in the comment on the PR. That removal was correct in any case. Yes?

If curl version won't be checked on Windows, then also this can be then removed.

@cmb69
Copy link
Member Author

cmb69 commented Nov 14, 2024

That removal was correct in any case. Yes?

Oh, indeed! I've missed that PHP 8.4 already requires cURL >= 7.61.0.

If curl version won't be checked on Windows, then also this can be then removed.

Checking the required version on Windows would be good (although not super important), but that should either use GREP_HEADER() (to cater to the proper include paths, and for a bit of simplification), or maybe we should use pkg-config on Windows, too (#16752). For now, I'd rather stick to this PR.

@cmb69 cmb69 merged commit d4103b3 into php:master Nov 14, 2024
10 checks passed
@cmb69 cmb69 deleted the cmb/curl-version-determination branch November 14, 2024 11:26
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