merged branch drak/sessionmeta (PR #3718)

Commits
-------

8a0e6d2 [HttpFoundation] Update changelog.
4fc04fa [HttpFoundation] Renamed MetaBag to MetadataBag
2f03b31 [HttpFoundation] Added the ability to change the session cookie lifetime on migrate().
39141e8 [HttpFoundation] Add ability to force the lifetime (allows update of session cookie expiry-time)
ec3f88f [HttpFoundation] Add methods to interface
402254c [HttpFoundation] Changed meta-data responsibility to SessionStorageInterface
d9fd14f [HttpFoundation] Refactored for moved tests location.
29bd787 [HttpFoundation] Added some basic meta-data to Session

Discussion
----------

[2.1][HttpFoundation] Added some basic meta-data to Session

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
References the following tickets: #2171
Todo: -

Session data is stored as an encoded string against a single id.  If we want to store meta-data about the session, that data has to be stored as part of the session data to ensure the meta-data can persist using any session save handler.

This patch makes it much easier to determine the logic of session expiration.  In general a session expiry can be dealt with by the gc handlers, however, in some applications more specific expiry rules might be required.

Session expiry may also be more complex than a simple, session was idle for x seconds.  For example, in Zikula there are three security settings, Low, Medium and High.  The rules for session expiry are more complex as under the Medium setting, a session will expire after x minutes idle time, unless the rememberme option was ticked on login.  If so, the session will not idle.  This gives the user some control over their experience.  Under the high security setting, then there is no option, sessions will expire after the idle time is reached and login the UI has the rememberme checkbox removed.

The other advantage is that under this methodology, there can be a UI experience on expiry, like "Sorry, your session expired due to being idle for 10 minutes".

Keeping in the spirit of Symfony2 Components, I am seeking to make session handling flexible enough to accommodate these general requirements without specifically covering expiration rules. It would mean that it would be up to the implementing application to specifcally check and expire session after starting it.

Expiration might look something like this:

    $session->start();
    if (time() - $session->getMetadataBag()->getLastUpdate() > $maxIdleTime) {
        $session->invalidate();
        throw new SessionExpired();
    }

This commit also brings the ability to change the `cookie_lifetime` when migrating a session. This means one could move from a default of browser only session cookie to long-lived cookie when changing from a anonymous to a logged in user for example.

    $session->migrate($destroy, $lifetime);

---------------------------------------------------------------------------

by drak at 2012-03-30T18:18:43Z

@fabpot I have removed [WIP] status.

---------------------------------------------------------------------------

by drak at 2012-03-31T13:34:57Z

NB: This PR has been rebased and the tests relocated as per recent master changes.

---------------------------------------------------------------------------

by drak at 2012-04-03T02:16:43Z

@fabpot - ping
merged branch jfsimon/master (PR #3613)

Commits
-------

2a90871 [Console] Removed previously introduced BC break.
90a2a6e [Console] Undecorated formatter must update style stack too.
bd7e01a [Console] Fixed output formatter test broken by new implementation.
a1add4b [Console] Updated output formatter to use style stack.
4f298dd [Console] Added formatter style stack.
93ffe54 [Console] Added getters to output formatter style (and its interface).
48e6b49 [Console] Updated formatter test to match styles bug fix.
ad334b6 [Console] Fixed empty style appliance.
31d5fe5 [Console] Fixed output formatter docblock.

Discussion
----------

[Console] Fixes formatter nested style appliance.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

When outputing styled text in the console, you sometimes face to a confusing behavior: style tags cannot be nested. If tou try something like `<fg=blue>Hello <fg=red>world</fg=red>!</fg=blue>`, the trailing `!` will not be styled.

This PR introduce a new FormatterOutputStyleStack to keep open/closed styles informations up-to-date. It slightly changes OutputFormatter implementation which no longer uses `OutputFormatterStyle::apply()` method, but the new `OutputFormatterStyle::getTerminalSequence()`.

**Question:** I don't une `OutputFormatterStyleInterface` but `OutputFormatterStyle` to type `OutputFormatterStyleStack` methods arguments (to avoid BC break on the interface). Do you think it's right?

**Notice:** I also needed to fix some tests broken by new implementation.

---------------------------------------------------------------------------

by stof at 2012-03-16T10:27:56Z

Adding new methods in an interface is a BC break for people implementing it

---------------------------------------------------------------------------

by jfsimon at 2012-03-16T10:33:21Z

@stof indeed... this is a problem, should I remove them? If I do so, I should use `OutputFormatterStyle` instead of the interface to type arguments in `OutputFormatterStyleStack` right?
slovenian translations updated to latest list
merged branch maastermedia/translations (PR #3769)

Commits
-------

2519544 slovenian translations updated to latest list

Discussion
----------

Slovenian translations updated to latest list

Thank you!
Polish translations sync
Slovak translation update
[Routing] Added the possibility to define options for imported resources

Closes #2772
merged branch pulzarraider/translation_update_sk (PR #3772)

Commits
-------

b5de295 Slovak translation update

Discussion
----------

[FrameworkBundle] Slovak translation update
merged branch stloyd/patch-3 (PR #3771)

Commits
-------

1456e1e Polish translations sync

Discussion
----------

[Validators] Polish translations sync
Revert "merged branch jfsimon/master (PR #3613)"

This reverts commit 959158f9b94ecdd7e21af0f44683d0b57c8e8ec7, reversing
changes made to b9de0be3499c938926401219711353476ed100c9.
merged branch stof/routing_options_import (PR #3775)

Commits
-------

3c32569 [Routing] Added the possibility to define options for imported resources

Discussion
----------

[Routing] Added the possibility to define options for imported resources

Closes #2772
[Security] [HttpDigest] Fixes a configuration error caused by an invalid key child node configuration
merged branch ruimarinho/http_digest (PR #3778)

Commits
-------

fd1ea69 [Security] [HttpDigest] Fixes a configuration error caused by an invalid key child node configuration

Discussion
----------

[Security] [HttpDigest] Fixes a configuration error caused by an invalid "key" child node configuration

```
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
```
Revert "merged branch ruimarinho/http_digest (PR #3778)"

This reverts commit eb6a26f57269d844cf9ef90150e3e0925d5e5bf3, reversing
changes made to a10fee16c193d93080c22528e58b1fd018341229.
[Security] [HttpDigest] Fixes a configuration error caused by an invalid 'key' child node configuration
[#3446] [Form] Fix getChoicesForValues of EntityChoiceList on empty values
[FORM] Give PropertyPath ability to read hassers
[FrameworkBundle] Added the translation file for the en locale

This fixes the translation when the fallback is set to another language.
This new file can be used as reference by translators to find missing keys
in their translations as every contributor will be able to update it when
adding new keys.
merged branch stof/en_translations (PR #3782)

Commits
-------

a2f65f7 [FrameworkBundle] Added the translation file for the en locale

Discussion
----------

[FrameworkBundle] Added the translation file for the en locale

This fixes the translation when the fallback is set to another language.
This new file can be used as reference by translators to find missing keys
in their translations as every contributor will be able to update it when
adding new keys.

See the discussion on #3773
[EventDispatcher] More logical positions for classes.