Started to integrate the new configuration system (still WIP/dirty)

This commit is contained in:
Kévin Gomez 2014-09-09 21:59:13 +01:00
commit 09e4da0c19
13 changed files with 53 additions and 413 deletions

View file

@ -44,9 +44,9 @@ class DatabaseCreateCommand extends AbstractCommand
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$connectionName = $input->getOption('connection') ?: $this->getContainer()->getParameter('propel.dbal.default_connection');
$connectionName = $input->getOption('connection') ?: $this->getDefaultConnection();
$config = $this->getConnectionData($connectionName);
$dbName = $this->parseDbName($config['connection']['dsn']);
$dbName = $this->parseDbName($config['dsn']);
if (null === $dbName) {
return $output->writeln('<error>No database name found.</error>');
@ -56,7 +56,7 @@ class DatabaseCreateCommand extends AbstractCommand
try {
$manager = new ConnectionManagerSingle();
$manager->setConfiguration($this->getTemporaryConfiguration($config['connection']));
$manager->setConfiguration($this->getTemporaryConfiguration($config));
$serviceContainer = Propel::getServiceContainer();
$serviceContainer->setAdapterClass($connectionName, $config['adapter']);