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

Upgrade to Guzzle v7 #10302

Open
1 task
aaemnnosttv opened this issue Mar 3, 2025 · 1 comment
Open
1 task

Upgrade to Guzzle v7 #10302

aaemnnosttv opened this issue Mar 3, 2025 · 1 comment
Labels
P1 Medium priority PHP Team S Issues for Squad 1 Type: Infrastructure Engineering infrastructure & tooling

Comments

@aaemnnosttv
Copy link
Collaborator

aaemnnosttv commented Mar 3, 2025

Feature Description

Guzzle is one of Site Kit's core dependencies as the HTTP client used by google/apiclient.

Now that Site Kit's minimum PHP version requirement is 7.4, we're no longer blocked from upgrading to Guzzle 7 and even able to use the latest stable version: 7.9.2!

This should be smoother than the upgrade from Guzzle 5 -> 6 (done in #1146), and is important to unblock upgrades of other dependencies.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • guzzlehttp/guzzle should be upgraded to the latest v7 version
    • All existing Guzzle client customizations must continue to work (see Client_Factory::create_client)

Implementation Brief

  • Update guzzlehttp/guzzle to the 7.9.2
    • Updating this library will fail due to it's dependency guzzlehttp/psr7 which needs to be 2.7.0. It is locked to the google api library which is locaked at 1.9.1. So it should be updated together with it's dependencies
    • So far it doesn't seem to break anything, I did a quick exploration and dashboard data is working correctly with no notice/error in the error log. The only thing needing some updates is tests. They fail for same reason, the middleware expects promise as return, but in our fakehttp handler we return new Response, so it will take updating this in all tests that return new Response to return a wrapper around response new FulfilledPromise( new Response(...))
    • There is a quick PoC branch that can be checked for example
  • Do an ad-hoc test if everything is working as expected

Test Coverage

  • Fix failing tests

QA Brief

Changelog entry

@tofumatt
Copy link
Collaborator

tofumatt commented Mar 5, 2025

IB ✅

@tofumatt tofumatt removed the Next Up Issues to prioritize for definition label Mar 5, 2025
@tofumatt tofumatt removed their assignment Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority PHP Team S Issues for Squad 1 Type: Infrastructure Engineering infrastructure & tooling
Projects
None yet
Development

No branches or pull requests

4 participants