Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.12.x' into 2.1.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	.doctrine-project.json
  • Loading branch information
ostrolucky committed Oct 18, 2020
2 parents 64cc8f1 + 934bdcf commit 4c767f2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .doctrine-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,28 @@
"slug": "doctrine-bundle",
"versions": [
{
"name": "2.1",
"name": "2.2",
"branchName": "master",
"slug": "latest",
"upcoming": true
},
{
"name": "2.0",
"branchName": "2.0.x",
"slug": "2.0",
"name": "2.1",
"branchName": "2.1.x",
"slug": "2.1",
"aliases": [
"current",
"stable"
],
"current": true,
"maintained": true
},
{
"name": "2.0",
"branchName": "2.0.x",
"slug": "2.0",
"maintained": false
},
{
"name": "1.12",
"branchName": "1.12.x",
Expand Down Expand Up @@ -93,4 +99,4 @@
"maintained": false
}
]
}
}
5 changes: 5 additions & 0 deletions Command/CreateDatabaseDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
$params = $params['master'];
}

// Since doctrine/dbal 2.11 master has been replaced by primary
if (isset($params['primary'])) {
$params = $params['primary'];
}

// Cannot inject `shard` option in parent::getDoctrineConnection
// cause it will try to connect to a non-existing database
if (isset($params['shards'])) {
Expand Down
5 changes: 5 additions & 0 deletions Command/DropDatabaseDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
$params = $params['master'];
}

// Since doctrine/dbal 2.11 master has been replaced by primary
if (isset($params['primary'])) {
$params = $params['primary'];
}

if (isset($params['shards'])) {
$shards = $params['shards'];
// Default select global
Expand Down
4 changes: 4 additions & 0 deletions Command/Proxy/RunSqlDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
DoctrineCommandHelper::setApplicationConnection($this->getApplication(), $input->getOption('connection'));

// compatibility with doctrine/dbal 2.11+
// where this option is also present and unsupported before we are not switching to use a ConnectionProvider
$input->setOption('connection', null);

return parent::execute($input, $output);
}
}

0 comments on commit 4c767f2

Please sign in to comment.