Skip to content

Commit 7a35390

Browse files
committed
Merge branch 'hotfix/3.5.20'
2 parents 409804c + c0a8071 commit 7a35390

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

Changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 3.5.20 / 2020-10-11
4+
5+
### New:
6+
* Add new option `alterSettingsFile` which defaults to true
7+
8+
### Changed:
9+
* Allow inheritance to merge arrays if one of them is associative
10+
311
## 3.5.19 / 2020-10-09
412

513
### Fixed:

docs/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ This will print all host configuration for the host `staging`.
192192
* `adminUser`, default is `admin`, the name of the admin-user to set when running the reset-task on `dev`-instances
193193
* `adminPass`, default is empty, will be computed on request. You can get it via `phab -c<config> get:property adminPass` -- this can be overridden per host or globally.
194194
* `replaceSettingsFile`, default is true. If set to false, the settings.php file will not be replaced when running an install.
195+
* `alterSettingsFile`, default is true. If set to false, the settings.php file wont be touched by phabalicious.
195196
* `installOptions` default is `distribution: minimal, locale: en, options: ''`. You can change the distribution to install and/ or the locale.
196197
* `drupalVersion` set the drupal-version to use. If not set phabalicious is trying to guess it from the `needs`-configuration.
197198
* `drushVersion` set the used crush-version, default is `8`. Drush is not 100% backwards-compatible, for phabalicious needs to know its version.

src/Method/DrushMethod.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function getGlobalSettings(): array
5555
],
5656
'revertFeatures' => true,
5757
'replaceSettingsFile' => true,
58+
'alterSettingsFile' => true,
5859
'configurationManagement' => [
5960
'staging' => [
6061
'#!drush config-import -y staging'
@@ -336,7 +337,7 @@ public function install(HostConfig $host_config, TaskContextInterface $context)
336337
$shell->run('#!mysql' .
337338
' -h ' . $o['host'] .
338339
' -u ' . $o['user'] .
339-
' --password=' . $o['pass'] .
340+
' --password="' . $o['pass'] . '"' .
340341
' -e "' . $cmd . '"');
341342
}
342343

@@ -367,7 +368,8 @@ public function install(HostConfig $host_config, TaskContextInterface $context)
367368
if ($host_config['database']['prefix']) {
368369
$cmd_options .= ' --db-prefix=' . $host_config['database']['prefix'];
369370
}
370-
$cmd_options .= ' --db-url=mysql://' . $o['user'] . ':' . $o['pass'] . '@' . $o['host'] . '/' . $o['name'];
371+
$cmd_options .= ' --db-url="mysql://' . $o['user'] . ':' . $o['pass'] .
372+
'@' . $o['host'] . '/' . $o['name'] . '"';
371373
}
372374
$cmd_options .= ' ' . $host_config['installOptions']['options'];
373375
$this->runDrush($shell, 'site-install %s %s', $host_config['installOptions']['distribution'], $cmd_options);
@@ -662,7 +664,7 @@ private function waitForDatabase(HostConfig $host_config, TaskContextInterface $
662664

663665
private function setupConfigurationManagement(HostConfig $host_config, TaskContextInterface $context)
664666
{
665-
if ($host_config['drupalVersion'] < 8) {
667+
if ($host_config['drupalVersion'] < 8 || empty($host_config['alterSettingsFile'])) {
666668
return;
667669
}
668670

src/Utilities/Utilities.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class Utilities
1010
{
1111

12-
const FALLBACK_VERSION = '3.5.19';
12+
const FALLBACK_VERSION = '3.5.20';
1313
const COMBINED_ARGUMENTS = 'combined';
1414
const UNNAMED_ARGUMENTS = 'unnamedArguments';
1515

@@ -19,7 +19,7 @@ public static function mergeData(array $data, array $override_data): array
1919
foreach ($override_data as $key => $value) {
2020
if (isset($data[$key])) {
2121
// Do a merge
22-
if (self::isAssocArray($data[$key]) && self::isAssocArray($value)) {
22+
if (self::isAssocArray($data[$key]) || self::isAssocArray($value)) {
2323
$result[$key] = self::mergeData($data[$key], $value);
2424
} else {
2525
$result[$key] = $value;

0 commit comments

Comments
 (0)