From 42950e9e71698faae18d17d14a3cf7e5fe7962ed Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sun, 7 Dec 2014 19:20:24 -0500 Subject: [PATCH] Adding note about the PdoSessionHandler BC break --- UPGRADE-2.6.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/UPGRADE-2.6.md b/UPGRADE-2.6.md index fe0dc4839c..bc36f6c3f7 100644 --- a/UPGRADE-2.6.md +++ b/UPGRADE-2.6.md @@ -106,6 +106,20 @@ HttpFoundation -------------- * The `PdoSessionHandler` to store sessions in a database changed significantly. + This introduced a **backwards-compatability** break in the schema of the + session table. The following changes must be made to your session table: + + - Add a new integer column called `sess_lifetime`. Assuming you have the + default column and table names, in MySQL this would be: + ALTER TABLE `session` ADD `sess_lifetime` INT NOT NULL ; + - Change the data column (default: `sess_value`) to be a Blob type. In + MySQL this would be: + ALTER TABLE `session` CHANGE `sess_value` `session_value` BLOB NOT NULL; + + There is also an [issue](https://github.com/symfony/symfony/issues/12834) + that affects Windows servers. + + The changes to the `PdoSessionHandler` are: - By default, it now implements session locking to prevent loss of data by concurrent access to the same session. - It does so using a transaction between opening and closing a session. For this reason, it's not recommended to use the same database connection that you also use for your application logic.