Skip to content

Conversation

@tangrufus
Copy link
Member

@tangrufus tangrufus commented Nov 14, 2025

Hack to disallow HTTP/3, forcing HttpDownloader to use RemoteFilesystem instead of CurlDownloader.

I suspect api.wordpress.org does not properly support HTTP/3:

$ curl --http1.1 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response

$ curl --http2 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...json response

$ curl --http3-only 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
...sometimes json response
...but most of the time ERR_DRAINING
curl: (56) ngtcp2_conn_writev_stream returned error: ERR_DRAINING

See:

Copilot AI review requested due to automatic review settings November 14, 2025 20:50
@tangrufus tangrufus added the enhancement New feature or request label Nov 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Composer v2.9 by implementing a workaround for HTTP/3 compatibility issues with the WordPress.org API and updating test assertions.

Key changes:

  • Adds HTTP/3 workaround in API client to force HTTP/2 usage via SSL options
  • Updates test matrix to include Composer 2.9 in both Makefile and GitHub workflows
  • Removes "Nothing to install, update or remove" stderr assertions from test files, likely due to output changes in Composer 2.9

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

File Description
src/WpOrg/Api/Client.php Implements HTTP/3 workaround by adding SSL options to force RemoteFilesystem usage
Makefile Adds php-8.4-composer-2.9 and php-8.3-composer-2.9 to test combinations
.github/workflows/test.yml Adds '2.9' to composer-version matrix
testdata/script/*.txtar Removes "Nothing to install, update or remove" stderr assertions from 6 test files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI commented Nov 14, 2025

@tangrufus I've opened a new pull request, #23, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tangrufus
Copy link
Member Author

close #23

Hack to disallow HTTP/3, forcing `HttpDownloader` to use `RemoteFilesystem` instead of `CurlDownloader`.

I suspect api.wordpress.org does not properly support HTTP/3:

    $ curl --http1.1 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
    ...json response

    $ curl --http2 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
    ...json response

    $ curl --http3-only 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=better-delete-revision'
    ...sometimes json response
    ...but most of the time ERR_DRAINING
    curl: (56) ngtcp2_conn_writev_stream returned error: ERR_DRAINING

See:
  - composer/composer#12363
  - https://github.com/composer/composer/blob/f5854b140ca27164d352ce30deece798acf3e36b/src/Composer/Util/HttpDownloader.php#L537
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tangrufus tangrufus merged commit cc1f8c5 into main Nov 14, 2025
41 checks passed
@tangrufus tangrufus deleted the composer-2.9 branch November 14, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants