Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 2.3.1
-
Fix Version/s: None
-
Component/s: None
-
Security Level: All
-
Labels:None
Description
Hi,
It's impossible to set custom instance of PDO using "pdo" parameter in connection params. Its cause errors like this:
Argument 1 passed to Doctrine\DBAL\Cache\ResultCacheStatement::__construct() must be an instance of Doctrine\DBAL\Driver\Statement, instance of PDOStatement given
Change "Statement $stmt" to just "$stmt" in Doctrine\DBAL\Cache\ResultCacheStatement constructor parameter list sloved problem.
Kind regards,
Michał Dobaczewski
You need to set the statement to get it working:
$pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array()));