Skip to content

[Mime] Update mime types #60438

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

Open
wants to merge 1 commit into
base: 7.3
Choose a base branch
from
Open

[Mime] Update mime types #60438

wants to merge 1 commit into from

Conversation

Bradez
Copy link

@Bradez Bradez commented May 16, 2025

Q A
Branch? 7.3
Bug fix? no
New feature? no
Deprecations? no
Issues Fix
License MIT

Executed update_mime_types.php to add support for the latest registered mime types, specifically recognising video/matroska and audio/matroska for .mkv, .mks, .mka and .mk3d as per RFC9559.

Unfortunately, the database doesn't contain the extensions for the two Matroska mime types (audio/matroska and video/matroska) and therefore I've gone ahead and registered those within the update_mime_types.php file:

+    'mk3d' => ['video/matroska'],
+    'mka' => ['audio/matroska'],
+    'mks' => ['video/matroska'],
+    'mkv' => ['video/matroska'],

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.3 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@stof
Copy link
Member

stof commented May 16, 2025

Have you submitted a PR to the upstream database to add it in there ? It is the proper way to get updates in this list (we don't want to have to maintain the full list ourselves)

@Bradez
Copy link
Author

Bradez commented May 16, 2025

Have you submitted a PR to the upstream database to add it in there ? It is the proper way to get updates in this list (we don't want to have to maintain the full list ourselves)

I have not, no. Albeit, you are absolutely right and I'll open a PR with the upstream to correct this.

Despite this, IANA assigns only mkv and mka (omitting mks and mk3d). I'll see if they're happy to also merge mks and mk3d into the main database. Since the x-matroska is deprecated (according to the RFC), there's still a good possibility we'd need to override the priority ensuring the audio/matroska and video/matroska are the preferred types for these particular extensions.

I'll get this submitted, and we can take it from there.

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.

4 participants