Skip to content

Commit

Permalink
Add B/C layer for Symfony 6.2 deprecation
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas <[email protected]>
  • Loading branch information
mbabker and deluxetom committed Jan 17, 2023
1 parent 603a76f commit 8402feb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Request/Extractor/RequestBodyExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ final class RequestBodyExtractor implements ExtractorInterface
{
public function getRefreshToken(Request $request, string $parameter): ?string
{
if (null === $request->getContentType() || !str_contains($request->getContentType(), 'json')) {
$format = method_exists(Request::class, 'getContentTypeFormat') ? $request->getContentTypeFormat() : $request->getContentType();
if (null === $format || !str_contains($format, 'json')) {
return null;
}

Expand Down

0 comments on commit 8402feb

Please sign in to comment.