Adding note about the PdoSessionHandler BC break
This commit is contained in:
parent
b0ba74d49f
commit
42950e9e71
@ -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.
|
||||
|
Reference in New Issue
Block a user