Lock to specific version of http-accept dependency for now
This commit is contained in:
parent
9299a7da3e
commit
34f719e963
|
|
@ -9,7 +9,7 @@
|
||||||
"nyholm/psr7": "^1.3",
|
"nyholm/psr7": "^1.3",
|
||||||
"psr/http-message": "^1.0",
|
"psr/http-message": "^1.0",
|
||||||
"psr/http-server-handler": "^1.0",
|
"psr/http-server-handler": "^1.0",
|
||||||
"xynha/http-accept": "dev-master"
|
"xynha/http-accept": "dev-master#b712d4ae64ca53fa835667fda73605ae16cddcbb"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
|
||||||
|
|
@ -258,11 +258,8 @@ final class JsonApi implements RequestHandlerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
$mediaList = (new AcceptParser())->parse($accept);
|
$mediaList = (new AcceptParser())->parse($accept);
|
||||||
$count = $mediaList->count();
|
|
||||||
|
|
||||||
for ($i = 0; $i < $count; $i++) {
|
|
||||||
$mediaType = $mediaList->preferredMedia($i);
|
|
||||||
|
|
||||||
|
foreach ($mediaList->all() as $mediaType) {
|
||||||
if (! in_array($mediaType->mimetype(), [JsonApi::MEDIA_TYPE, '*/*'])) {
|
if (! in_array($mediaType->mimetype(), [JsonApi::MEDIA_TYPE, '*/*'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue