Content-Length: 266583 | pFad | https://github.com/symfony/symfony/issues/61135

CE `MimeTypes::getExtensions` returns an empty array with `application/x-ndjson` mime type · Issue #61135 · symfony/symfony · GitHub
Skip to content

MimeTypes::getExtensions returns an empty array with application/x-ndjson mime type #61135

@AZoumis

Description

@AZoumis

Symfony version(s) affected

7.4

Description

Hi there,

I noticed that MimeTypes::getExtensions returns an empty array with application/x-ndjson mime type. However, I would expect the return array to return atleast json

How to reproduce

You can use this file to reproduce this issue: ndjson_example.json

$mimeType = mime_content_type('ndjson_example.json');
var_dump($mimeType); // string(20) "application/x-ndjson"
var_dump(new MimeTypes()->getExtensions($mimeType)); // array(0) {}

You can also reproduce the issue without a file:

var_dump(new MimeTypes()->getExtensions('application/x-ndjson')); // array(0) {}

Possible Solution

No response

Additional Context

https://cdn.jsdelivr.net/gh/jshttp/mime-db/db.json doesn't seem to contain application/x-ndjson.
Using PHP v8.4.10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/symfony/symfony/issues/61135

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy