bug #859 Fix session starting issue on flash messages usage (andrerom)
bug #859 Fix session starting issue on flash messages usage (andrerom)

This PR was merged into the master branch.

Discussion
----------

Fix session starting issue on flash messages usage

Use of flash messages triggers session start, which as of last year
triggers Symfony to mark response as private, and not cached.

Fix the issue by checking if there is a session first as advised on:
https://symfony.com/doc/current/session/avoid_session_start.html

Commits
-------

2362ac8 Fix session starting issue in symfony-demo on flash messages

bocharsky-bw/symfony-demo,symfony/symfony-demo,Codeception/symfony-demo,symfony/symfony-demo,bocharsky-bw/symfony-demo,voronkovich/symfony-demo,yceruto/symfony-demo,yceruto/symfony-demo,voronkovich/symfony-demo,javiereguiluz/symfony-demo,javiereguiluz/symfony-demo,TomasVotruba/symfony-demo,Codeception/symfony-demo,voronkovich/symfony-demo,symfony/symfony-demo,Codeception/symfony-demo,TomasVotruba/symfony-demo,TomasVotruba/symfony-demo,bocharsky-bw/symfony-demo,javiereguiluz/symfony-demo,yceruto/symfony-demo