8000 bug #25599 Add application/ld+json format associated to json (vincent… · symfony/symfony@2f2a47b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f2a47b

Browse files
bug #25599 Add application/ld+json format associated to json (vincentchalamon)
This PR was squashed before being merged into the 2.7 branch (closes #25599). Discussion ---------- Add application/ld+json format associated to json | Q | A | ------------- | --- | Branch? | 2.7 up to 4.0 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Add `application/ld+json` Content-Type as json format in Request. Commits ------- 0917c4c Add application/ld+json format associated to json
2 parents b1aba41 + 0917c4c commit 2f2a47b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,6 +1876,7 @@ protected static function initializeFormats()
18761876
'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'),
18771877
'css' => array('text/css'),
18781878
'json' => array('application/json', 'application/x-json'),
1879+
'jsonld' => array('application/ld+json'),
18791880
'xml' => array('text/xml', 'application/xml', 'application/x-xml'),
18801881
'rdf' => array('application/rdf+xml'),
18811882
'atom' => array('application/atom+xml'),

src/Symfony/Component/HttpFoundation/Tests/RequestTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ public function getFormatToMimeTypeMapProvider()
334334
array('js', array('application/javascript', 'application/x-javascript', 'text/javascript')),
335335
array('css', array('text/css')),
336336
array('json', array('application/json', 'application/x-json')),
337+
array('jsonld', array('application/ld+json')),
337338
array('xml', array('text/xml', 'application/xml', 'application/x-xml')),
338339
array('rdf', array('application/rdf+xml')),
339340
array('atom', array('application/atom+xml')),

0 commit comments

Comments
 (0)
0