Changelog and upgrading changes.
This commit is contained in:
parent
7f33b33aa6
commit
68074a2be0
|
@ -27,8 +27,10 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
|
||||||
### DoctrineBundle
|
### DoctrineBundle
|
||||||
|
|
||||||
* This bundle has been moved to the Doctrine organization
|
* This bundle has been moved to the Doctrine organization
|
||||||
* added optional `group_by` property to `EntityType` that supports either a `PropertyPath` or a `\Closure` that is evaluated on the entity choices
|
* added optional `group_by` property to `EntityType` that supports either a
|
||||||
* The `em` option for the `UniqueEntity` constraint is now optional (and should probably not be used anymore).
|
`PropertyPath` or a `\Closure` that is evaluated on the entity choices
|
||||||
|
* The `em` option for the `UniqueEntity` constraint is now optional (and should
|
||||||
|
probably not be used anymore).
|
||||||
|
|
||||||
### FrameworkBundle
|
### FrameworkBundle
|
||||||
|
|
||||||
|
@ -39,13 +41,17 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
|
||||||
* added Controller::getUser()
|
* added Controller::getUser()
|
||||||
* [BC BREAK] assets_base_urls and base_urls merging strategy has changed
|
* [BC BREAK] assets_base_urls and base_urls merging strategy has changed
|
||||||
* changed the default profiler storage to use the filesystem instead of SQLite
|
* changed the default profiler storage to use the filesystem instead of SQLite
|
||||||
* added support for placeholders in route defaults and requirements (replaced by the value set in the service container)
|
* added support for placeholders in route defaults and requirements (replaced
|
||||||
|
by the value set in the service container)
|
||||||
* added Filesystem component as a dependency
|
* added Filesystem component as a dependency
|
||||||
* added support for hinclude (use ``standalone: 'js'`` in render tag)
|
* added support for hinclude (use ``standalone: 'js'`` in render tag)
|
||||||
* session options: lifetime, path, domain, secure, httponly were deprecated.
|
* session options: lifetime, path, domain, secure, httponly were deprecated.
|
||||||
Prefixed versions should now be used instead: cookie_lifetime, cookie_path, cookie_domain, cookie_secure, cookie_httponly
|
Prefixed versions should now be used instead: cookie_lifetime, cookie_path,
|
||||||
* [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure', 'httponly'
|
cookie_domain, cookie_secure, cookie_httponly
|
||||||
are now prefixed with cookie_ when dumped to the container
|
* [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure',
|
||||||
|
'httponly' are now prefixed with cookie_ when dumped to the container
|
||||||
|
* Added `handler_id` configuration under `session` key to represent `session.handler`
|
||||||
|
service, defaults to `session.handler.native_file`.
|
||||||
|
|
||||||
### MonologBundle
|
### MonologBundle
|
||||||
|
|
||||||
|
@ -257,32 +263,47 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
|
||||||
* made mimetype to extension conversion configurable
|
* made mimetype to extension conversion configurable
|
||||||
* [BC BREAK] Moved all session related classes and interfaces into own namespace, as
|
* [BC BREAK] Moved all session related classes and interfaces into own namespace, as
|
||||||
`Symfony\Component\HttpFoudation\Session` and renamed classes accordingly.
|
`Symfony\Component\HttpFoudation\Session` and renamed classes accordingly.
|
||||||
* Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`.
|
Session handlers are located in the subnamespace `Symfony\Component\HttpFoudation\Session\Handler`.
|
||||||
This makes the implementation ESI compatible.
|
* SessionHandlers must implement `\SessionHandlerInterface` or extend from the
|
||||||
* Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire behaviour of messages auto expiring
|
`Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class.
|
||||||
after one page page load. Messages must be retrived by `get()` or `all()`.
|
* Added internal storage driver proxy mechanism for forward compatibility with
|
||||||
* [BC BREAK] Removed the `close()` method from the Session class
|
PHP 5.4 `\SessionHandler` class.
|
||||||
|
* Added session handlers for PHP native Memcache, Memcached and SQLite session
|
||||||
|
save handlers.
|
||||||
|
* Added session handlers for custom Memcache, Memcached and Null session save handlers.
|
||||||
|
* [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionHandler`.
|
||||||
|
* [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and
|
||||||
|
`remove()`. Added `getBag()`, `registerBag()`. The `NativeSessionStorage` class
|
||||||
|
is a mediator for the session storage internals including the session handlers
|
||||||
|
which do the real work of participating in the internal PHP session workflow.
|
||||||
|
* [BC BREAK] Introduced mock implementations of `SessionStorage` to enable unit
|
||||||
|
and functional testing without starting real PHP sessions. Removed
|
||||||
|
`ArraySessionStorage`, and replaced with `MockArraySessionStorage` for unit
|
||||||
|
tests; removed `FilesystemSessionStorage`, and replaced with`MockFileSessionStorage`
|
||||||
|
for functional tests. These do not interact with global session ini
|
||||||
|
configuration values, session functions or `$_SESSION` supreglobal. This means
|
||||||
|
they can be configured directly allowing multiple instances to work without
|
||||||
|
conflicting in the same PHP process.
|
||||||
|
* [BC BREAK] Removed the `close()` method from the `Session` class, as this is
|
||||||
|
now redundant.
|
||||||
* Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()`
|
* Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()`
|
||||||
`getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead which returns a `FlashBagInterface`.
|
`getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead
|
||||||
* `Session->clear()` now only clears session attributes as before it cleared flash messages and
|
which returns a `FlashBagInterface`.
|
||||||
attributes. `Session->getFlashBag()->all()` clears flashes now.
|
* `Session->clear()` now only clears session attributes as before it cleared
|
||||||
* Added `Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` base class for
|
flash messages and attributes. `Session->getFlashBag()->all()` clears flashes now.
|
||||||
session storage drivers.
|
* Session data is now managed by `SessionBagInterface` which to better encapsulate
|
||||||
* Added `SessionHandlerInterface` interface which storage drivers should implement after inheriting from
|
session data.
|
||||||
`Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` when writing custom
|
* Refactored session attribute and flash messages system to their own
|
||||||
session save handlers using PHP 5.3. This interface is a stub for the PHP 5.4 interface.
|
`SessionBagInterface` implementations.
|
||||||
* [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and `remove()`. Added
|
* Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This
|
||||||
`getBag()`, `registerBag()`.
|
implementation is ESI compatible.
|
||||||
* Moved attribute storage to `Symfony\Component\HttpFoundation\Attribute\AttributeBagInterface`.
|
* Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire
|
||||||
* Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate attributes storage
|
behaviour of messages auto expiring.
|
||||||
behaviour from 2.0.x (default).
|
after one page page load. Messages must be retrieved by `get()` or `all()`.
|
||||||
* Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for namespace session attributes.
|
* Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate
|
||||||
* Session now implements `Symfony\Component\HttpFoundation\Session\SessionInterface` making
|
attributes storage behaviour from 2.0.x (default).
|
||||||
implementation customizable and portable.
|
* Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for
|
||||||
* [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionStorage`.
|
namespace session attributes.
|
||||||
* Added session storage drivers for PHP native Memcache, Memcached and SQLite session save handlers.
|
|
||||||
* Added session storage drivers for custom Memcache, Memcached and Null session save handlers.
|
|
||||||
* Removed `FilesystemSessionStorage`, use `MockFileSessionStorage` for functional testing instead.
|
|
||||||
|
|
||||||
### HttpKernel
|
### HttpKernel
|
||||||
|
|
||||||
|
|
|
@ -334,13 +334,11 @@ UPGRADE FROM 2.0 to 2.1
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
```
|
```
|
||||||
|
|
||||||
* Session storage drivers should inherit from
|
* Session handler drivers should implement `\SessionHandlerInterface` or extend from
|
||||||
`Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage`
|
`Symfony\Component\HttpFoudation\Session\Storage\Handler\NativeHandlerInterface` base class and renamed
|
||||||
and should no longer implement `read()`, `write()`, and `remove()`, which
|
to `Handler\FooSessionHandler`. E.g. `PdoSessionStorage` becomes `Handler\PdoSessionHandler`.
|
||||||
were removed from `SessionStorageInterface`.
|
|
||||||
|
|
||||||
Any session storage driver that wants to use custom save handlers should
|
* Refactor code using `$session->*flash*()` methods to use `$session->getFlashBag()->*()`.
|
||||||
implement `SessionHandlerInterface`.
|
|
||||||
|
|
||||||
### FrameworkBundle
|
### FrameworkBundle
|
||||||
|
|
||||||
|
@ -371,3 +369,20 @@ UPGRADE FROM 2.0 to 2.1
|
||||||
cookie_httponly: true
|
cookie_httponly: true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Added `handler_id`, defaults to `session.handler.native_file`.
|
||||||
|
|
||||||
|
```
|
||||||
|
framework:
|
||||||
|
session:
|
||||||
|
storage_id: session.storage.native
|
||||||
|
handler_id: session.handler.native_file
|
||||||
|
```
|
||||||
|
|
||||||
|
To use mock session storage use the following. `handler_id` is irrelevant in this context.
|
||||||
|
|
||||||
|
```
|
||||||
|
framework:
|
||||||
|
session:
|
||||||
|
storage_id: session.storage.mock_file
|
||||||
|
```
|
||||||
|
|
||||||
|
|
Reference in New Issue