Symfony2的学说DBAL包装问题

问题描述:

我试图创建一个DBAL连接的自定义包装,并有正确安装的config.yml文件,Symfony2的学说DBAL包装问题

但是我收到以下错误:

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; 
    } 
} 

任何想法?

我设法在这里找到问题 - 这是文件名。我的文件名是Conection.php,但将其更改为ExtendedConnection.php。