Skip to content

Commit 1a927a6

Browse files
committed
Remove deprecated Request::getContentType()
1 parent 74e253f commit 1a927a6

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

UPGRADE-7.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ HttpFoundation
3232
when the value cannot be converted to the expected type. They throw a `UnexpectedValueException` instead.
3333
* Replace `Symfony\Component\HttpFoundation\RequestMatcher` with `Symfony\Component\HttpFoundation\ChainRequestMatcher`
3434
* Replace `Symfony\Component\HttpFoundation\ExpressionRequestMatcher` with `Symfony\Component\HttpFoundation\RequestMatcher\ExpressionRequestMatcher`
35+
* Remove `Request::getContentType()`, use `Request::getContentTypeFormat()` instead
3536

3637
Lock
3738
----

src/Symfony/Component/HttpFoundation/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CHANGELOG
99
* Calling `ParameterBag::getInt()` and `ParameterBag::getBool()` throws a `UnexpectedValueException` when the value is
1010
invalid, instead of returning `0` or `false`.
1111
* Remove classes `RequestMatcher` and `ExpressionRequestMatcher`
12+
* Remove `Request::getContentType()`, use `Request::getContentTypeFormat()` instead
1213

1314
6.4
1415
---

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,18 +1337,6 @@ public function setRequestFormat(?string $format)
13371337
$this->format = $format;
13381338
}
13391339

1340-
/**
1341-
* Gets the usual name of the format associated with the request's media type (provided in the Content-Type header).
1342-
*
1343-
* @deprecated since Symfony 6.2, use getContentTypeFormat() instead
1344-
*/
1345-
public function getContentType(): ?string
1346-
{
1347-
trigger_deprecation('symfony/http-foundation', '6.2', 'The "%s()" method is deprecated, use "getContentTypeFormat()" instead.', __METHOD__);
1348-
1349-
return $this->getContentTypeFormat();
1350-
}
1351-
13521340
/**
13531341
* Gets the usual name of the format associated with the request's media type (provided in the Content-Type header).
13541342
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy