1
resposta

erro com doctrine

Olá , estou enfrentando um problema com doctrine ele apresenta um erro e não consigo encontrar o que é .

PHP Fatal error:  Uncaught PDOException: could not find driver in C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:38Stack trace:
#0 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php(38): PDO->__construct()
#1 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOSqlite\Driver.php(42): Doctrine\DBAL\Driver\PDOConnection->__construct()        
#2 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(362): Doctrine\DBAL\Driver\PDOSqlite\Driver->connect()
#3 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(1853): Doctrine\DBAL\Connection->connect()
#4 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(1636): Doctrine\DBAL\Connection->getWrappedConnection()
#5 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php(381): Doctrine\DBAL\Connection->beginTransaction()
#6 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\orm\lib\Doctrine\ORM\EntityManager.php(371): Doctrine\ORM\UnitOfWork->commit()
#7 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\commands\criar-aluno.php(17): Doctrine\ORM\EntityManager->flush()
#8 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: could not find driver in C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18Stack trace:
#0 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php(42): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOSqlite\Driver.php(42): Doctrine\DBAL\Driver\PDOConnection->__construct()        
#2 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(362): Doctrine\DBAL\Driver\PDOSqlite\Driver->connect()
#3 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(1853): Doctrine\DBAL\Connection->connect()
#4 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(1636): Doctrine\DBAL\Connection->getWrappedConnection()
#5 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php(381): Doctrine\DBAL\Connection->beginTransaction()
#6 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\orm\lib\Doctrine\ORM\EntityManager.php(371): Doctrine\ORM\UnitOfWork->commit()
#7 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\commands\criar-aluno.php(17): Doctrine\ORM\EntityManager->flush()
#8 {main}

Next Doctrine\DBAL\Exception\DriverException: An exception occurred in driver: could not find driver in C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractSQLiteDriver.php:86
Stack trace:
#4 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(1853): Doctrine\DBAL\Connection->connecQLiteDriver->convertException()     t()                                                                                                                                               rapException()
#5 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php(1636): Doctrine\DBAL\Connection->getWraeption::driverException()ppedConnection()                                                                                                                                  iver->connect()
#6 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php(381): Doctrine\DBAL\Connection->beginTrant()saction()                                                                                                                                         ppedConnection()
#7 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\orm\lib\Doctrine\ORM\EntityManager.php(371): Doctrine\ORM\UnitOfWork->commit(saction())                                                                                                                                                 )
#8 C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\commands\criar-aluno.php(17): Doctrine\ORM\EntityManager->flush()
#9 {main}
  thrown in C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractSQLiteDriver.php on line 86   
PS C:\Users\clayt\OneDrive\Documentos\Doctrine\Alura\commands>
1 resposta

Você não habilitou o driver do banco de dados, Clayton.