Skip to content

[HttpFoundation] Add a doc entry since Response's methods now accept immutable date objects #9045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/http_foundation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ of methods to manipulate the HTTP headers related to the cache:
* :method:`Symfony\\Component\\HttpFoundation\\Response::setEtag`;
* :method:`Symfony\\Component\\HttpFoundation\\Response::setVary`;

.. note::

The methods :method:`Symfony\\Component\\HttpFoundation\\Response::setExpires`,
:method:`Symfony\\Component\\HttpFoundation\\Response::setLastModified` and
:method:`Symfony\\Component\\HttpFoundation\\Response::setDate` accept any
object that implements ``\DateTimeInterface``, including immutable date objects.

The :method:`Symfony\\Component\\HttpFoundation\\Response::setCache` method
can be used to set the most commonly used cache information in one method
call::
Expand Down