Permalink
Browse files

feature #24389 [DoctrineBridge] Deprecate dbal session handler (Tobion)

This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Deprecate dbal session handler

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #20501
| License       | MIT
| Doc PR        |

The DbalSessionHandler misses all the improvements from the PdoSessionHandler (lock modes, delayed GC, configurable naming). The only advantage it had was the ability to work with non-pdo drivers. But since DBAL requires PDO now as well (doctrine/dbal@36df682) even that is not really relevant anymore.

Stofs argument in #20501 (comment) sound like a new feature that can be implemented separately. Ref. #24267

Commits
-------

ffc74eb [DoctrineBridge] Deprecate DbalSessionHandler
  • Loading branch information...
fabpot committed Oct 5, 2017
2 parents 02b77f5 + ffc74eb commit 575ba15c844627ee5b5eec2e980edfd9c22f46b4
@@ -11,6 +11,8 @@
namespace Symfony\Bridge\Doctrine\HttpFoundation;
@trigger_error(sprintf('The class %s is deprecated since version 3.4 and will be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler instead.', DbalSessionHandler::class), E_USER_DEPRECATED);
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver\DriverException;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
@@ -25,6 +27,8 @@
* @author Fabien Potencier <fabien@symfony.com>
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
* @author Tobias Schultze <http://tobion.de>
*
* @deprecated since version 3.4, to be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler instead.
*/
class DbalSessionHandler implements \SessionHandlerInterface
{
@@ -11,12 +11,16 @@
namespace Symfony\Bridge\Doctrine\HttpFoundation;
@trigger_error(sprintf('The class %s is deprecated since version 3.4 and will be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::createTable instead.', DbalSessionHandlerSchema::class), E_USER_DEPRECATED);
use Doctrine\DBAL\Schema\Schema;
/**
* DBAL Session Storage Schema.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @deprecated since version 3.4, to be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::createTable instead.
*/
final class DbalSessionHandlerSchema extends Schema
{
@@ -18,6 +18,8 @@
* Test class for DbalSessionHandler.
*
* @author Drak <drak@zikula.org>
*
* @group legacy
*/
class DbalSessionHandlerTest extends TestCase
{

0 comments on commit 575ba15

Please sign in to comment.