A variável repositorioDeCurso retornava null,por que estava escrita errada!
Só que agora apareceu esse erro no construtor de ListarCursos,se retiro os paramêtros dá esse novo erro:
PHP 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 /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php:184
Stack trace:
#0 /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(160): Doctrine\ORM\Tools\Setup::createCacheInstance()
#1 /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(139): Doctrine\ORM\Tools\Setup::createCacheConfiguration()
#2 /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(87): Doctrine\ORM\Tools\Setup::createConfiguration()
#3 /media/deise/Ventoy/gerenciador-de-cursos/src/Infra/EntityManagerCreator.php(22): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration()
#4 /media/deise/Ventoy/gerenciador-de-cursos/src/Controller/ListarCursos.php(24): Alura\Cursos\Infra\EntityManagerCreator->getEntityManager()
#5 /media/deise/Ventoy/gerenciador-de-cursos/public/index.php(18): Alura\Cursos\Controller\ListarCursos->__construct()
#6 {main}
thrown in /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php on line 184
[Thu Jul 8 10:08:58 2021] 127.0.0.1:48610 [500]: GET /listar-cursos - Uncaught RuntimeException: Setup tool cannot configure caches without doctrine/cache 1.11 or symfony/cache. Please add an explicit dependency to either library. in /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php:184
Stack trace:
#0 /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(160): Doctrine\ORM\Tools\Setup::createCacheInstance()
#1 /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(139): Doctrine\ORM\Tools\Setup::createCacheConfiguration()
#2 /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(87): Doctrine\ORM\Tools\Setup::createConfiguration()
#3 /media/deise/Ventoy/gerenciador-de-cursos/src/Infra/EntityManagerCreator.php(22): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration()
#4 /media/deise/Ventoy/gerenciador-de-cursos/src/Controller/ListarCursos.php(24): Alura\Cursos\Infra\EntityManagerCreator->getEntityManager()
#5 /media/deise/Ventoy/gerenciador-de-cursos/public/index.php(18): Alura\Cursos\Controller\ListarCursos->__construct()
#6 {main}
thrown in /media/deise/Ventoy/gerenciador-de-cursos/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php on line 184