From b81b953ab2fc8093a0ecc7239202f7e88e43d36e Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Sun, 21 Dec 2014 12:39:54 +0100 Subject: [PATCH 1/3] Adds deprecation notices for structures to be removed in 3.0. --- Session/Flash/FlashBag.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Session/Flash/FlashBag.php b/Session/Flash/FlashBag.php index ac412d7dc..b8a62bb07 100644 --- a/Session/Flash/FlashBag.php +++ b/Session/Flash/FlashBag.php @@ -175,6 +175,8 @@ public function clear() */ public function getIterator() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + return new \ArrayIterator($this->all()); } } From 2493ffbab3fb5653a3bf1d489576efde01ea9888 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 00:26:56 +0100 Subject: [PATCH 2/3] Normalized @deprecated annotations. --- Session/Storage/Handler/LegacyPdoSessionHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Session/Storage/Handler/LegacyPdoSessionHandler.php b/Session/Storage/Handler/LegacyPdoSessionHandler.php index df3183270..6f89f3807 100644 --- a/Session/Storage/Handler/LegacyPdoSessionHandler.php +++ b/Session/Storage/Handler/LegacyPdoSessionHandler.php @@ -24,7 +24,7 @@ * @author Michael Williams * @author Tobias Schultze * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use + * @deprecated since version 2.6, to be removed in 3.0. Use * {@link PdoSessionHandler} instead. */ class LegacyPdoSessionHandler implements \SessionHandlerInterface From 08198156a102eccd7ab0921f54acf430123fa724 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 13:40:50 +0100 Subject: [PATCH 3/3] Normalizes deprecation notice messages. --- Session/Flash/FlashBag.php | 2 +- Session/Storage/Handler/LegacyPdoSessionHandler.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Session/Flash/FlashBag.php b/Session/Flash/FlashBag.php index b8a62bb07..bbe7561be 100644 --- a/Session/Flash/FlashBag.php +++ b/Session/Flash/FlashBag.php @@ -169,7 +169,7 @@ public function clear() /** * Returns an iterator for flashes. * - * @deprecated Will be removed in 3.0. + * @deprecated since version 2.4, to be removed in 3.0. * * @return \ArrayIterator An \ArrayIterator instance */ diff --git a/Session/Storage/Handler/LegacyPdoSessionHandler.php b/Session/Storage/Handler/LegacyPdoSessionHandler.php index 6f89f3807..fd0c58275 100644 --- a/Session/Storage/Handler/LegacyPdoSessionHandler.php +++ b/Session/Storage/Handler/LegacyPdoSessionHandler.php @@ -11,6 +11,8 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; +trigger_error('The '.__NAMESPACE__.'\LegacyPdoSessionHandler class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler class instead.', E_USER_DEPRECATED); + /** * Session handler using a PDO connection to read and write data. * @@ -77,8 +79,6 @@ public function __construct(\PDO $pdo, array $dbOptions = array()) throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__)); } - trigger_error('"Symfony\Component\HttpFoundation\Session\Storage\Handler\LegacyPdoSessionHandler" is deprecated since version 2.6 and will be removed in 3.0. Use "Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler" instead.', E_USER_DEPRECATED); - $this->pdo = $pdo; $dbOptions = array_merge(array( 'db_id_col' => 'sess_id',