Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[HttpFoundation] Document MongoDbSessionHandler changes

  • Loading branch information...
commit ded3a8301a28099687c6456e1f11fc3b5f0414ef 1 parent 4f1547a
@jmikola jmikola authored
View
9 UPGRADE-2.2.md
@@ -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
7 src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
@@ -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
*
Please sign in to comment.
Something went wrong with that request. Please try again.