Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 282d3ae

Browse files
committed
updated CHANGELOG for 2.1
1 parent 0f6c50a commit 282d3ae

File tree

3 files changed

+31
-32
lines changed

3 files changed

+31
-32
lines changed

CHANGELOG-2.1.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
4040
* changed the default profiler storage to use the filesystem instead of SQLite
4141
* added support for placeholders in route defaults and requirements (replaced by the value set in the service container)
4242
* added Filesystem component as a dependency
43-
* added new session storage drivers to session.xml: `session.storage.native_memcache`, `session.storage.native_memcached`,
44-
`session.storage.native_sqlite`, `session.storage.null`, `session.storage.memcache`,
45-
and `session.storage.memcached`. Added `session.storage.mock_file` service for functional session testing.
46-
* removed `session.storage.filesystem` service.
4743

4844
### MonologBundle
4945

@@ -230,20 +226,20 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
230226
* made mimetype to extension conversion configurable
231227
* [BC BREAK] Moved all session related classes and interfaces into own namespace, as
232228
`Symfony\Component\HttpFoudation\Session` and renamed classes accordingly.
233-
* Added `FlashBag` (default). Flashes expire when retrieved by `get()` or `all()`.
229+
* Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`.
234230
This makes the implementation ESI compatible.
235-
* Added `AutoExpireFlashBag` to replicate Symfony 2.0.x auto expire behaviour of messages auto expiring
231+
* Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire behaviour of messages auto expiring
236232
after one page page load. Messages must be retrived by `get()` or `all()`.
237-
* [BC BREAK] Removed the following methods from the Session class: `close()`, `setFlash()`, `setFlashes()`
238-
`getFlash()`, `hasFlash()`, andd `removeFlash()`. `getFlashes() returns a `FlashBagInterface`.
233+
* Deprecated the following methods from the Session class: `close()`, `setFlash()`, `setFlashes()`
234+
`getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashes() instead which returns a `FlashBagInterface`.
239235
* `Session->clear()` now only clears session attributes as before it cleared flash messages and
240236
attributes. `Session->getFlashes()->all()` clears flashes now.
241237
* Added `Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` base class for
242238
session storage drivers.
243-
* Added `Symfony\Component\HttpFoundation\Session\Storage\SaveHandlerInterface` interface
239+
* Added `Symfony\Component\HttpFoundation\Session\Storage\SessionSaveHandlerInterface` interface
244240
which storage drivers should implement after inheriting from
245241
`Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` when writing custom session save handlers.
246-
* [BC BREAK] `StorageInterface` methods removed: `write()`, `read()` and `remove()`. Added
242+
* [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and `remove()`. Added
247243
`getBag()`, `registerBag()`.
248244
* Moved attribute storage to `Symfony\Component\HttpFoundation\Attribute\AttributeBagInterface`.
249245
* Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate attributes storage

UPGRADE-2.1.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ UPGRADE FROM 2.0 to 2.1
8080
explicitely need to set the `Valid` constraint in your model if you want to
8181
validate associated objects.
8282

83-
If you don't want to set the `Valid` constraint, or if there is no reference
84-
from the data of the parent form to the data of the child form, you can
83+
If you don't want to set the `Valid` constraint, or if there is no reference
84+
from the data of the parent form to the data of the child form, you can
8585
enable BC behaviour by setting the option "cascade_validation" to `true` on
8686
the parent form.
8787

@@ -236,12 +236,27 @@ UPGRADE FROM 2.0 to 2.1
236236
return false;
237237
}
238238
}
239-
the parent form.
240239

241-
Before: $session->getLocale()
242-
After: $request->getLocale()
240+
* The options passed to `getParent` of the form types don't contain default
241+
options anymore
242+
243+
You should check with `isset` if options exist before checking their value.
244+
245+
Before:
246+
247+
public function getParent(array $options)
248+
{
249+
return 'single_text' === $options['widget'] ? 'text' : 'choice';
250+
}
251+
252+
After:
253+
254+
public function getParent(array $options)
255+
{
256+
return isset($options['widget']) && 'single_text' === $options['widget'] ? 'text' : 'choice';
257+
}
243258

244-
* Flash Messages now returns and array based on type
259+
* Flash Messages now returns and array based on type (the old method are still available but deprecated)
245260

246261
Before (PHP):
247262

@@ -291,13 +306,6 @@ UPGRADE FROM 2.0 to 2.1
291306
</div>
292307
{% endforeach %}
293308

294-
* Session object
295-
296-
The methods, `setFlash()`, `setFlashes()`, `getFlash()`, `hasFlash()`, and `removeFlash()`
297-
have been removed from the `Session` object. `getFlashes()` now returns a `FlashBagInterface`.
298-
Flashes should be popped off the stack using `getFlashes()->get()` or `getFlashes()->all()`
299-
to get all flashes in one go.
300-
301309
* Session storage drivers
302310

303311
Session storage drivers should inherit from
@@ -307,12 +315,3 @@ UPGRADE FROM 2.0 to 2.1
307315

308316
Any session storage driver that wants to use custom save handlers should
309317
implement `Symfony\Component\HttpFoundation\Session\Storage\SaveHandlerInterface`
310-
311-
### [FrameworkBundle]
312-
313-
The service `session.storage.native` is now called `session.storage.native_file`
314-
315-
The service `session.storage.filesystem` is now called `session.storage.mock_file`
316-
and is used for functional unit testing. You will need to update any references
317-
in functional tests.
318-

src/Symfony/Component/HttpFoundation/Session/Session.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,4 +303,8 @@ public function clearFlashes()
303303
{
304304
return $this->getBag('flashes')->clear();
305305
}
306+
307+
public function close()
308+
{
309+
}
306310
}

0 commit comments

Comments
 (0)