2

I am trying to create a custom wrapper for a DBAL connection and have correctly setup the config.yml file,

however I am getting the following error:

DBALException: The given 'wrapperClass' Some\Bundle\Doctrine\DBAL\ExtendedConnection 
has to be a subtype of \Doctrine\DBAL\Connection.

However my class is extending the \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;
    }
}

Any Ideas?

Scott Jones
  • 160
  • 3
  • 15

1 Answers1

1

I managed to find the problem here - it was the filename. My file name was Conection.php but changing it to ExtendedConnection.php worked.

Scott Jones
  • 160
  • 3
  • 15