From 989326b98819edfc119391f6c3f4e61b2455135e Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Thu, 5 Oct 2017 17:58:33 +0200 Subject: [PATCH] [Session] deprecate MemcacheSessionHandler memcache extension didn't get a release since 4.5 years and is not compatible with PHP 7 --- UPGRADE-3.4.md | 3 +++ UPGRADE-4.0.md | 3 +++ src/Symfony/Component/HttpFoundation/CHANGELOG.md | 1 + .../Session/Storage/Handler/MemcacheSessionHandler.php | 4 ++++ .../Session/Storage/Handler/MemcacheSessionHandlerTest.php | 1 + 5 files changed, 12 insertions(+) diff --git a/UPGRADE-3.4.md b/UPGRADE-3.4.md index a06a8cd515..763e45285e 100644 --- a/UPGRADE-3.4.md +++ b/UPGRADE-3.4.md @@ -243,6 +243,9 @@ HttpFoundation * Using `Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler` with the legacy mongo extension has been deprecated and will be removed in 4.0. Use it with the mongodb/mongodb package and ext-mongodb instead. + * The `Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler` class has been deprecated and + will be removed in 4.0. Use `Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler` instead. + HttpKernel ---------- diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 46fa72302e..11e7cdfe92 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -545,6 +545,9 @@ HttpFoundation * The `Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler` does not work with the legacy mongo extension anymore. It requires mongodb/mongodb package and ext-mongodb. + * The `Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler` class has been removed. + Use `Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler` instead. + HttpKernel ---------- diff --git a/src/Symfony/Component/HttpFoundation/CHANGELOG.md b/src/Symfony/Component/HttpFoundation/CHANGELOG.md index 608bac2d6d..83a3c8e32e 100644 --- a/src/Symfony/Component/HttpFoundation/CHANGELOG.md +++ b/src/Symfony/Component/HttpFoundation/CHANGELOG.md @@ -8,6 +8,7 @@ CHANGELOG * deprecated the `AbstractProxy`, `NativeProxy` and `SessionHandlerProxy` classes, * deprecated setting session save handlers that do not implement `\SessionHandlerInterface` in `NativeSessionStorage::setSaveHandler()` * deprecated using `MongoDbSessionHandler` with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb instead + * deprecated `MemcacheSessionHandler`; use `MemcachedSessionHandler` instead 3.3.0 ----- diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php index d31aa7667e..2978ef4a2c 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php @@ -11,8 +11,12 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; +@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\MemcachedSessionHandler instead.', MemcacheSessionHandler::class), E_USER_DEPRECATED); + /** * @author Drak + * + * @deprecated since version 3.4, to be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler instead. */ class MemcacheSessionHandler implements \SessionHandlerInterface { diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php index 06193c8bef..05470ed80a 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php @@ -17,6 +17,7 @@ use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHand /** * @requires extension memcache * @group time-sensitive + * @group legacy */ class MemcacheSessionHandlerTest extends TestCase {