Skip to content

Commit a0290a1

Browse files
committed
minor #9045 [HttpFoundation] Add a doc entry since Response's methods now accept immutable date objects (Simperfit, javiereguiluz)
This PR was merged into the master branch. Discussion ---------- [HttpFoundation] Add a doc entry since Response's methods now accept immutable date objects fixes #9024 Commits ------- 82ea3ac Added the new doc in a note dbcfb85 [HttpFoundation] Add a doc entry since Response's methods now accept immutable object
2 parents 7efb90f + 82ea3ac commit a0290a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/http_foundation.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,13 @@ of methods to manipulate the HTTP headers related to the cache:
400400
* :method:`Symfony\\Component\\HttpFoundation\\Response::setEtag`;
401401
* :method:`Symfony\\Component\\HttpFoundation\\Response::setVary`;
402402

403+
.. note::
404+
405+
The methods :method:`Symfony\\Component\\HttpFoundation\\Response::setExpires`,
406+
:method:`Symfony\\Component\\HttpFoundation\\Response::setLastModified` and
407+
:method:`Symfony\\Component\\HttpFoundation\\Response::setDate` accept any
408+
object that implements ``\DateTimeInterface``, including immutable date objects.
409+
403410
The :method:`Symfony\\Component\\HttpFoundation\\Response::setCache` method
404411
can be used to set the most commonly used cache information in one method
405412
call::

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