Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Add support for structured MIME suffix#61267

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:7.4fromSpomky:features/hybrid-mime-format
Aug 20, 2025

Conversation

@Spomky
Copy link
Contributor

@SpomkySpomky commentedJul 30, 2025
edited
Loading

QA
Branch?7.4
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#61213
LicenseMIT

Extended MIME type handling inRequest::getFormat() to support structured suffixes likeapplication/soap+xml. Introduced a private method to define fallback formats based on RFC specifications. Updated the test suite accordingly.
It adds supports for common mime types:

  • soap: application/soap+xml (instead ofxml)
  • problem: application/problem+json
  • hal: application/hal+json, application/hal+xml
  • jsonapi: application/vnd.api+json
  • yaml: text/yaml, application/x-yaml
  • wbxml: application/vnd.wap.wbxml
  • pdf: application/pdf
  • csv: text/csv

antonkomarev reacted with heart emoji
@SpomkySpomkyforce-pushed thefeatures/hybrid-mime-format branch 2 times, most recently froma7beaed to89470adCompareJuly 30, 2025 20:00
Expanded the MIME type list in `Request::getMimeTypes()` to include mappings for YAML, WBXML, PDF, and CSV formats.
@SpomkySpomkyforce-pushed thefeatures/hybrid-mime-format branch from309a6b7 tof2ba0b3CompareAugust 20, 2025 06:36
@fabpot
Copy link
Member

Thank you@Spomky.

@fabpotfabpot merged commite0365cc intosymfony:7.4Aug 20, 2025
4 of 12 checks passed
nicolas-grekas added a commit that referenced this pull requestAug 20, 2025
…MatTheCat)This PR was squashed before being merged into the 7.4 branch.Discussion----------[HttpFoundation] Don’t check suffix on empty MIME type| Q             | A| ------------- | ---| Branch?       | 7.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Issues        | N/A| License       | MITFix tests from#61267 (remaining failures unrelated).Commits-------3816617 [HttpFoundation] Don’t check suffix on empty MIME type
@xabbuh
Copy link
Member

Adding the new argument to thegetFormat() method is a BC break. Has this been discussed?

Spomky reacted with eyes emoji

@Spomky
Copy link
ContributorAuthor

Adding the new argument to thegetFormat() method is a BC break. Has this been discussed?

Indeed it is not in line withAdding an Argument to a Public Method.
Let me fix that.

xabbuh reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedAug 27, 2025
edited
Loading

While at it, maybe turn the added private method into a constant?

Spomky reacted with thumbs up emoji

Spomky added a commit to Spomky/symfony that referenced this pull requestAug 28, 2025
@SpomkySpomky deleted the features/hybrid-mime-format branchAugust 28, 2025 07:25
@Spomky
Copy link
ContributorAuthor

Hi,
Please see#61544. It addresses your comments.
Kind regards

Spomky added a commit to Spomky/symfony that referenced this pull requestAug 28, 2025
Spomky added a commit to Spomky/symfony that referenced this pull requestAug 28, 2025
nicolas-grekas added a commit that referenced this pull requestAug 28, 2025
…tructured suffix formats as constant (Spomky)This PR was merged into the 7.4 branch.Discussion----------[HttpFoundation] Fix BC Break introduces in `#61267` and structured suffix formats as constant| Q             | A| ------------- | ---| Branch?       | 7.4| Bug fix?      | no| New feature?  | no <!-- if yes, also update src/**/CHANGELOG.md -->| Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md -->| Issues        | Fix #... <!-- prefix each issue number with "Fix #"; no need to create an issue if none exists, explain below -->| License       | MIT<!--🛠️ Replace this text with a concise explanation of your change:- What it does and why it's needed- A simple example of how it works (include PHP, YAML, etc.)- If it modifies existing behavior, include a before/after comparisonContributor guidelines:- ✅ Add tests and ensure they pass- 🐞 Bug fixes must target the **lowest maintained** branch where they applyhttps://symfony.com/releases#maintained-symfony-branches- ✨ New features and deprecations must target the **feature** branch  and must add an entry to the changelog file of the patched component:https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry- 🔒 Do not break backward compatibility:https://symfony.com/bc-->Commits-------aec348d [HttpFoundation] Fix BC Break introduces in `#61267` and structured suffix formats as constant
This was referencedOct 27, 2025
nicolas-grekas added a commit that referenced this pull requestNov 1, 2025
…edefined formats (longwave)This PR was merged into the 6.4 branch.Discussion----------[HttpFoundation] Allow Request::setFormat() to override predefined formats| Q             | A| ------------- | ---| Branch?       | 6.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Issues        |Fix#62226| License       | MITSince#61267 some additional MIME formats are predefined; in order to override the predefined formats you must explictly deregister them. This PR changes the order so formats added later take precedence.Commits-------2402d16 [HttpFoundation] Allow Request::setFormat() to override predefined formats
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@fabpotfabpotfabpot approved these changes

+1 more reviewer

@antonkomarevantonkomarevantonkomarev left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

7.4

Development

Successfully merging this pull request may close these issues.

6 participants

@Spomky@fabpot@xabbuh@nicolas-grekas@antonkomarev@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp