Skip to content

\Symfony\Component\HttpFoundation\Response::__construct should not call to $this->setDate #14906

Closed
@dawehner

Description

@dawehner

Constructing a response object is not for free. While performance does often not matters,
it matters for an HTTP Cache implementation, given how often its called.

Is there any reason why \Symfony\Component\HttpFoundation\Response::__construct() calls out to $this->setDate()?

There is also code in \Symfony\Component\HttpFoundation\Response::getDate(), which ensures that you return a valid object, in case none is set yet

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions