-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form][HttpFoundation] Filtering FileBag removes items from CollectionType with FileType #35100
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
Comments
I am not sure that I understand what you mean. Can you explain what you expected and what happened instead? |
@xabbuh here is the reproducer https://github.com/BoShurik/symfony-file-bag-issue When you submit form without uploading files, collection with FileTypes resets. I expect to get nulls for not uploaded files. |
If I understand your concerns correctly, this is just how handling HTML forms work here. If you do not select a file to be uploaded, the client will not send any data for it so it even won't be So I am going to close here as there is nothing we can change in the component. If I understood you wrong, please leave a comment with some more explanation and we can consider to reopen. |
Problem in HttpFoundation component.
The problem is that client do send data: As I can see #24198 was introduced to fix
I tried to remove changes made in that PR and all tests in Form component are pass,
Does this change considered as a BC break? If so, maybe you know a workaround? |
@xabbuh filtering |
Symfony version(s) affected: all
Description
Similar to #24546
When file is not uploaded I get previously defined one but it's impossible to separate deletion of collection item and not uploading a file
How to reproduce
The text was updated successfully, but these errors were encountered: