Skip to content

[HttpKernel] Fix #[MapUploadedFile] handling for optional file uploads #60483

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

Merged

Conversation

santysisi
Copy link
Contributor

Q A
Branch? 7.2
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #58590
License MIT

This PR fixes a bug with the #[MapUploadedFile] attribute in routes, where an optional ?UploadedFile parameter does not behave as expected when no file is provided.

@santysisi
Copy link
Contributor Author

It seems that the error reported by Psalm was resolved in version 7.3. What should I do in cases like this? 🤔

@santysisi santysisi force-pushed the fix/optional-mapuploadedfile-issue branch from 5f9bda8 to 10e5189 Compare May 20, 2025 12:55
@santysisi santysisi force-pushed the fix/optional-mapuploadedfile-issue branch from 10e5189 to 90948a3 Compare May 29, 2025 22:45
@OskarStark
Copy link
Contributor

You can ignore the psalm error for now

@santysisi santysisi force-pushed the fix/optional-mapuploadedfile-issue branch from 90948a3 to 65cd406 Compare June 10, 2025 22:24
@santysisi santysisi force-pushed the fix/optional-mapuploadedfile-issue branch from 65cd406 to fba1f45 Compare June 10, 2025 22:35
@santysisi
Copy link
Contributor Author

Hi 👋 Just checking in, Are there any issues or changes needed for this PR? 🙂
I'm happy to make any updates if required.

Also, the pipeline errors seem unrelated to the changes in this PR.

Thanks!

@nicolas-grekas
Copy link
Member

Thank you @santysisi.

@nicolas-grekas nicolas-grekas merged commit 74dc977 into symfony:7.2 Jun 27, 2025
8 of 11 checks passed
This was referenced Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants