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

ext/curl: Add HTTP/3 constants #15350

Merged
merged 1 commit into from
Aug 12, 2024
Merged

ext/curl: Add HTTP/3 constants #15350

merged 1 commit into from
Aug 12, 2024

Conversation

Ayesh
Copy link
Member

@Ayesh Ayesh commented Aug 11, 2024

This intends to supersede the two following PRs:

This adds the CURL_HTTP_VERSION_3 and CURL_HTTP_VERSION_3ONLY constants on relevant versions (7.66 and 7.88 respectively).

It is possible to use HTTP/3 without having these constants declared, but having them declared in PHP makes things more approachable and "official".

@Girgias
Copy link
Member

Girgias commented Aug 12, 2024

Can you update NEWS and UPGRADING too? Just to make the merge easier?

This intends to supersede the two following PRs:
 - php#12000 because it does not modify the stub file, but only update the
   arginfo file. It also proposes to merge to GA branches, and is
   currently marked as Requires RM Approval.
 - php#12543 Essentially the same as this PR and from the same author, as
   this, but its about a year old and requires rebasing anyway.

This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY`
constants on relevant versions (7.66 and 7.88 respectively).

It is possible to use HTTP/3 without having these constants declared,
but having them declared in PHP makes things more approachable and
"official".
@Ayesh
Copy link
Member Author

Ayesh commented Aug 12, 2024

@Girgias - You are right I had forgotten to update those files. Thanks for pointing that out. I force-pushed with notices in both NEWS and UPGRADING files.

@Girgias Girgias merged commit 81b49cd into php:master Aug 12, 2024
10 checks passed
@Girgias
Copy link
Member

Girgias commented Aug 12, 2024

Thank you!

@Ayesh
Copy link
Member Author

Ayesh commented Aug 12, 2024

Yay, thank you!

@Ayesh Ayesh deleted the curl-http3 branch August 12, 2024 13:28
isfedorov pushed a commit to JetBrains/phpstorm-stubs that referenced this pull request Aug 25, 2024
Ayesh added a commit to Ayesh/polyfill that referenced this pull request Aug 27, 2024
If the underlying Curl build supports it, setting the HTTP version
should be theoretically possible. The availability of the constants
do not guarantee the feature support, so declaring them in the
polyfill should be same and effective.

 - PR that added constants: [php-src#15350](php/php-src#15350)
 - libcurl doc on `CURLOPT_HTTP_VERSION`](https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html)
 - [PHP.Watch: HTTP/3 Request with PHP Curl Extension](https://php.watch/articles/php-curl-http3)
 - Codex for [CURL_HTTP_VERSION_3](https://php.watch/codex/CURL_HTTP_VERSION_3) and [CURL_HTTP_VERSION_3ONLY](https://php.watch/codex/CURL_HTTP_VERSION_3ONLY)

Fixes GH-�488.
Ayesh added a commit to Ayesh/polyfill that referenced this pull request Aug 27, 2024
If the underlying Curl build supports it, setting the HTTP version
should be theoretically possible. The availability of the constants
do not guarantee the feature support, so declaring them in the
polyfill should be same and effective.

 - PR that added constants: [php-src#15350](php/php-src#15350)
 - libcurl doc on `CURLOPT_HTTP_VERSION`](https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html)
 - [PHP.Watch: HTTP/3 Request with PHP Curl Extension](https://php.watch/articles/php-curl-http3)
 - Codex for [`CURL_HTTP_VERSION_3`](https://php.watch/codex/CURL_HTTP_VERSION_3) and [`CURL_HTTP_VERSION_3ONLY`](https://php.watch/codex/CURL_HTTP_VERSION_3ONLY)

Fixes GH-�488.
Ayesh added a commit to Ayesh/polyfill that referenced this pull request Aug 27, 2024
If the underlying Curl build supports it, setting the HTTP version
should be theoretically possible. The availability of the constants
do not guarantee the feature support, so declaring them in the
polyfill should be same and effective.

 - PR that added constants: [php-src#15350](php/php-src#15350)
 - libcurl doc on `CURLOPT_HTTP_VERSION`](https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html)
 - [PHP.Watch: HTTP/3 Request with PHP Curl Extension](https://php.watch/articles/php-curl-http3)
 - Codex for [`CURL_HTTP_VERSION_3`](https://php.watch/codex/CURL_HTTP_VERSION_3) and [`CURL_HTTP_VERSION_3ONLY`](https://php.watch/codex/CURL_HTTP_VERSION_3ONLY)

Fixes symfonyGH-488.
Ayesh added a commit to Ayesh/polyfill that referenced this pull request Aug 27, 2024
If the underlying Curl build supports it, setting the HTTP version
should be theoretically possible. The availability of the constants
do not guarantee the feature support, so declaring them in the
polyfill should be same and effective.

 - PR that added constants: [php-src#15350](php/php-src#15350)
 - libcurl doc on `CURLOPT_HTTP_VERSION`](https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html)
 - [PHP.Watch: HTTP/3 Request with PHP Curl Extension](https://php.watch/articles/php-curl-http3)
 - Codex for [`CURL_HTTP_VERSION_3`](https://php.watch/codex/CURL_HTTP_VERSION_3) and [`CURL_HTTP_VERSION_3ONLY`](https://php.watch/codex/CURL_HTTP_VERSION_3ONLY)

Fixes symfonyGH-488.
nicolas-grekas pushed a commit to Ayesh/polyfill that referenced this pull request Sep 9, 2024
If the underlying Curl build supports it, setting the HTTP version
should be theoretically possible. The availability of the constants
do not guarantee the feature support, so declaring them in the
polyfill should be same and effective.

 - PR that added constants: [php-src#15350](php/php-src#15350)
 - libcurl doc on `CURLOPT_HTTP_VERSION`](https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html)
 - [PHP.Watch: HTTP/3 Request with PHP Curl Extension](https://php.watch/articles/php-curl-http3)
 - Codex for [`CURL_HTTP_VERSION_3`](https://php.watch/codex/CURL_HTTP_VERSION_3) and [`CURL_HTTP_VERSION_3ONLY`](https://php.watch/codex/CURL_HTTP_VERSION_3ONLY)

Fixes symfonyGH-488.
nicolas-grekas added a commit to symfony/polyfill that referenced this pull request Sep 9, 2024
This PR was merged into the 1.x branch.

Discussion
----------

[PHP 8.4] Add `CURL_HTTP_VERSION_3(ONLY)` constants

If the underlying Curl build supports it, setting the HTTP version should be theoretically possible. The availability of the constants do not guarantee the feature support, so declaring them in the polyfill should be same and effective.

 - PR that added constants: [php-src#15350](php/php-src#15350)
 - libcurl doc on `CURLOPT_HTTP_VERSION`](https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html)
 - [PHP.Watch: HTTP/3 Request with PHP Curl Extension](https://php.watch/articles/php-curl-http3)
 - Codex for [`CURL_HTTP_VERSION_3`](https://php.watch/codex/CURL_HTTP_VERSION_3) and [`CURL_HTTP_VERSION_3ONLY`](https://php.watch/codex/CURL_HTTP_VERSION_3ONLY)

Fixes GH-488.

Commits
-------

8323493 [PHP 8.4] Add `CURL_HTTP_VERSION_3(ONLY)` constants
symfony-splitter pushed a commit to symfony/polyfill-php84 that referenced this pull request Sep 9, 2024
If the underlying Curl build supports it, setting the HTTP version
should be theoretically possible. The availability of the constants
do not guarantee the feature support, so declaring them in the
polyfill should be same and effective.

 - PR that added constants: [php-src#15350](php/php-src#15350)
 - libcurl doc on `CURLOPT_HTTP_VERSION`](https://curl.se/libcurl/c/CURLOPT_HTTP_VERSION.html)
 - [PHP.Watch: HTTP/3 Request with PHP Curl Extension](https://php.watch/articles/php-curl-http3)
 - Codex for [`CURL_HTTP_VERSION_3`](https://php.watch/codex/CURL_HTTP_VERSION_3) and [`CURL_HTTP_VERSION_3ONLY`](https://php.watch/codex/CURL_HTTP_VERSION_3ONLY)

Fixes GH-488.
Ayesh added a commit to Ayesh/doc-en that referenced this pull request Nov 14, 2024
Commit: php/php-src#15350
PHP.Watch: [PHP 8.4: Curl: New `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants for HTTP/3 support](https://php.watch/versions/8.4/CURL_HTTP_VERSION_3-CURL_HTTP_VERSION_3ONLY)
Ayesh added a commit to Ayesh/doc-en that referenced this pull request Nov 15, 2024
Commit: php/php-src#15350
PHP.Watch: [PHP 8.4: Curl: New `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants for HTTP/3 support](https://php.watch/versions/8.4/CURL_HTTP_VERSION_3-CURL_HTTP_VERSION_3ONLY)
Ayesh added a commit to Ayesh/doc-en that referenced this pull request Nov 15, 2024
Commit: php/php-src#15350
PHP.Watch: [PHP 8.4: Curl: New `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants for HTTP/3 support](https://php.watch/versions/8.4/CURL_HTTP_VERSION_3-CURL_HTTP_VERSION_3ONLY)
Ayesh added a commit to Ayesh/doc-en that referenced this pull request Nov 16, 2024
Commit: php/php-src#15350
PHP.Watch: [PHP 8.4: Curl: New `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants for HTTP/3 support](https://php.watch/versions/8.4/CURL_HTTP_VERSION_3-CURL_HTTP_VERSION_3ONLY)
Girgias pushed a commit to php/doc-en that referenced this pull request Nov 16, 2024
Commit: php/php-src#15350
PHP.Watch: [PHP 8.4: Curl: New `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY` constants for HTTP/3 support](https://php.watch/versions/8.4/CURL_HTTP_VERSION_3-CURL_HTTP_VERSION_3ONLY)
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