Estou com um erro para fazer o doctrine funcionar na minha aplicação.
Segue texto do código e do Erro Código:
<?php
use Alura\doctrine\Helper\EntityManagerFactory;
require_once DIR . '/vendor/autoload.php';
$entityManagerFactory = new EntityManagerFactory(); $entityManager = $entityManagerFactory->getEntityManager();
var_dump($entityManager->getConnection());
Erro:
Fatal error: Uncaught RuntimeException: Setup tool cannot configure caches without doctrine/cache 1.11 or symfony/cache. Please add an explicit dependency to either library. in C:\xampp\htdocs\Alura\doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\Tools\Setup.php:228 Stack trace: #0 C:\xampp\htdocs\Alura\doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\Tools\Setup.php(204): Doctrine\ORM\Tools\Setup::createCacheInstance(true, NULL) #1 C:\xampp\htdocs\Alura\doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\Tools\Setup.php(188): Doctrine\ORM\Tools\Setup::createCacheConfiguration(true, 'C:\Users\user\A...', NULL) #2 C:\xampp\htdocs\Alura\doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\Tools\Setup.php(85): Doctrine\ORM\Tools\Setup::createConfiguration(true, 'C:\Users\user\A...', NULL) #3 C:\xampp\htdocs\Alura\doctrine\src\Helper\EntityManagerFactory.php(14): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration(Array, true) #4 C:\xampp\htdocs\Alura\doctrine\teste.php(8): Alura\doctrine\Helper\EntityManagerFactory->getEntityManager() #5 {main} thrown in C:\xampp\htdocs\Alura\doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\Tools\Setup.php on line 228