Skip to content

Commit 9ca3e8b

Browse files
committed
minor #13088 Add deprecation warning to LegacyPdoSessionHandler (jeremylivingston)
This PR was merged into the 2.7 branch. Discussion ---------- Add deprecation warning to LegacyPdoSessionHandler | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A LegacyPdoSessionHandler has been deprecated in favor of PdoSessionHandler. Trigger an E_USER_DEPRECATED error when the deprecated class is used. Addresses @fabpot's comment on [#13068](#13068 (comment)). Commits ------- 3b9c073 Add deprecation warning to LegacyPdoSessionHandler
2 parents aedb247 + 3b9c073 commit 9ca3e8b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public function __construct(\PDO $pdo, array $dbOptions = array())
7676
if (\PDO::ERRMODE_EXCEPTION !== $pdo->getAttribute(\PDO::ATTR_ERRMODE)) {
7777
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__));
7878
}
79+
80+
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);
81+
7982
$this->pdo = $pdo;
8083
$dbOptions = array_merge(array(
8184
'db_id_col' => 'sess_id',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy