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

[Mime] Add the component #29896

Merged
merged 4 commits into from Jan 17, 2019

Conversation

@fabpot
Copy link
Member

commented Jan 15, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #28832 #21985 makes #15460 trivial
License MIT
Doc PR symfony/symfony-docs#10886

This has been on my todo-list for X years :)

@nicolas-grekas nicolas-grekas added this to the next milestone Jan 15, 2019

@fabpot fabpot force-pushed the fabpot:mime-type-component branch 2 times, most recently from e8bf819 to 67da538 Jan 15, 2019

@fabpot fabpot force-pushed the fabpot:mime-type-component branch 2 times, most recently from ac0eda7 to 7f7f4b8 Jan 16, 2019

@fabpot fabpot force-pushed the fabpot:mime-type-component branch from fd1a1dd to 9bffccd Jan 16, 2019

@teohhanhui

This comment has been minimized.

Copy link
Contributor

commented Jan 16, 2019

It'd be good to add a test for SVG: #15460 (comment)

@fabpot fabpot force-pushed the fabpot:mime-type-component branch from 9bffccd to e6b4189 Jan 16, 2019

@javiereguiluz

This comment has been minimized.

Copy link
Member

commented Jan 16, 2019

Last question from me: should we provide autoconfiguration for the new MimeTypeGuesserInterface? thanks.

@fabpot

This comment has been minimized.

Copy link
Member Author

commented Jan 16, 2019

Autoconfig is already there, so if you create a class with this interface, it will be tagged automatically and registered.

@fabpot fabpot force-pushed the fabpot:mime-type-component branch from e6b4189 to 2b1e6cc Jan 16, 2019

@fabpot

This comment has been minimized.

Copy link
Member Author

commented Jan 16, 2019

@teohhanhui The underlying guessers are the same as before, so that won't fix the mentioned issue.

* @see Resources/bin/update_mime_types.php
*/
private static $map = [
'application/acrobat' => ['pdf'],

This comment has been minimized.

Copy link
@ostrolucky

ostrolucky Jan 16, 2019

Contributor

Does this kind of list scale? Even currently browser has trouble opening this file in github. It's almost 2000 entries now. Implementation of updating it could also be simpler if it was in external file and just var_export used. This point was raised by somebody in Slack originally.

This comment has been minimized.

Copy link
@fabpot

fabpot Jan 16, 2019

Author Member

Scale in what sense? Displaying it on Github is not a goal. PHP manages it fairly well and is even able to optimize it.

This comment has been minimized.

Copy link
@ostrolucky

ostrolucky Jan 16, 2019

Contributor

Goal should be scale it for both PHP and human reviewing the core functionality of MimeTypes.php. Currently this list is mostly just noise for human since it's something generated. Thanks to Opcache it should be fairly good optimized with external file as well, shouldn't it?

@fabpot fabpot force-pushed the fabpot:mime-type-component branch from 2b1e6cc to 5268389 Jan 16, 2019

Everything fixed, thank you

@fabpot fabpot merged commit bdca5d9 into symfony:master Jan 17, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Jan 17, 2019

feature #29896 [Mime] Add the component (fabpot)
This PR was squashed before being merged into the 4.3-dev branch (closes #29896).

Discussion
----------

[Mime] Add the component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #28832 #21985 makes #15460 trivial
| License       | MIT
| Doc PR        | symfony/symfony-docs#10886

This has been on my todo-list for X years :)

Commits
-------

bdca5d9 tweaked code
5268389 [Mime] added freedesktop as a source for mime types
74ca91d [Mime] added the component
d7ee0ec [HttpFoundation] updated File code

@fabpot fabpot deleted the fabpot:mime-type-component branch Jan 17, 2019

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019

@fabpot fabpot referenced this pull request May 9, 2019

Merged

Release v4.3.0-BETA1 #31435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.