Commit 046cfcab authored by Avris's avatar Avris

v4.0

parent 06b00acf
driver: '%DB_DRIVER%'
host: '%DB_HOST%'
dbname: '%DB_NAME%'
user: '%DB_USER%'
password: '%DB_PASS%'
charset: utf8mb4
......@@ -22,7 +22,7 @@ class Doctrine implements EventSubscriberInterface
private $entityManager;
public function __construct(
Bag $configDatabase,
string $envDatabaseUrl,
bool $envAppDebug,
string $proxyDir,
array $modules,
......@@ -41,7 +41,7 @@ class Doctrine implements EventSubscriberInterface
$config = Setup::createAnnotationMetadataConfiguration($dirs, $envAppDebug, $proxyDir, $cache, false);
$config->setSQLLogger($doctrineLogger);
$this->entityManager = EntityManager::create($configDatabase->all(), $config);
$this->entityManager = EntityManager::create(['url' => $envDatabaseUrl], $config);
if ($warmupMessage = $this->warmupCache()) {
$logger->notice($warmupMessage);
......
......@@ -12,11 +12,7 @@ class DoctrineModule implements ModuleInterface, ParametersProvider
public function getParametersDefaults(): array
{
return [
'DB_DRIVER' => 'pdo_mysql',
'DB_HOST' => '127.0.0.1',
'DB_NAME' => 'micrus',
'DB_USER' => 'root',
'DB_PASS' => '',
'DATABASE_URL' => 'mysql://root@127.0.0.1:3306/micrus?charset=utf8mb4',
];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment