-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[6.x] Fix validating image/jpeg images after Symfony/Mime update #35419
Conversation
Symfony/Mime v5.20 changed the returned extension for an image with image/jpeg mime type: symfony/mime@aa1d922. This commit adds `.jpg`, which fixes the validation.
Note to reviewers: Laravel 6 requires Symfony 4 components, but those in turn allow both Symfony 4 and 5 for their own dependencies. The mime dependency is one of those, which is why this really does need patching on 6.x. |
Just a follow up note to this. Previously The breaking change is in https://github.com/symfony/symfony/pull/38407/files#diff-d9bc28406dbb260810697db93dd597ace181aa0a6b60fc920c3ab5da92203c1eL1323 Swapping the values back to what they were before the change ie. I believe Laravel should accept both At the moment the example snippet in the docs won't accept either |
Thanks @patrickomeara. I've sent in a PR to the docs to fix that as well as a PR to reintroduce the previous behavior for the |
…avel#35419) * [6.x] Fix validating image/jpeg images after Symfony/Mime update Symfony/Mime v5.20 changed the returned extension for an image with image/jpeg mime type: symfony/mime@aa1d922. This commit adds `.jpg`, which fixes the validation. * [6.x] Add test for image validation with jpg extension (cherry picked from commit fff077c)
Symfony/Mime v5.20 changed the returned extension for an image with image/jpeg mime type: symfony/mime@aa1d922
This breaks laravel image validation, as it relied on a return value of .jpeg. This commit adds .jpg, which fixes the validation.
(see #35416)