Skip to content

Commit c13f589

Browse files
committed
Merge remote-tracking branch 'origin/8.x' into merge-master-to-sgt
* origin/8.x: update 8x branch (#4) # Conflicts: # README.md # composer.json
2 parents 570e84e + 5c633a1 commit c13f589

File tree

4 files changed

+27
-37
lines changed

4 files changed

+27
-37
lines changed

.travis.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@ install:
2929

3030
script:
3131
- if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi;
32-
- if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.8.x-dev webflo/drupal-core-require-dev:8.8.x-dev; fi;
32+
- if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.8.x-dev; composer --verbose require --no-update --dev drupal/core-dev:8.8.x-dev; fi;
3333
- if [[ $RELEASE = dev ]]; then composer --verbose update; fi;
34-
- cd $TRAVIS_BUILD_DIR/web
35-
- ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
36-
- ./../vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
34+
- ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
35+
- ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
3736
- until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
38-
# Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json
39-
# Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673
40-
# Ignore Setup group temporarily, @see https://www.drupal.org/node/2962157
41-
- ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache,Setup
42-
- ./../vendor/bin/drush
43-
- if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi;
37+
# Run a single unit test to verfiy the testing setup.
38+
- ./vendor/bin/phpunit -c ./web/core ./web/core/modules/system/tests/src/Unit/SystemRequirementsTest.php
39+
- ./vendor/bin/drush
40+
- if [[ $RELEASE = stable ]]; then ./vendor/bin/drupal; fi;

composer.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,24 +129,23 @@
129129
}
130130
],
131131
"require": {
132-
"php": ">=7.0",
132+
"php": ">=7.0.8",
133133
"composer/installers": "^1.2",
134134
"cweagans/composer-patches": "^1.6.5",
135-
"drupal-composer/drupal-scaffold": "^2.5",
136135
"drupal/console": "^1.0.2",
137-
"drupal/core": "^8.7.0",
138-
"drush/drush": "^9.0.0",
136+
"drupal/core": "^8.8.0",
137+
"drupal/core-composer-scaffold": "^8.8.0",
138+
"drush/drush": "^9.7.1 | ^10.0.0",
139139
"oomphinc/composer-installers-extender": "^1.1",
140140
"sergeant/sgt_core": "^8.0",
141141
"sergeant/sgt_ignite": "^8.0",
142142
"sergeant/sgt_installation_profile": "^8.0",
143-
"vlucas/phpdotenv": "^2.4",
143+
"vlucas/phpdotenv": "^4.0",
144144
"webflo/drupal-finder": "^1.0.0",
145-
"webmozart/path-util": "^2.3",
146145
"zaporylie/composer-drupal-optimizations": "^1.0"
147146
},
148147
"require-dev": {
149-
"webflo/drupal-core-require-dev": "^8.7.0"
148+
"drupal/core-dev": "^8.8.0"
150149
},
151150
"conflict": {
152151
"drupal/drupal": "*"
@@ -186,6 +185,11 @@
186185
"installer-types": [
187186
"library"
188187
],
188+
"drupal-scaffold": {
189+
"locations": {
190+
"web-root": "web/"
191+
}
192+
},
189193
"installer-paths": {
190194
"web/core": ["type:drupal-core"],
191195
"web/libraries/{$name}": [
@@ -195,7 +199,7 @@
195199
"web/modules/contrib/{$name}": ["type:drupal-module"],
196200
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
197201
"web/themes/contrib/{$name}": ["type:drupal-theme"],
198-
"drush/Commands/{$name}": ["type:drupal-drush"],
202+
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
199203
"web/modules/sgt/{$name}": [
200204
"sergeant/sgt_checklist",
201205
"sergeant/sgt_core",
@@ -214,12 +218,6 @@
214218
"web/profiles/sgt/{$name}": [
215219
"sergeant/sgt_installation_profile"
216220
]
217-
},
218-
"drupal-scaffold": {
219-
"initial": {
220-
".editorconfig": "../.editorconfig",
221-
".gitattributes": "../.gitattributes"
222-
}
223221
}
224222
}
225223
}

load.environment.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,5 @@
1111
/**
1212
* Load any .env file. See /.env.example.
1313
*/
14-
$dotenv = new Dotenv(__DIR__);
15-
try {
16-
$dotenv->load();
17-
}
18-
catch (InvalidPathException $e) {
19-
// Do nothing. Production environments rarely use .env files.
20-
}
14+
$dotenv = Dotenv::createImmutable(__DIR__);
15+
$dotenv->safeLoad();

scripts/composer/ScriptHandler.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Composer\Script\Event;
1111
use Composer\Semver\Comparator;
12+
use Drupal\Core\Site\Settings;
1213
use DrupalFinder\DrupalFinder;
1314
use SgtInstallationProfile\SgtInstallationProfileScriptHandler;
1415
use Symfony\Component\Filesystem\Filesystem;
@@ -38,15 +39,14 @@ public static function createRequiredFiles(Event $event) {
3839
}
3940

4041
// Prepare the settings file for installation
41-
if (!$fs->exists($drupalRoot . '/sites/default/settings.php') and $fs->exists($drupalRoot . '/sites/default/default.settings.php')) {
42+
if (!$fs->exists($drupalRoot . '/sites/default/settings.php') && $fs->exists($drupalRoot . '/sites/default/default.settings.php')) {
4243
$fs->copy($drupalRoot . '/sites/default/default.settings.php', $drupalRoot . '/sites/default/settings.php');
4344
require_once $drupalRoot . '/core/includes/bootstrap.inc';
4445
require_once $drupalRoot . '/core/includes/install.inc';
45-
$settings['config_directories'] = [
46-
CONFIG_SYNC_DIRECTORY => (object) [
47-
'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot),
48-
'required' => TRUE,
49-
],
46+
new Settings([]);
47+
$settings['settings']['config_sync_directory'] = (object) [
48+
'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot),
49+
'required' => TRUE,
5050
];
5151
drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php');
5252
$fs->chmod($drupalRoot . '/sites/default/settings.php', 0666);

0 commit comments

Comments
 (0)