Skip to content
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

persistent connections working again #1295

Merged
merged 3 commits into from
Nov 16, 2016
Merged
Show file tree
Hide file tree
Changes from 2 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
101 changes: 0 additions & 101 deletions src/Propel/Runtime/Adapter/Pdo/PdoStatement.php

This file was deleted.

1 change: 1 addition & 0 deletions src/Propel/Runtime/Adapter/Pdo/PgsqlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Propel\Runtime\Adapter\Pdo;

use PDOStatement;
use Propel\Runtime\Adapter\AdapterInterface;
use Propel\Runtime\Adapter\SqlAdapterInterface;
use Propel\Runtime\Connection\ConnectionInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Propel/Runtime/Adapter/Pdo/SqlsrvAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Propel\Runtime\Adapter\Pdo;

use PDOStatement;
use Propel\Runtime\Adapter\SqlAdapterInterface;
use Propel\Runtime\Adapter\Exception\UnsupportedEncodingException;
use Propel\Runtime\Connection\ConnectionInterface;
Expand Down
1 change: 0 additions & 1 deletion src/Propel/Runtime/Connection/PdoConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public function __construct($dsn, $user = null, $password = null, array $options

parent::__construct($dsn, $user, $password, $pdoOptions);

$this->setAttribute(\PDO::ATTR_STATEMENT_CLASS, ['\Propel\Runtime\Adapter\Pdo\PdoStatement', []]);
$this->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Propel/Tests/Runtime/Connection/PropelPDOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public function testUseDebug()
$con = Propel::getServiceContainer()->getConnection(BookTableMap::DATABASE_NAME);
$con->useDebug(false);
$stmtClass = $con->getAttribute(PDO::ATTR_STATEMENT_CLASS);
$expectedClass = (defined('HHVM_VERSION') ? '\\' : '') . 'Propel\Runtime\Adapter\Pdo\PdoStatement';
$expectedClass = defined('HHVM_VERSION') ? '\PdoStatement' : 'PDOStatement';

$this->assertEquals($expectedClass, $stmtClass[0], 'Statement is Propel Statement when debug is false');
$con->useDebug(true);
Expand Down