Resolvi este erro chamando diretamente, porém outro aparece
apesar de eu já ter instalado o Doctrine nesta pasta:
Fatal error: Uncaught Error: Class 'Setup' not found in C:\xampp\htdocs\Curso_Doctrine\src\Helper\EntityManagerFactory.php:15 Stack trace: #0 C:\xampp\htdocs\Curso_Doctrine\teste.php(7): EntityManagerFactory->getEntityManager() #1 {main} thrown in C:\xampp\htdocs\Curso_Doctrine\src\Helper\EntityManagerFactory.php on line 15
require_once __DIR__.'/vendor/autoload.php';
require_once 'C:/xampp/htdocs/Curso_Doctrine/src/Helper/EntityManagerFactory.php';
$entityManagerFactory=new EntityManagerFactory();
$entityManager=$entityManagerFactory->getEntityManager();
var_dump($entityManager->getConnection());