diff --git a/README.md b/README.md index c204d103de7..6844e9b17a3 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,58 @@ Develop: [![Build Status](https://secure.travis-ci.org/zendframework/zf2.png?bra *Zend Framework 2.1.0dev* -This is the first minor (feature) release for the 2.0 series. +This is the first minor (feature) release for the version 2 series. DD Mmm YYYY ### UPDATES IN 2.1.0 #### Backwards Compatibility Break: Session Storage -The default session storage object has changed to an array adapter; this -is a minimal break in compatibility. Most developers are not working -directly with the storage object, but rather a Container, therefore switching -out the default will not change anything for those developers. -For those who are using it directly: - * Register the old SessionStorage object explicitly, or - * Do not utilize object notation for accessing members of the Storage object. + +The default session storage object has changed from +`Zend\Session\Storage\SessionStorage` to an array adapter +(`Zend\Session\Storage\SessionArrayStorage`; this is a minimal break in +compatibility. Most developers are not working directly with the storage +object, but rather a `Zend\Session\Container`; as a result, switching out the +default will not cause compatibility problems for most developers. + +The change was introduced to alleviate issues when working with 3rd party +libraries that access nested members of the `$_SESSION` superglobal. + +Those affected will be those (a) directly accessing the storage instance, and +(b) using object notation to access session members: + +```php + $foo = null; + + /** @var $storage Zend\Session\Storage\SessionStorage */ + if (isset($storage->foo)) { + $foo = $storage->foo; + } +``` + +If you are using array notation, as in the following example, your code remains +forwards compatible: + +```php + $foo = null; + + /** @var $storage Zend\Session\Storage\SessionStorage */ + if (isset($storage['foo'])) { + $foo = $storage['foo']; + } +``` + +If you are not working directly with the storage instance, you will be +unaffected. + +For those affected, the following courses of action are possible: + +- Update your code to replace object property notation with array notation, OR +- Initialize and register a `Zend\Session\Storage\SessionStorage` object + explicitly with the session manager instance. + +#### Other updates in 2.1.0 Please see CHANGELOG.md.