我正在尝试为 DBAL 连接创建一个自定义包装器并正确设置了 config.yml 文件,
但是我收到以下错误:
DBALException: The given 'wrapperClass' Some\Bundle\Doctrine\DBAL\ExtendedConnection
has to be a subtype of \Doctrine\DBAL\Connection.
但是我的课程正在扩展\Doctrine\DBAL\Connection
:
namespace Some\Bundle\Doctrine\DBAL\ExtendedConnection;
use Doctrine\DBAL\Connection AS Connection;
class ExtendedConnection extends Connection
{
public function multipleResultSetsFetchAll()
{
$stmt = $this->getConnection();
do{
$results[] = $stmt->fetchAll();
}while($stmt->nextRowset());
return $results;
}
}
有任何想法吗?