Repository navigation
Allow Guzzle 8.3 alongside Guzzle 7 - #64
Merged
Merged
Conversation
A hard switch to Guzzle 8 would drop illuminate/http 11 and 12, which only accept guzzlehttp/guzzle ^7.8.2. The SDK does not call removed Guzzle 8 APIs, so both majors stay installable. Co-authored-by: Tim <timkley@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependabot PR #63 only replaces
guzzlehttp/guzzle: ^7.0with^8.3. That hard major switch is not safe to merge. This SDK also requiresilluminate/http: ^11.0|^12.0|^13.2.0, and those Laravel HTTP releases do not all accept Guzzle 8:illuminate/http11 and 12 requireguzzlehttp/guzzle: ^7.8.2illuminate/http13.2 through 13.25 also require^7.8.2illuminate/http13.26 and later allow^7.8.2 || ^8.0, plusguzzlehttp/promises: ^2.0.3 || ^3.0andguzzlehttp/psr7: ^2.9 || ^3.0A constraint of
^8.3would make this package uninstallable on Laravel 11, Laravel 12, and Laravel 13 below 13.26. The existing CI matrix installsorchestra/testbench: 9.*(Laravel 11), so that hard switch would also fail CI.This PR keeps both majors:
^7.0is unchanged, so current Guzzle 7 applications keep resolving. The 8.x floor is^8.3(not^8.0) because 8.3 is the release Dependabot proposed and the first 8.x line that requiresguzzlehttp/promises: ^3.1andguzzlehttp/psr7: ^3.2, which is the stack reviewed below. Composer still prefers the highest match: an unconstrainedcomposer updateinstalls Guzzle 8.3 withilluminate/http13.38. Laravel 11/12, and Laravel 13 before 13.26, stay on Guzzle 7.PR #63 is left open and is not merged.
Breaking changes reviewed
Guides read:
Isdeprecated in favour ofStatein 3.1; no call sites here)This package does not construct Guzzle clients, handlers, middleware, cookies, multipart bodies, or pools. HTTP goes through
Illuminate\Http\Client. The only direct Guzzle symbol isGuzzleHttp\Promise\PromiseInterfaceonApi::$latestResponse. That interface still exists in promises 2.x and 3.x; the new generic PHPDoc is analysis-only, andphpstan.neonalready ignoresmissingType.generics.Checked against this repo, with no source change required:
Client::__call),ClientInterface::getConfig,GuzzleHttpfunctions,Utils::jsonDecode/jsonEncode, andRetryMiddleware::exponentialDelayare not used.get/post/put/patch/delete/head, which send uppercase methods.Endpoint::request()dispatches to those methods; it does not pass a lowercase method string into Guzzle.Weaviate::__construct()already documents additional headers asarray<string, string>. Guzzle 8 rejects non-string header values; this library does not set any.auth, cookie, proxy, IDN, sink, or handler options are set. Timeout is a positive integer (30by default).illuminate/http13.38 (the version resolved with Guzzle 8.3.1) already adapts its own Guzzle calls for promises 3 and psr7 3.Test status
PHP 8.3.6, Composer 2.7.1. No Weaviate instance and no network calls in the suite: tests use
Illuminate\Http\Client\Factory::fake().composer.lockis gitignored and was not committed.Guzzle 8, unconstrained
composer updateResolved
guzzlehttp/guzzle8.3.1,guzzlehttp/promises3.1.0,guzzlehttp/psr73.2.0,illuminate/http13.38.0.composer auditreported no advisories.composer test— 36 passed (48 assertions)composer phpstan— no errorsA local PHP server also received a real request from the SDK (
meta()andpost('graphql', ...)):User-Agent: GuzzleHttp/8,Authorization: Bearer …, the extra header as a string, JSON body, and?limit=10.Guzzle 7, same install path as CI
composer require orchestra/testbench:9.* --dev --no-update, thencomposer update --prefer-dist. Resolvedguzzlehttp/guzzle7.16.1,guzzlehttp/promises2.6.0,guzzlehttp/psr72.13.2,laravel/framework11.57.0. Testbench was not left incomposer.json.composer test— 36 passed (48 assertions)composer phpstan— no errorscomposer auditon that tree reported five advisories, all inlaravel/framework11.57.0 pulled by Testbench 9, not in Guzzle.PHP CS Fixer was not run. No PHP sources changed; the fixer config only scans
src/andtests/.The existing matrix still installs Testbench 9 and therefore Guzzle 7 (
prefer-lowestandprefer-stable). A newguzzle-8job runscomposer update --prefer-stablewithout Testbench, asserts that Guzzle 8 is installed, then runscomposer testandcomposer phpstan. PHP 8.4 and 8.5 were not executed locally; the existing matrix still covers them on the Guzzle 7 / Testbench 9 path.