Skip to content
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

[MimeType] Duplicated MimeType due to PHP Bug #37291

Merged
merged 1 commit into from Jun 28, 2020

Conversation

juanmrad
Copy link
Contributor

@juanmrad juanmrad commented Jun 15, 2020

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #...
License MIT
Doc PR symfony/symfony-docs#...

Issue:

Currently there is a PHP bug https://bugs.php.net/bug.php?id=77784 that is causing several MimeTypes to be given as duplicated:

application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Instead of:

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

This Patch will fix the Issues by checking if a returned MimeType is duplicated and return appropriate MimeType.

This patch should be reverted if the PHP Bug is ever fixed.

@nicolas-grekas
Copy link
Member

Thank you for telling us about this.
Could you please target branch 3.4 and add a test case also?

@nicolas-grekas nicolas-grekas modified the milestones: 5.1, 3.4 Jun 18, 2020
@fabpot
Copy link
Member

fabpot commented Jun 23, 2020

Any news? fabbot has also some fixes for you.

@juanmrad juanmrad changed the base branch from 5.1 to 3.4 June 23, 2020 14:38
@juanmrad juanmrad changed the base branch from 3.4 to 5.1 June 23, 2020 14:43
@juanmrad
Copy link
Contributor Author

@nicolas-grekas I tried changing the base, but looks like 3.4 does not have that file. I'll be creating some test cases today and apply patches from fabbot as mentioned by @fabpot

@juanmrad
Copy link
Contributor Author

NVM realized it is just on another place. I'll be doing the change in a bit.

@juanmrad juanmrad changed the base branch from 5.1 to 3.4 June 23, 2020 16:05
@juanmrad juanmrad closed this Jun 23, 2020
@juanmrad juanmrad reopened this Jun 23, 2020
@juanmrad juanmrad force-pushed the patch-1 branch 2 times, most recently from a83d5f8 to d9d155f Compare June 23, 2020 17:15
@juanmrad
Copy link
Contributor Author

@nicolas-grekas I have encountered 2 issues with my PR and would like to ask for suggestions.
on PHP 5.6 there is an issue that docx and xml files are actually reported as application/zip as they are not being recognized.
And looks like TravisCi is not running php 7.4 where this issue is present.

@nicolas-grekas
Copy link
Member

I'd suggest skipping the test on PHP5 by adding an `@requires PHP 7 annotation on the test case.
PHP 7.4 runs on the deps=low job.

@juanmrad
Copy link
Contributor Author

@nicolas-grekas Done thanks :).

@nicolas-grekas
Copy link
Member

Thank you @juanmrad.

@nicolas-grekas nicolas-grekas merged commit 6ef3fee into symfony:3.4 Jun 28, 2020
@juanmrad juanmrad deleted the patch-1 branch June 29, 2020 12:20
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.

None yet

5 participants