Skip to content

Commit c03e4c0

Browse files
committed
Merge branch '4.2'
* 4.2: [Security] Added a missing class import in form login article Use "index" instead of "indexAction" feat(ui): flash message keys added Added a brief mention about upgrading custom bundle config to Flex
2 parents 8bce8a2 + 720bbc7 commit c03e4c0

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

controller.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,14 +457,23 @@ read any flash messages from the session using ``app.flashes()``:
457457

458458
{# templates/base.html.twig #}
459459

460-
{# you can read and display just one flash message type... #}
460+
{# read and display just one flash message type #}
461461
{% for message in app.flashes('notice') %}
462462
<div class="flash-notice">
463463
{{ message }}
464464
</div>
465465
{% endfor %}
466466

467-
{# ...or you can read and display every flash message available #}
467+
{# read and display several types of flash messages #}
468+
{% for label, messages in app.flashes(['success', 'warning']) %}
469+
{% for message in messages %}
470+
<div class="flash-{{ label }}">
471+
{{ message }}
472+
</div>
473+
{% endfor %}
474+
{% endfor %}
475+
476+
{# read and display all flash messages #}
468477
{% for label, messages in app.flashes %}
469478
{% for message in messages %}
470479
<div class="flash-{{ label }}">

create_framework/separation_of_concerns.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Don't forget to update the ``example.com/src/app.php`` file accordingly::
138138

139139
$routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', [
140140
'year' => null,
141-
'_controller' => 'Calendar\Controller\LeapYearController::indexAction',
141+
'_controller' => 'Calendar\Controller\LeapYearController::index',
142142
]));
143143

144144
To sum up, here is the new file layout:

security/form_login_setup.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ a traditional HTML form that submits to ``/login``:
122122

123123
use App\Entity\User;
124124
use Doctrine\ORM\EntityManagerInterface;
125+
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
125126
use Symfony\Component\HttpFoundation\RedirectResponse;
126127
use Symfony\Component\HttpFoundation\Request;
127128
use Symfony\Component\Routing\RouterInterface;

0 commit comments

Comments
 (0)