Repository navigation
Keep #[MapUploadedFile] working and map payloads after controller attributes - #4
Merged
Merged
Conversation
…ributes `RequestPayloadArrayResolver` decorates `argument_resolver.request_payload` and replaces it, so `#[MapUploadedFile]` arguments could not be resolved anymore. They are now delegated to the decorated resolver. The resolver also mapped payloads at priority 0 on `kernel.controller_arguments`. Since Symfony 8.1, controller attributes such as `#[IsGranted]` run at -10000, so a malformed payload got a 400 or a 422 before the request was denied. It now uses the priority of the decorated resolver. `symfony/browser-kit` accepts 7.4 again so that the PHP 8.2 and 8.3 jobs can install.
yceruto
approved these changes
Oct 6, 2026
yceruto
left a comment
Collaborator
There was a problem hiding this comment.
Thanks @nicolas-grekas for taking care of this 🤟
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.
Hi @yceruto, I found these while checking who decorates
argument_resolver.request_payloadfor symfony/symfony#66634.RequestPayloadArrayResolverreplaces the core resolver, so#[MapUploadedFile]arguments can't be resolved when the bundle is installed. They're now delegated to the decorated resolver.It also maps payloads at priority 0, while Symfony 8.1 runs controller attributes like
#[IsGranted]at -10000 and maps payloads at -10100 (symfony/symfony#64449). A malformed payload then gets a 400 or a 422 instead of a 403. The resolver now reuses the priority of the decorated one.And
symfony/browser-kit: ^8.0prevented the PHP 8.2 and 8.3 jobs from installing, so 7.4 wasn't tested anymore. Tests pass on both 7.4 and 8.1.