Skip to content

[Twig Bridge] Getting flashes should start the session #25073

Closed
@MatTheCat

Description

@MatTheCat
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.0

In 5a56b23 you can see app.flashes returns an empty array if the session hasn't started. Reading http://symfony.com/doc/current/session/avoid_session_start.html this seems really weird to me; this means I have to add app.session.start() after checking forapp.request.hasPreviousSession if I want to make sure any flash is displayed.

Is this really wanted? If we must check for app.request.hasPreviousSession then reading flashes could start the session.

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