Merge pull request #377 from nibsirahsieu/issue_365
set `defaultConnection` value for both `runtime` and `generator`
Dieser Commit ist enthalten in:
Commit
58b80628dd
|
@ -36,6 +36,16 @@ class PropelExtension extends Extension
|
|||
$configuration = $this->getConfiguration($configs, $container);
|
||||
$config = $processor->processConfiguration($configuration, $configs);
|
||||
|
||||
if (1 === count($config['database']['connections'])) {
|
||||
$defaultConnection = array_keys($config['database']['connections'])[0];
|
||||
if (!isset($config['runtime']['defaultConnection'])) {
|
||||
$config['runtime']['defaultConnection'] = $defaultConnection;
|
||||
}
|
||||
if (!isset($config['generator']['defaultConnection'])) {
|
||||
$config['generator']['defaultConnection'] = $defaultConnection;
|
||||
}
|
||||
}
|
||||
|
||||
$container->setParameter('propel.logging', $config['runtime']['logging']);
|
||||
$container->setParameter('propel.configuration', $config);
|
||||
|
||||
|
|
Laden…
In neuem Issue referenzieren