Fixed formatting in UPGRADE file
This commit is contained in:
parent
7e4f4dcdf9
commit
04919a2978
|
@ -258,39 +258,39 @@ UPGRADE FROM 2.0 to 2.1
|
||||||
|
|
||||||
* Flash Messages now returns and array based on type (the old method are still available but deprecated)
|
* Flash Messages now returns and array based on type (the old method are still available but deprecated)
|
||||||
|
|
||||||
Before (Twig):
|
Before (Twig):
|
||||||
|
|
||||||
{% if app.session.hasFlash('notice') %}
|
{% if app.session.hasFlash('notice') %}
|
||||||
<div class="flash-notice">
|
<div class="flash-notice">
|
||||||
{{ app.session.flash('notice') }}
|
{{ app.session.flash('notice') }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
After (Twig):
|
After (Twig):
|
||||||
|
|
||||||
{% if app.session.flashbag.has('notice') %}
|
{% if app.session.flashbag.has('notice') %}
|
||||||
<div class="flash-notice">
|
<div class="flash-notice">
|
||||||
{{ app.session.flashbag.get('notice') }}
|
{{ app.session.flashbag.get('notice') }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
Again you can process all flash messages in one go with
|
Again you can process all flash messages in one go with
|
||||||
|
|
||||||
{% for type, flashMessage in app.session.flashbag.all() %}
|
{% for type, flashMessage in app.session.flashbag.all() %}
|
||||||
<div class="flash-{{ type }}">
|
<div class="flash-{{ type }}">
|
||||||
{{ flashMessage }}
|
{{ flashMessage }}
|
||||||
</div>
|
</div>
|
||||||
{% endforeach %}
|
{% endforeach %}
|
||||||
|
|
||||||
* Session storage drivers
|
* Session storage drivers
|
||||||
|
|
||||||
Session storage drivers should inherit from
|
Session storage drivers should inherit from
|
||||||
`Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage`
|
`Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage`
|
||||||
and no longer should implement `read()`, `write()`, `remove()` which were removed from the
|
and no longer should implement `read()`, `write()`, `remove()` which were removed from the
|
||||||
`SessionStorageInterface`.
|
`SessionStorageInterface`.
|
||||||
|
|
||||||
Any session storage driver that wants to use custom save handlers should
|
Any session storage driver that wants to use custom save handlers should
|
||||||
implement `Symfony\Component\HttpFoundation\Session\Storage\SaveHandlerInterface`
|
implement `Symfony\Component\HttpFoundation\Session\Storage\SaveHandlerInterface`
|
||||||
|
|
||||||
* The methods `add`, `remove`, `setParent`, `bind` and `setData` in class Form
|
* The methods `add`, `remove`, `setParent`, `bind` and `setData` in class Form
|
||||||
now throw an exception if the form is already bound
|
now throw an exception if the form is already bound
|
||||||
|
|
Reference in New Issue