-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Got the following problem with fresh deb-package and latest Doctrine DBAL.
It has following class, extending PDO extension.
class PDOConnection extends PDO implements Connection
{
/**
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param array|null $options
*/
public function __construct($dsn, $user = null, $password = null, array $options = null)
{
parent::__construct($dsn, $user, $password, $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array()));
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
}
Connection interface has following method:
/**
* Prepares a statement for execution and returns a Statement object.
*
* @param string $prepareString
*
* @return \Doctrine\DBAL\Driver\Statement
*/
function prepare($prepareString);
This method exists in PDO extension, but doesn't exists in PDOConnection class.
So, hhvm throws fatal error (while php works fine):
HipHop Fatal error: Declaration of Doctrine\DBAL\Driver\PDOConnection::prepare() must be compatible with that of Doctrine\DBAL\Driver\Connection::prepare() in /home/dasmfm/doctrine-demo/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 30