diff --git a/UPGRADE-2.1.md b/UPGRADE-2.1.md index 862806138b..b43f1564cd 100644 --- a/UPGRADE-2.1.md +++ b/UPGRADE-2.1.md @@ -258,30 +258,6 @@ UPGRADE FROM 2.0 to 2.1 * Flash Messages now returns and array based on type (the old method are still available but deprecated) - Before (PHP): - - hasFlash('notice')): ?> -
- getFlash('notice') ?> -
- - - After (PHP): - - getFlashBag()->has('notice')): ?> -
- getFlashBag()->get('notice') ?> -
- - - If you wanted to process all flash types you could also make use of the `getFlashBag()->all()` API: - - getFlashBag()->all() as $type => $flash): ?> -
- -
- - Before (Twig): {% if app.session.hasFlash('notice') %} @@ -292,15 +268,15 @@ UPGRADE FROM 2.0 to 2.1 After (Twig): - {% if app.session.flashes.has('notice') %} + {% if app.session.flashbag.has('notice') %}
- {{ app.session.flashes.get('notice') }} + {{ app.session.flashbag.get('notice') }}
{% endif %} Again you can process all flash messages in one go with - {% for type, flashMessage in app.session.flashes.all() %} + {% for type, flashMessage in app.session.flashbag.all() %}
{{ flashMessage }}