8000 Adding note about the PdoSessionHandler BC break · symfony/symfony@42950e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 42950e9

Browse files
committed
Adding note about the PdoSessionHandler BC break
1 parent b0ba74d commit 42950e9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

UPGRADE-2.6.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,20 @@ HttpFoundation
106106
--------------
107107

108108
* The `PdoSessionHandler` to store sessions in a database changed significantly.
109+
This introduced a **backwards-compatability** break in the schema of the
110+
session table. The following changes must be made to your session table:
111+
112+
- Add a new integer column called `sess_lifetime`. Assuming you have the
113+
default column and table names, in MySQL this would be:
114+
ALTER TABLE `session` ADD `sess_lifetime` INT NOT NULL ;
115+
- Change the data column (default: `sess_value`) to be a Blob type. In
116+
MySQL this would be:
117+
ALTER TABLE `session` CHANGE `sess_value` `session_value` BLOB NOT NULL;
118+
119+
There is also an [issue](https://github.com/symfony/symfony/issues/12834)
120+
that affects Windows servers.
121+
122+
The changes to the `PdoSessionHandler` are:
109123
- By default, it now implements session locking to prevent loss of data by concurrent access to the same session.
110124
- It does so using a transaction between opening and closing a session. For this reason, it's not
111125
recommended to use the same database connection that you also use for your application logic.

0 commit comments

Comments
 (0)
0