Repository navigation
perf: use server requests to decode body once - #69
Merged
Merged
Conversation
Michel (cyl3x)
force-pushed
the
feat/resolve-psr-server-requests
branch
from
September 20, 2026 09:34
31634fb to
6430555
Compare
Michel (cyl3x)
force-pushed
the
feat/resolve-psr-server-requests
branch
from
September 20, 2026 09:35
6430555 to
9fe3807
Compare
Michel (cyl3x)
force-pushed
the
feat/resolve-psr-server-requests
branch
from
September 20, 2026 09:38
9fe3807 to
feacccc
Compare
Daniel Vien (daniel3010)
approved these changes
Sep 20, 2026
Soner (shyim)
approved these changes
Sep 21, 2026
Fabian Boensch (En0Ma1259)
approved these changes
Sep 21, 2026
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.
Currently, the resolver can only resolve the PSR's
RequestInterfacebut not theServerRequestInterface, which is the actual one created by the http factory. The server request contains the fully parsed body - which is important to not decode the body multiple times for the same request.Duplicated decodes can happen because neither the bundle nor the app sdk has to be the first caller/resolver.
Additionally, a PsrRequestProvider is added, allowing easy access to the psr request as well as abstract common validation - like throwing symfony exceptions on a malformed body. PSR specifies that any errors while parsing the body are converted to
null, silently mismatching Symfony's behavior of throwing JsonExceptions instead (seeRequest::getPayload())To make this possbile, symfony/psr-http-message-bridge version 2.x was dropped. It was a stale dependency anyway since the bundle requires the minimum Symfony version 6.4 and 2.x points to 6.2.
Companion of shopware/app-php-sdk#69