Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 68074a2

Browse filesBrowse files
author
Drak
committed
Changelog and upgrading changes.
1 parent 7f33b33 commit 68074a2
Copy full SHA for 68074a2

File tree

Expand file treeCollapse file tree

2 files changed

+73
-37
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+73
-37
lines changed

‎CHANGELOG-2.1.md

Copy file name to clipboardExpand all lines: CHANGELOG-2.1.md
+52-31Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
2727
### DoctrineBundle
2828

2929
* This bundle has been moved to the Doctrine organization
30-
* added optional `group_by` property to `EntityType` that supports either a `PropertyPath` or a `\Closure` that is evaluated on the entity choices
31-
* The `em` option for the `UniqueEntity` constraint is now optional (and should probably not be used anymore).
30+
* added optional `group_by` property to `EntityType` that supports either a
31+
`PropertyPath` or a `\Closure` that is evaluated on the entity choices
32+
* The `em` option for the `UniqueEntity` constraint is now optional (and should
33+
probably not be used anymore).
3234

3335
### FrameworkBundle
3436

@@ -39,13 +41,17 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
3941
* added Controller::getUser()
4042
* [BC BREAK] assets_base_urls and base_urls merging strategy has changed
4143
* changed the default profiler storage to use the filesystem instead of SQLite
42-
* added support for placeholders in route defaults and requirements (replaced by the value set in the service container)
44+
* added support for placeholders in route defaults and requirements (replaced
45+
by the value set in the service container)
4346
* added Filesystem component as a dependency
4447
* added support for hinclude (use ``standalone: 'js'`` in render tag)
4548
* session options: lifetime, path, domain, secure, httponly were deprecated.
46-
Prefixed versions should now be used instead: cookie_lifetime, cookie_path, cookie_domain, cookie_secure, cookie_httponly
47-
* [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure', 'httponly'
48-
are now prefixed with cookie_ when dumped to the container
49+
Prefixed versions should now be used instead: cookie_lifetime, cookie_path,
50+
cookie_domain, cookie_secure, cookie_httponly
51+
* [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure',
52+
'httponly' are now prefixed with cookie_ when dumped to the container
53+
* Added `handler_id` configuration under `session` key to represent `session.handler`
54+
service, defaults to `session.handler.native_file`.
4955

5056
### MonologBundle
5157

@@ -257,32 +263,47 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
257263
* made mimetype to extension conversion configurable
258264
* [BC BREAK] Moved all session related classes and interfaces into own namespace, as
259265
`Symfony\Component\HttpFoudation\Session` and renamed classes accordingly.
260-
* Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`.
261-
This makes the implementation ESI compatible.
262-
* Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire behaviour of messages auto expiring
263-
after one page page load. Messages must be retrived by `get()` or `all()`.
264-
* [BC BREAK] Removed the `close()` method from the Session class
266+
Session handlers are located in the subnamespace `Symfony\Component\HttpFoudation\Session\Handler`.
267+
* SessionHandlers must implement `\SessionHandlerInterface` or extend from the
268+
`Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class.
269+
* Added internal storage driver proxy mechanism for forward compatibility with
270+
PHP 5.4 `\SessionHandler` class.
271+
* Added session handlers for PHP native Memcache, Memcached and SQLite session
272+
save handlers.
273+
* Added session handlers for custom Memcache, Memcached and Null session save handlers.
274+
* [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionHandler`.
275+
* [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and
276+
`remove()`. Added `getBag()`, `registerBag()`. The `NativeSessionStorage` class
277+
is a mediator for the session storage internals including the session handlers
278+
which do the real work of participating in the internal PHP session workflow.
279+
* [BC BREAK] Introduced mock implementations of `SessionStorage` to enable unit
280+
and functional testing without starting real PHP sessions. Removed
281+
`ArraySessionStorage`, and replaced with `MockArraySessionStorage` for unit
282+
tests; removed `FilesystemSessionStorage`, and replaced with`MockFileSessionStorage`
283+
for functional tests. These do not interact with global session ini
284+
configuration values, session functions or `$_SESSION` supreglobal. This means
285+
they can be configured directly allowing multiple instances to work without
286+
conflicting in the same PHP process.
287+
* [BC BREAK] Removed the `close()` method from the `Session` class, as this is
288+
now redundant.
265289
* Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()`
266-
`getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead which returns a `FlashBagInterface`.
267-
* `Session->clear()` now only clears session attributes as before it cleared flash messages and
268-
attributes. `Session->getFlashBag()->all()` clears flashes now.
269-
* Added `Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` base class for
270-
session storage drivers.
271-
* Added `SessionHandlerInterface` interface which storage drivers should implement after inheriting from
272-
`Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` when writing custom
273-
session save handlers using PHP 5.3. This interface is a stub for the PHP 5.4 interface.
274-
* [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and `remove()`. Added
275-
`getBag()`, `registerBag()`.
276-
* Moved attribute storage to `Symfony\Component\HttpFoundation\Attribute\AttributeBagInterface`.
277-
* Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate attributes storage
278-
behaviour from 2.0.x (default).
279-
* Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for namespace session attributes.
280-
* Session now implements `Symfony\Component\HttpFoundation\Session\SessionInterface` making
281-
implementation customizable and portable.
282-
* [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionStorage`.
283-
* Added session storage drivers for PHP native Memcache, Memcached and SQLite session save handlers.
284-
* Added session storage drivers for custom Memcache, Memcached and Null session save handlers.
285-
* Removed `FilesystemSessionStorage`, use `MockFileSessionStorage` for functional testing instead.
290+
`getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead
291+
which returns a `FlashBagInterface`.
292+
* `Session->clear()` now only clears session attributes as before it cleared
293+
flash messages and attributes. `Session->getFlashBag()->all()` clears flashes now.
294+
* Session data is now managed by `SessionBagInterface` which to better encapsulate
295+
session data.
296+
* Refactored session attribute and flash messages system to their own
297+
`SessionBagInterface` implementations.
298+
* Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This
299+
implementation is ESI compatible.
300+
* Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire
301+
behaviour of messages auto expiring.
302+
after one page page load. Messages must be retrieved by `get()` or `all()`.
303+
* Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate
304+
attributes storage behaviour from 2.0.x (default).
305+
* Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for
306+
namespace session attributes.
286307

287308
### HttpKernel
288309

‎UPGRADE-2.1.md

Copy file name to clipboardExpand all lines: UPGRADE-2.1.md
+21-6Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,11 @@ UPGRADE FROM 2.0 to 2.1
334334
{% endfor %}
335335
```
336336
337-
* Session storage drivers should inherit from
338-
`Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage`
339-
and should no longer implement `read()`, `write()`, and `remove()`, which
340-
were removed from `SessionStorageInterface`.
337+
* Session handler drivers should implement `\SessionHandlerInterface` or extend from
338+
`Symfony\Component\HttpFoudation\Session\Storage\Handler\NativeHandlerInterface` base class and renamed
339+
to `Handler\FooSessionHandler`. E.g. `PdoSessionStorage` becomes `Handler\PdoSessionHandler`.
341340
342-
Any session storage driver that wants to use custom save handlers should
343-
implement `SessionHandlerInterface`.
341+
* Refactor code using `$session->*flash*()` methods to use `$session->getFlashBag()->*()`.
344342
345343
### FrameworkBundle
346344
@@ -371,3 +369,20 @@ UPGRADE FROM 2.0 to 2.1
371369
cookie_httponly: true
372370
```
373371
372+
Added `handler_id`, defaults to `session.handler.native_file`.
373+
374+
```
375+
framework:
376+
session:
377+
storage_id: session.storage.native
378+
handler_id: session.handler.native_file
379+
```
380+
381+
To use mock session storage use the following. `handler_id` is irrelevant in this context.
382+
383+
```
384+
framework:
385+
session:
386+
storage_id: session.storage.mock_file
387+
```
388+

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.