Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 399fd1f

Browse filesBrowse files
committed
Remove deprecated Request::getContentType()
1 parent f3d6bae commit 399fd1f
Copy full SHA for 399fd1f

File tree

Expand file treeCollapse file tree

3 files changed

+2
-12
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+2
-12
lines changed

‎UPGRADE-7.0.md

Copy file name to clipboardExpand all lines: UPGRADE-7.0.md
+1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CHANGELOG
88
unless flag `FILTER_NULL_ON_FAILURE` is set
99
* Calling `ParameterBag::getInt()` and `ParameterBag::getBool()` throws a `UnexpectedValueException` on invalid value
1010
* Remove classes `RequestMatcher` and `ExpressionRequestMatcher`
11+
* Remove `Request::getContentType()`, use `Request::getContentTypeFormat()` instead
1112

1213
6.4
1314
---

‎src/Symfony/Component/HttpFoundation/Request.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Request.php
-12Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.