Skip to content

Commit f415d99

Browse files
authored
Merge pull request #6 from druidfi/bump-up-versions
Bump up versions
2 parents 6f0afb8 + ae33066 commit f415d99

File tree

4 files changed

+17
-26
lines changed

4 files changed

+17
-26
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
test:
1+
test: vendor
22
@echo "Run composer test (all tests)"
3-
@docker run --rm -it --volume $$PWD:/app druidfi/drupal:7.4 composer test
3+
@docker run --rm -it --volume $$PWD:/app druidfi/drupal:php-7.4 composer test
44

5-
test-%:
5+
test-%: vendor
66
@echo "Run composer test-$*"
7-
@docker run --rm -it --volume $$PWD:/app druidfi/drupal:7.4 composer test-$*
7+
@docker run --rm -it --volume $$PWD:/app druidfi/drupal:php-7.4 composer test-$*
8+
9+
vendor:
10+
composer install

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ See the whole example [here](settings.php).
4848

4949
## What is detected?
5050

51+
- Loading of setting files and service configurations
5152
- Database connection
5253
- Trusted host pattern(s)
5354
- File paths (public, private, tmp)

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
}
2121
},
2222
"require": {
23-
"php": "^7.1 || ^8.0"
23+
"php": "^7.3 || ^8.0",
24+
"drupal/core-recommended": "^8.9 || ^9.0"
2425
},
2526
"require-dev": {
2627
"friendsofphp/php-cs-fixer": "^2.17.0",

src/DrupalEnvDetector.php

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ public function __construct($settings_dir) {
120120
*/
121121
public function getConfiguration() : array {
122122
$conf = [
123-
'config' => (array) $this->config,
124-
'databases' => (array) $this->databases,
125-
'settings' => (array) $this->settings,
123+
'config' => $this->config,
124+
'databases' => $this->databases,
125+
'settings' => $this->settings,
126126
];
127127

128128
if (!empty($this->config_directories)) {
129-
$conf['config_directories'] = (array) $this->config_directories;
129+
$conf['config_directories'] = $this->config_directories;
130130
}
131131

132132
if (getenv('OMEN_TOKEN') && isset($_GET['_show_omens'])) {
@@ -142,8 +142,7 @@ public function getConfiguration() : array {
142142
* Print out configuration.
143143
*/
144144
public function showConfiguration() {
145-
$conf = $this->getConfiguration();
146-
$this->printConfiguration($conf);
145+
$this->printConfiguration($this->getConfiguration());
147146
}
148147

149148
protected function printConfiguration($conf) {
@@ -184,14 +183,7 @@ private function setEnvDefaults() {
184183
* Set global values. Same for all environments.
185184
*/
186185
private function setGlobalDefaults() {
187-
$older_than_88 = version_compare($this->drupal_version, '8.8.0', '<');
188-
189186
// Set directory for loading CMI configuration.
190-
if ($older_than_88) {
191-
$this->config_directories['sync'] = '../' . self::CMI_PATH;
192-
}
193-
194-
// In Drupal 8.8 this is in $settings array.
195187
$this->settings['config_sync_directory'] = '../' . self::CMI_PATH;
196188

197189
// Hash salt.
@@ -206,14 +198,8 @@ private function setGlobalDefaults() {
206198
// Temp path.
207199
$this->settings['file_temp_path'] = getenv('DRUPAL_TMP_PATH') ?: $this->settings['file_temp_path'] ?? '/tmp';
208200

209-
if ($older_than_88) {
210-
$this->config['system.file']['path']['temporary'] = $this->settings['file_temp_path'];
211-
}
212-
213-
// Exclude these modules from configuration export if Drupal 8.8+.
214-
if (!$older_than_88) {
215-
$this->settings['config_exclude_modules'] = ['devel', 'stage_file_proxy'];
216-
}
201+
// Exclude these modules from configuration export.
202+
$this->settings['config_exclude_modules'] = ['devel', 'stage_file_proxy', 'upgrade_status'];
217203
}
218204

219205
/**

0 commit comments

Comments
 (0)