Skip to content

Commit

Permalink
updated CHANGELOG for 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 11, 2012
1 parent 0f6c50a commit 282d3ae
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
16 changes: 6 additions & 10 deletions CHANGELOG-2.1.md
Expand Up @@ -40,10 +40,6 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
* 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 Filesystem component as a dependency
* added new session storage drivers to session.xml: `session.storage.native_memcache`, `session.storage.native_memcached`,
`session.storage.native_sqlite`, `session.storage.null`, `session.storage.memcache`,
and `session.storage.memcached`. Added `session.storage.mock_file` service for functional session testing.
* removed `session.storage.filesystem` service.

### MonologBundle

Expand Down Expand Up @@ -230,20 +226,20 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
* made mimetype to extension conversion configurable
* [BC BREAK] Moved all session related classes and interfaces into own namespace, as
`Symfony\Component\HttpFoudation\Session` and renamed classes accordingly.
* Added `FlashBag` (default). Flashes expire when retrieved by `get()` or `all()`.
* Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`.
This makes the implementation ESI compatible.
* Added `AutoExpireFlashBag` to replicate Symfony 2.0.x auto expire behaviour of messages auto expiring
* Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire behaviour of messages auto expiring
after one page page load. Messages must be retrived by `get()` or `all()`.
* [BC BREAK] Removed the following methods from the Session class: `close()`, `setFlash()`, `setFlashes()`
`getFlash()`, `hasFlash()`, andd `removeFlash()`. `getFlashes() returns a `FlashBagInterface`.
* Deprecated the following methods from the Session class: `close()`, `setFlash()`, `setFlashes()`
`getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashes() instead which returns a `FlashBagInterface`.
* `Session->clear()` now only clears session attributes as before it cleared flash messages and
attributes. `Session->getFlashes()->all()` clears flashes now.
* Added `Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` base class for
session storage drivers.
* Added `Symfony\Component\HttpFoundation\Session\Storage\SaveHandlerInterface` interface
* Added `Symfony\Component\HttpFoundation\Session\Storage\SessionSaveHandlerInterface` interface
which storage drivers should implement after inheriting from
`Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` when writing custom session save handlers.
* [BC BREAK] `StorageInterface` methods removed: `write()`, `read()` and `remove()`. Added
* [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and `remove()`. Added
`getBag()`, `registerBag()`.
* Moved attribute storage to `Symfony\Component\HttpFoundation\Attribute\AttributeBagInterface`.
* Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate attributes storage
Expand Down
43 changes: 21 additions & 22 deletions UPGRADE-2.1.md
Expand Up @@ -80,8 +80,8 @@ UPGRADE FROM 2.0 to 2.1
explicitely need to set the `Valid` constraint in your model if you want to
validate associated objects.

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

Expand Down Expand Up @@ -236,12 +236,27 @@ UPGRADE FROM 2.0 to 2.1
return false;
}
}
the parent form.

Before: $session->getLocale()
After: $request->getLocale()
* The options passed to `getParent` of the form types don't contain default
options anymore

You should check with `isset` if options exist before checking their value.

Before:

public function getParent(array $options)
{
return 'single_text' === $options['widget'] ? 'text' : 'choice';
}

After:

public function getParent(array $options)
{
return isset($options['widget']) && 'single_text' === $options['widget'] ? 'text' : 'choice';
}

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

Before (PHP):

Expand Down Expand Up @@ -291,13 +306,6 @@ UPGRADE FROM 2.0 to 2.1
</div>
{% endforeach %}

* Session object

The methods, `setFlash()`, `setFlashes()`, `getFlash()`, `hasFlash()`, and `removeFlash()`
have been removed from the `Session` object. `getFlashes()` now returns a `FlashBagInterface`.
Flashes should be popped off the stack using `getFlashes()->get()` or `getFlashes()->all()`
to get all flashes in one go.

* Session storage drivers

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

Any session storage driver that wants to use custom save handlers should
implement `Symfony\Component\HttpFoundation\Session\Storage\SaveHandlerInterface`

### [FrameworkBundle]

The service `session.storage.native` is now called `session.storage.native_file`

The service `session.storage.filesystem` is now called `session.storage.mock_file`
and is used for functional unit testing. You will need to update any references
in functional tests.

4 changes: 4 additions & 0 deletions src/Symfony/Component/HttpFoundation/Session/Session.php
Expand Up @@ -303,4 +303,8 @@ public function clearFlashes()
{
return $this->getBag('flashes')->clear();
}

public function close()

This comment has been minimized.

Copy link
@stof

stof Feb 11, 2012

Member

throwing an exception would also be a BC break

This comment has been minimized.

Copy link
@fabpot

fabpot Feb 11, 2012

Author Member

ok, I've removed the method.

{
}
}

0 comments on commit 282d3ae

Please sign in to comment.