1
0
Derivar 0

Merge pull request #377 from nibsirahsieu/issue_365

set `defaultConnection` value for both `runtime` and `generator`
Este cometimento está contido em:
Toni Uebernickel 2016-02-11 20:27:32 +01:00
ascendente 2557733f8c 301df4331c
cometimento 58b80628dd
1 ficheiros modificados com 10 adições e 0 eliminações

Ver ficheiro

@ -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);