8000 Add deprecation warning to LegacyPdoSessionHandler by jeremylivingston · Pull Request #13088 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Add deprecation warning to LegacyPdoSessionHandler #13088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add deprecation warning to LegacyPdoSessionHandler
LegacyPdoSessionHandler has been deprecated in favor of
PdoSessionHandler. Trigger an E_USER_DEPRECATED error when the
deprecated class is used.
  • Loading branch information
jeremylivingston committed Dec 23, 2014
commit 3b9c0737113879e662b865d9b2e44cd19bf463e6
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public function __construct(\PDO $pdo, array $dbOptions = array())
if (\PDO::ERRMODE_EXCEPTION !== $pdo->getAttribute(\PDO::ATTR_ERRMODE)) {
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',
Expand Down
0