Repository navigation
Send the request method uppercase so PSR-7 v3 does not break the API - #286
Merged
taylorotwell merged 2 commits intoSep 3, 2026
Merged
Conversation
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.
Fixes deploys breaking on v1.70.4. Credit for the diagnosis goes to @maliknikolaj, who identified the cause in #285 (comment) — I'm opening this because nobody had raised the fix yet and three of us are pinned to 1.70.3 in the meantime. Happy to close it if @maliknikolaj would rather submit their own.
The problem
ConsoleVaporClientpasses its verbs in lowercase everywhere —request('get', ...),requestWithErrorHandling('post', ...)and so on, 88 call sites in total.PSR-7 v1 and v2 uppercased the method in the
Requestconstructor. v3 preserves whatever casing it is given:v1.70.4 widened the guzzle constraint to allow
^8.0(#284), and guzzle 8 pulls in psr7 3. So the CLI now puts a lowercase verb on the request line, and the load balancer in front ofvapor.laravel.comrejects it before the application sees it:Captured against a local socket, calling it the way
requestWithoutErrorHandling()does:Because
validateManifest()is the first callvapor deploymakes, every deploy dies about a second in, before any build step, with the 400's HTML body and no validation bag. That is also why it surfaces as the bare "Whoops!" reported in #285.The fix
One
strtoupper()at the single choke point. All 88 lowercase call sites route throughrequestWithoutErrorHandling(), so nothing else needs touching, andAwsStorageProvideralready passes'PUT'uppercase in all four places, so the asset upload path was never affected.Normalizing here rather than editing 88 call sites also means a lowercase verb can't reintroduce this later.
Tests
RequestMethodCasingTestasserts the method reaches the client uppercase for lowercase, uppercase and mixed-case input. Verified it actually catches the regression: with the fix reverted, 2 of the 3 cases fail on psr7 3.1.0.One honest limitation — the assertion reads the method off the constructed PSR-7 request, so on psr7 v1/v2 it passes whether or not the fix is present, since psr7 uppercases it anyway. Asserting earlier would mean overriding
Client::request(), whose signature differs across guzzle 6/7/8 and which the package still supports. The test is meaningful on any matrix leg resolving psr7 3.Full suite passes (59 tests). phpstan reports the same 106 pre-existing errors before and after, none in this file.
Related