mirror of
https://github.com/symfony/symfony.git
synced 2026-03-24 00:32:15 +01:00
Merge branch '7.4' into 8.0
* 7.4: [HttpFoundation] Deprecate null $format argument to Request::setFormat()
This commit is contained in:
@@ -96,6 +96,7 @@ HttpFoundation
|
||||
* Deprecate using `Request::sendHeaders()` after headers have already been sent; use a `StreamedResponse` instead
|
||||
* Deprecate method `Request::get()`, use properties `->attributes`, `query` or `request` directly instead
|
||||
* Deprecate HTTP method override for methods GET, HEAD, CONNECT and TRACE; it will be ignored in Symfony 8.0
|
||||
* Deprecate accepting null `$format` argument to `Request::setFormat()`
|
||||
|
||||
HttpKernel
|
||||
----------
|
||||
|
||||
@@ -218,6 +218,7 @@ HttpFoundation
|
||||
* Add argument `$partitioned` to `ResponseHeaderBag::clearCookie()`
|
||||
* Add argument `$expiration` to `UriSigner::sign()`
|
||||
* Remove `Request::get()`, use properties `->attributes`, `query` or `request` directly instead
|
||||
* Remove accepting null `$format` argument to `Request::setFormat()`
|
||||
|
||||
HttpClient
|
||||
----------
|
||||
|
||||
@@ -12,6 +12,7 @@ CHANGELOG
|
||||
* Add argument `$partitioned` to `ResponseHeaderBag::clearCookie()`
|
||||
* Add argument `$expiration` to `UriSigner::sign()`
|
||||
* Remove `Request::get()`, use properties `->attributes`, `query` or `request` directly instead
|
||||
* Remove accepting null `$format` argument to `Request::setFormat()`
|
||||
|
||||
7.4
|
||||
---
|
||||
@@ -24,6 +25,7 @@ CHANGELOG
|
||||
* Deprecate method `Request::get()`, use properties `->attributes`, `query` or `request` directly instead
|
||||
* Make `Request::createFromGlobals()` parse the body of PUT, DELETE, PATCH and QUERY requests
|
||||
* Deprecate HTTP method override for methods GET, HEAD, CONNECT and TRACE; it will be ignored in Symfony 8.0
|
||||
* Deprecate accepting null `$format` argument to `Request::setFormat()`
|
||||
|
||||
7.3
|
||||
---
|
||||
|
||||
@@ -1335,13 +1335,13 @@ class Request
|
||||
*
|
||||
* @param string|string[] $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
|
||||
*/
|
||||
public function setFormat(?string $format, string|array $mimeTypes): void
|
||||
public function setFormat(string $format, string|array $mimeTypes): void
|
||||
{
|
||||
if (null === static::$formats) {
|
||||
static::initializeFormats();
|
||||
}
|
||||
|
||||
static::$formats[$format ?? ''] = (array) $mimeTypes;
|
||||
static::$formats[$format] = (array) $mimeTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user