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 a0290a1

Browse filesBrowse 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
Copy full SHA for a0290a1

File tree

1 file changed

+7
-0
lines changed
Filter options

1 file changed

+7
-0
lines changed

‎components/http_foundation.rst

Copy file name to clipboardExpand all lines: components/http_foundation.rst
+7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.