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
Merged

[Mime] Add the component #29896

merged 4 commits into from
Jan 17, 2019

Conversation

fabpot
Copy link
Member

@fabpot fabpot 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 :)

@fabpot fabpot force-pushed the mime-type-component branch 2 times, most recently from ac0eda7 to 7f7f4b8 Compare January 16, 2019 06:51
@teohhanhui
Copy link
Contributor

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

@javiereguiluz
Copy link
Member

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

@fabpot
Copy link
Member Author

fabpot 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
Copy link
Member Author

fabpot 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'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dismissed chalasr’s stale review January 16, 2019 23:02

Everything fixed, thank you

@fabpot fabpot merged commit bdca5d9 into symfony:master Jan 17, 2019
fabpot added a commit that referenced this pull request Jan 17, 2019
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 mime-type-component branch January 17, 2019 07:08
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
nicolas-grekas added a commit that referenced this pull request Jun 8, 2019
…anagi)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[Serializer] Remove last deprecated/obsolete paths

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28316, #28709, #31030, #27020, #29896, 16f8a13#r201060750   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

This should fix the last deprecations & obsolete code paths for the Serializer component.

Commits
-------

c703b35 [Serializer] Remove last deprecated/obsolete paths
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

9 participants