Skip to content

Commit a8b429e

Browse files
author
Hawkeye Tenderwolf
committed
Merge remote-tracking branch 'upstream/8.x' into hawkeye/upgrades-from-project
* upstream/8.x: Improve update instructions (drupal-composer#366) Run tests with 8.6.x Update to Drupal 8.5 Add platform version to FAQ to help user specifying PHP version, fixes drupal-composer#359. (drupal-composer#360) Update /drush dir for Drush9 (drupal-composer#350) Revert "Update /drush dir for Drush9" Update /drush dir for Drush9 Replace require-dev with webflo/drupal-core-require-dev (drupal-composer#348) Bump drush version Replace GPL-2.0+ by GPL-2.0-or-later Run tests with 8.5.x (drupal-composer#329) Update README.md (drupal-composer#334) Update composer dependencies (drupal-composer#325) Declare compatibility with versions of Drush and CSS selector that are compatible with Drupal 8.4 and earlier. Added composer validate to CI. Update .travis.yml Update .travis.yml Add support for Drush 9 and Drupal 8.4
2 parents eff87f1 + 5693600 commit a8b429e

File tree

12 files changed

+142
-65
lines changed

12 files changed

+142
-65
lines changed

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Ignore directories generated by Composer.
1+
# Ignore directories generated by Composer
22
/drush/contrib/
33
/vendor/
44
/web/core/
@@ -7,6 +7,12 @@
77
/web/profiles/contrib/
88
/web/libraries/
99

10+
# Ignore sensitive information
11+
/web/sites/*/settings.local.php
12+
13+
# Ignore Drupal's file directory
14+
/web/sites/*/files/
15+
1016
# Ignore files automatically generated by Drupal.
1117
/config/README.txt
1218
/config/splits/*/.htaccess
@@ -33,9 +39,6 @@
3339
/mariadb-init
3440
/.docker-sync
3541

36-
# Ignore local settings files.
37-
/web/sites/*/settings.local.php
38-
3942
# Ignore OS specific temporary files.
4043
.DS_Store*
4144
ehthumbs.db

.lando.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
# - "curl -sS https://platform.sh/cli/installer | php"
1212

1313
# The following entry creates a `lando platform` command that will run
14-
# any Platform CLI command from inside the container if desired.
14+
# any Platform CLI command from inside the container if desired.
1515
#tooling:
1616
# platform:
1717
# service: appserver

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
language: php
2+
dist: trusty
3+
sudo: false
4+
5+
php:
6+
- 5.6
7+
- 7.0
8+
- 7.1
9+
- 7.2
10+
11+
env:
12+
global:
13+
- SIMPLETEST_DB=sqlite://tmp/site.sqlite
14+
- SIMPLETEST_BASE_URL="http://127.0.0.1:8080"
15+
matrix:
16+
- RELEASE=stable COMPOSER_CHANNEL=stable
17+
- RELEASE=dev COMPOSER_CHANNEL=stable
18+
- RELEASE=stable COMPOSER_CHANNEL=snapshot
19+
20+
matrix:
21+
exclude:
22+
- php: 7.2
23+
env: RELEASE=stable COMPOSER_CHANNEL=stable
24+
- php: 7.2
25+
env: RELEASE=stable COMPOSER_CHANNEL=snapshot
26+
27+
before_install:
28+
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
29+
- phpenv config-rm xdebug.ini
30+
- composer --verbose self-update --$COMPOSER_CHANNEL
31+
- composer --version
32+
33+
install:
34+
- composer --verbose validate
35+
- composer --verbose install
36+
37+
script:
38+
- if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi;
39+
- if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.6.x-dev webflo/drupal-core-require-dev:8.6.x-dev; fi;
40+
- if [[ $RELEASE = dev ]]; then composer --verbose update; fi;
41+
- cd $TRAVIS_BUILD_DIR/web
42+
- ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
43+
- ./../vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
44+
- until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
45+
# Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json
46+
# Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673
47+
- ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache
48+
- ./../vendor/bin/drush
49+
- if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi;

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ new release of Drupal core.
6161

6262
Follow the steps below to update your core files.
6363

64-
1. Run `composer update drupal/core --with-dependencies` to update Drupal Core and its dependencies.
64+
1. Run `composer update drupal/core webflo/drupal-core-require-dev symfony/* --with-dependencies` to update Drupal Core and its dependencies.
6565
1. Run `git diff` to determine if any of the scaffolding files have changed.
6666
Review the files for any changes and restore any customizations to
6767
`.htaccess` or `robots.txt`.
@@ -121,11 +121,23 @@ section of composer.json:
121121
"extra": {
122122
"patches": {
123123
"drupal/foobar": {
124-
"Patch description": "URL to patch"
124+
"Patch description": "URL or local path to patch"
125125
}
126126
}
127127
}
128128
```
129129
### How do I switch from packagist.drupal-composer.org to packages.drupal.org?
130130

131131
Follow the instructions in the [documentation on drupal.org](https://www.drupal.org/docs/develop/using-composer/using-packagesdrupalorg).
132+
133+
### How do I specify a PHP version ?
134+
135+
Currently Drupal 8 supports PHP 5.5.9 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7+.
136+
137+
To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`:
138+
```json
139+
"config": {
140+
"sort-packages": true,
141+
"platform": {"php": "5.5.9"}
142+
},
143+
```

composer.json

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "kalamuna/drupal-project",
3-
"description": "Project template for Kalamuna projects with Drupal via Composer.",
3+
"description": "Project template for Kalamuna projects with Drupal 8 via Composer.",
44
"type": "project",
5-
"keywords": ["Drupal"],
5+
"keywords": ["Drupal", "Kalamuna"],
66
"homepage": "https://github.com/kalamuna/drupal-project",
77
"support": {
88
"issues": "https://github.com/kalamuna/drupal-project/issues",
99
"source": "https://github.com/kalamuna/drupal-project.git"
1010
},
11-
"license": "GPL-2.0+",
11+
"license": "GPL-2.0-or-later",
1212
"authors": [
1313
{
1414
"name": "Derek \"Hawkeye Tenderwolf\" DeRaps",
@@ -28,11 +28,11 @@
2828
}
2929
],
3030
"repositories": {
31-
"drupal": {
31+
"projects on drupal.org": {
3232
"type": "composer",
3333
"url": "https://packages.drupal.org/8"
3434
},
35-
"asset": {
35+
"npm and bower packages": {
3636
"type": "composer",
3737
"url": "https://asset-packagist.org"
3838
}
@@ -41,9 +41,9 @@
4141
"composer/installers": "^1.2",
4242
"cweagans/composer-patches": "^1.6",
4343
"drupal-composer/drupal-scaffold": "^2.2",
44-
"drupal/console": "^1.0.1",
45-
"drupal/core": "~8.4",
46-
"drush/drush": "~8.0",
44+
"drupal/console": "^1.0.2",
45+
"drupal/core": "~8.5",
46+
"drush/drush": "^9.0.0",
4747
"webflo/drupal-finder": "^1.0.0",
4848
"webmozart/path-util": "^2.3",
4949
"components/chosen": "^1.8.2",
@@ -64,13 +64,6 @@
6464
"oomphinc/composer-installers-extender": "^1.1"
6565
},
6666
"require-dev": {
67-
"behat/mink": "~1.7",
68-
"behat/mink-goutte-driver": "~1.2",
69-
"jcalderonzumba/gastonjs": "~1.0.2",
70-
"jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
71-
"mikey179/vfsstream": "~1.2",
72-
"phpunit/phpunit": ">=4.8.28 <5",
73-
"symfony/css-selector": "~2.8",
7467
"drupal/browsersync": "^1.0@beta",
7568
"drupal/coder": "^8.2",
7669
"drupal/coffee": "^1.0@beta",
@@ -83,7 +76,8 @@
8376
"drupal/search_kint": "^1.0",
8477
"drupal/twig_xdebug": "^1.0",
8578
"geerlingguy/drupal-vm": "^4.2",
86-
"kalamuna/kalaconfig": "1.x-dev"
79+
"kalamuna/kalaconfig": "1.x-dev",
80+
"webflo/drupal-core-require-dev": "~8.5"
8781
},
8882
"conflict": {
8983
"drupal/drupal": "*"

docs/TESTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The tests include a few different components...
1515

1616
### PHPUnit
1717

18-
[PHPUnit](https://phpunit.de/) runs a few functional and unit tests.
18+
[PHPUnit](https://phpunit.de/) runs a few functional and unit tests.
1919

2020
- "Browser" tests run a headless web browser to test functionality on the site.
2121
- "Kernel" tests have access to files and the database, but the environment is empty.

drush/Commands/PolicyCommands.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
namespace Drush\Commands;
4+
5+
use Consolidation\AnnotatedCommand\CommandData;
6+
use Drush\Commands\DrushCommands;
7+
8+
/**
9+
* Edit this file to reflect your organization's needs.
10+
*/
11+
class PolicyCommands extends DrushCommands {
12+
13+
/**
14+
* Prevent catastrophic braino. Note that this file has to be local to the
15+
* machine that initiates the sql:sync command.
16+
*
17+
* @hook validate sql:sync
18+
*
19+
* @throws \Exception
20+
*/
21+
public function sqlSyncValidate(CommandData $commandData) {
22+
if ($commandData->input()->getArgument('destination') == '@prod') {
23+
throw new \Exception(dt('Per !file, you may never overwrite the production database.', ['!file' => __FILE__]));
24+
}
25+
}
26+
27+
/**
28+
* Limit rsync operations to production site.
29+
*
30+
* @hook validate core:rsync
31+
*
32+
* @throws \Exception
33+
*/
34+
public function rsyncValidate(CommandData $commandData) {
35+
if (preg_match("/^@prod/", $commandData->input()->getArgument('destination'))) {
36+
throw new \Exception(dt('Per !file, you may never rsync to the production site.', ['!file' => __FILE__]));
37+
}
38+
}
39+
}

drush/drush.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# A Drush configuration file
3+
#
4+
# Docs at https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml
5+
#
6+
# Edit or remove this file as needed.

drush/policy.drush.inc

Lines changed: 0 additions & 38 deletions
This file was deleted.

drush/sites/self.site.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Edit or remove this file as needed.
2+
# Docs at https://github.com/drush-ops/drush/blob/master/examples/example.site.yml
3+
4+
#prod:
5+
# host: prod.domain.com
6+
# user: www-admin
7+
# root: /path/to/drupal
8+
# uri: http://www.example.com
9+
#
10+
#stage:
11+
# host: stage.domain.com
12+
# user: www-admin
13+
# root: /path/to/drupal
14+
# uri: http://stage.example.com

web/profiles/custom/.gitkeep

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

web/sites/default/services.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# Note that this file is unused. Please see the `services.yml` file in the
2-
# parent directory, `/web/sites/`.
1+
Note that this Drupal does not use this file. Please see the `services.yml` file in the parent directory, `/web/sites/`.

0 commit comments

Comments
 (0)