Olá a todos,
estou com alguns erros aqui do curso introdutorio de php:
Estou usando o comando " php bin/doctrine.php" e ele está mostrando esse erro:
PHP Fatal error: Uncaught TypeError: Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider::__construct(): Argument #1 ($entityManager) must be of type Doctrine\ORM\EntityManagerInterface, null given, called in C:\xampp\htdocs\2612-doctrine\bin\doctrine.php on line 15 and defined in C:\xampp\htdocs\2612-doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider.php:18
Meu doctrine.php está assim:
<?php
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider;
//use Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider;
// replace with path to your own project bootstrap file
requireonce DIR . '/../vendor/autoload.php';
// replace with mechanism to retrieve EntityManager in your app
$entityManager = \Alura\Doctrine\Helper\EntityManagerCreator::createEntityManager();
ConsoleRunner::run(
new SingleManagerProvider($entityManager)
//new SingleManagerProvider($entityManager)
);
preciso de ajuda. Poderiam me ajudar?
Aqui está o repositório
git@github.com:tiagobrandao03/2612-doctrine.git