merged branch jmikola/2.2-mongodb-session (PR #5927)

This PR was merged into the master branch.

Commits
-------

ded3a83 [HttpFoundation] Document MongoDbSessionHandler changes

Discussion
----------

[HttpFoundation] Document MongoDbSessionHandler changes

```
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
```

Documentation changes for #5916

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

by Baachi at 2012-11-06T20:41:11Z

👍
This commit is contained in:
Fabien Potencier 2012-11-07 07:46:50 +01:00
commit 6035effe0e
2 changed files with 16 additions and 0 deletions

View File

@ -1,6 +1,15 @@
UPGRADE FROM 2.1 to 2.2
=======================
### HttpFoundation
* The MongoDbSessionHandler default field names and timestamp type have changed.
The `sess_` prefix was removed from default field names. The session ID is
now stored in the `_id` field by default. The session date is now stored as a
`MongoDate` instead of `MongoTimestamp`, which also makes it possible to use
TTL collections in MongoDB 2.2+ instead of relying on the `gc()` method.
#### Deprecations
* The `Request::splitHttpAcceptHeader()` is deprecated and will be removed in 2.3.

View File

@ -36,6 +36,13 @@ class MongoDbSessionHandler implements \SessionHandlerInterface
/**
* Constructor.
*
* List of available options:
* * database: The name of the database [required]
* * collection: The name of the collection [required]
* * id_field: The field name for storing the session id [default: _id]
* * data_field: The field name for storing the session data [default: data]
* * time_field: The field name for storing the timestamp [default: time]
*
* @param \Mongo $mongo A "Mongo" instance
* @param array $options An associative array of field options
*