Replies: 1 comment 2 replies
-
Hello @Tquentel, That task uses the official I remember fixing this issue by adding a cli-config.php file that bootstraps Symfony and loads the entity manager from the container. <?php
use AppKernel;
require dirname(__DIR__).'/config/bootstrap.php';
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$container = $kernel->getContainer();
return $container->get('doctrine.orm.entity_manager'); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm currently trying to add grumphp to my Symfony 5 app
But i have some problems, i have an error when the hook is triggered
The Error :
doctrine_orm
You are missing a "cli-config.php" or "config/cli-config.php" file in your
project, which is required to get the Doctrine Console working. You can use the
following sample as a template:
My grumphp.yml file :
grumphp:
tasks:
doctrine_orm:
skip_mapping: false
skip_sync: false
triggered_by: ['php', 'xml', 'yml']
When i create the right file, another error appear :
Fatal error: Uncaught Error: Call to undefined function GetEntityManager() in xxxxx/config/cli-config.php:6
I tried and search for a solution but i found nothing
Does someone had the same issue ? Or can help me to resolve it ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions