Boa tarde, pessoal!
Fui realizar o teste do Entity Manager e apareceu o seguinte erro:
Uncaught Error: Class 'Alura\Doctrine\Helper\Setup' not found in C:\xampp\htdocs\doctrine-alura\src\Helper\EntityManagerFactory.php:13 Stack trace: #0 C:\xampp\htdocs\doctrine-alura\teste.php(8): Alura\Doctrine\Helper\EntityManagerFactory->getEntityManager() #1 {main} thrown in C:\xampp\htdocs\doctrine-alura\src\Helper\EntityManagerFactory.php on line 13
Alguém já se deparou com esse problema?segue também o código do EntityManagerFaxtory
namespace Alura\Doctrine\Helper;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Tools\Setup;
class EntityManagerFactory {
public function getEntityManager(): EntityManagerInterface {
$rootDir = __DIR__ . '/../..';
$config = Setup::createAnnotationMetaDataConfiguration([$rootDir . '/src'], true);
$connection = [
'driver' => 'pdo_sqlite',
'path' => $rootDir . 'var/data/banco.sqlite'
];
return EntityManager::create($connection, $config);
}
}