Started to integrate the new configuration system (still WIP/dirty)
This commit is contained in:
parent
48b29243f3
commit
09e4da0c19
13 changed files with 53 additions and 413 deletions
|
|
@ -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']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue