[DOCTRINE] Configure cli-config for doctrine console and ensure DATABASE is set to UTF-8

This commit is contained in:
Hugo Sales
2020-03-18 10:51:10 +00:00
committed by Hugo Sales
parent cc72373e3d
commit 4d7c8628f6
4 changed files with 392 additions and 0 deletions

12
config/cli-config.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
require_once 'bootstrap.php';
use App\Kernel;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$kernel->boot();
$entityManager = $kernel->getContainer()->get('doctrine.orm.default_entity_manager');
return ConsoleRunner::createHelperSet($entityManager);