Skip to content

[Mime] Fix: add application/x-ndjson MIME type extension #61154

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.4
Choose a base branch
from

Conversation

Aryanverma19
Copy link

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

This PR adds support for the application/x-ndjson MIME type in the Symfony Mime component.

🔹 What it does and why it's needed
NDJSON (Newline-Delimited JSON) is commonly used for streaming JSON objects. Adding this MIME type helps Symfony applications better identify and process such data.

🔹 How it works
The new MIME type was added to MimeTypes.php via the official internal script update_mime_types.php.

✅ No breaking changes.
📄 No changelog entry required as this is a minor internal enhancement.

@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.4 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

@Aryanverma19
Copy link
Author

Hi,This is my first PR to Symfony. I’ve added support for application/x-ndjson MIME type using the internal script. Let me know if I need to improve anything — happy to learn and contribute more!

Aryanverma19 added a commit to Aryanverma19/Aryanverma19 that referenced this pull request Jul 18, 2025
- 🧩 [Symfony PR #61154](symfony/symfony#61154) – Added MIME type support for `application/x-ndjson` in Symfony’s Mime component, improving JSON stream handling.
Aryanverma19 added a commit to Aryanverma19/Aryanverma19 that referenced this pull request Jul 18, 2025
- 🧩 [Symfony PR #61154](symfony/symfony#61154) – Added MIME type support for `application/x-ndjson` in Symfony’s Mime component, improving JSON stream handling.
Aryanverma19 added a commit to Aryanverma19/Aryanverma19 that referenced this pull request Jul 18, 2025
- 🧩 [Symfony PR #61154](symfony/symfony#61154) – Added MIME type support for `application/x-ndjson` in Symfony’s Mime component, improving JSON stream handling.
@carsonbot carsonbot changed the title Fix: add application/x-ndjson MIME type extension [Mime] Fix: add application/x-ndjson MIME type extension Jul 18, 2025
@smnandre
Copy link
Member

@Aryanverma19 I couldn't find x-ndjson in the database used to generate the types map... and it didn’t appear when I ran the script locally either.

Is it possible you added it manually? If so, just a heads-up: that might not be the best idea, since it will be removed each time the file is regenerated.

The best approach would be to wait until it’s properly integrated in an "official" database... but as far as I can see, that process hasn’t started yet.

So, as @MatTheCat mentioned in the original issue, you can add it directly in your app for now as a temporary workaround.

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