Skip to content

[Mime] Update mime types #52063

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

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Conversation

smnandre
Copy link
Member

Q A
Branch? 6.4
Bug fix? no
New feature? yes
Deprecations? no
License MIT

The recent update done in august (#51191) used an outdated version of the jshttp/mime-db database (See 1.49.0 .. 1.52.0)

The original reason I started this PR was to add the application/yaml type

I fixed update_mime_types.php too, because the script failed to update the date in the MAP docblock.

@smnandre
Copy link
Member Author

(test failures unrelated)

@@ -14,7 +14,7 @@
}

// load new map
$data = json_decode(file_get_contents('https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.49.0/db.json'), true);
$data = json_decode(file_get_contents('https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.52.0/db.json'), true);
Copy link
Member

Choose a reason for hiding this comment

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

is there a way to make it use the latest version each time the script is run (as done for the freedesktop data below where we use the master branch) ?

Copy link
Member

Choose a reason for hiding this comment

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

https://cdn.jsdelivr.net/gh/jshttp/mime-db/db.json?

@@ -3145,7 +3209,6 @@ public function guessMimeType(string $path): ?string
'snd' => ['audio/basic'],
'snf' => ['application/x-font-snf'],
'so' => ['application/x-sharedlib'],
'so.[0-9]*' => ['application/x-sharedlib'],
Copy link
Member

Choose a reason for hiding this comment

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

Can you check why this was removed?

Copy link
Member

Choose a reason for hiding this comment

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

The update script was updated to only put actual extensions in that list and not patterns (as our API does not deal with patterns). My guess is that the file was not properly regenerated when we did that change last time (otherwise it would have been removed at that time)

@nicolas-grekas nicolas-grekas added the ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" label Oct 16, 2023
@nicolas-grekas
Copy link
Member

Thank you @smnandre.

@nicolas-grekas nicolas-grekas merged commit bc38faa into symfony:6.4 Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Mime ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" Status: Reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants