From 171449ea92ea365d421af0960f10b01ba99b5626 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 22 Jun 2017 17:10:51 +0200 Subject: [PATCH 01/62] Fix 8.4.x --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5477b6e6b2..4aa56746d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,8 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; + # Remove symfony/routing once https://www.drupal.org/node/2882456 is fixed + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update symfony/routing:~3.2.9 drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From 51242c30089a3c3d2e730d70c044a43a81d1efb9 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 22 Jun 2017 17:47:48 +0200 Subject: [PATCH 02/62] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4aa56746d6..b5d1e6126b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; # Remove symfony/routing once https://www.drupal.org/node/2882456 is fixed - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update symfony/routing:~3.2.9 drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update symfony/event-dispatcher::~3.2.9 symfony/routing:~3.2.9 drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From ab93678c702f0d56a364d452a6281480d124ed9f Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 22 Jun 2017 17:47:58 +0200 Subject: [PATCH 03/62] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b5d1e6126b..ff053f466a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; # Remove symfony/routing once https://www.drupal.org/node/2882456 is fixed - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update symfony/event-dispatcher::~3.2.9 symfony/routing:~3.2.9 drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update symfony/event-dispatcher:~3.2.9 symfony/routing:~3.2.9 drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From 6b59ee5c212f3a5f77dc3b4753cabf6297a69e6e Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 22 Jun 2017 23:59:24 +0200 Subject: [PATCH 04/62] Update .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ff053f466a..69d30122fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,8 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; # Remove symfony/routing once https://www.drupal.org/node/2882456 is fixed + # @see https://www.drupal.org/node/2887000 + # @see https://www.drupal.org/node/2874909 - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update symfony/event-dispatcher:~3.2.9 symfony/routing:~3.2.9 drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web From 217da1c26ab558d8c3ea0efcf98a342c8c95d1b1 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sun, 2 Jul 2017 17:14:32 +0200 Subject: [PATCH 05/62] Issue #287: Fix dead link to Drush make --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb1a71823c..8810aab1f8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This project template should provide a kickstart for managing your site dependencies with [Composer](https://getcomposer.org/). If you want to know how to use it as replacement for -[Drush Make](https://github.com/drush-ops/drush/blob/master/docs/make.md) visit +[Drush Make](https://github.com/drush-ops/drush/blob/8.x/docs/make.md) visit the [Documentation on drupal.org](https://www.drupal.org/node/2471553). ## Usage From f7e99e0d5bdbba8b80e82a31c44e85ae20ede105 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 8 Aug 2017 17:50:52 +0200 Subject: [PATCH 06/62] Update composer.json (#293) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 28023b44a4..bd624a026e 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "drupal/console": "~1.0", "drupal/core": "~8.0", "drush/drush": "~8.0", - "webflo/drupal-finder": "^0.3.0", + "webflo/drupal-finder": "^0|^1.0.0", "webmozart/path-util": "^2.3" }, "require-dev": { From 7c4120c7fb907efe06674a3cea4cc12d7fb588d3 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 12 Aug 2017 14:01:03 +0200 Subject: [PATCH 07/62] Update .travis.yml (#296) --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69d30122fe..5477b6e6b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,10 +27,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - # Remove symfony/routing once https://www.drupal.org/node/2882456 is fixed - # @see https://www.drupal.org/node/2887000 - # @see https://www.drupal.org/node/2874909 - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update symfony/event-dispatcher:~3.2.9 symfony/routing:~3.2.9 drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From 6b9e0fddb2ae701dcd037deb0c263f43f598d03a Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 22 Aug 2017 14:42:11 +0200 Subject: [PATCH 08/62] Update drupal/console (#301) --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index bd624a026e..1de2900de6 100644 --- a/composer.json +++ b/composer.json @@ -19,10 +19,10 @@ "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6", "drupal-composer/drupal-scaffold": "^2.2", - "drupal/console": "~1.0", + "drupal/console": "^1.0.1", "drupal/core": "~8.0", "drush/drush": "~8.0", - "webflo/drupal-finder": "^0|^1.0.0", + "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, "require-dev": { From 16a2a2dc72c9cc98260eb19aadd57df3f9c63e15 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Mon, 28 Aug 2017 13:46:31 +0200 Subject: [PATCH 09/62] Fix whitespace --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1de2900de6..407d3424fe 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "minimum-stability": "dev", "prefer-stable": true, "config": { - "sort-packages": true + "sort-packages": true }, "autoload": { "classmap": [ From 678d4156e5726c77622e9fe76e4d840d151454b3 Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Mon, 4 Sep 2017 12:43:42 +0300 Subject: [PATCH 10/62] Add support for Drush 9 and Drupal 8.4 Drupal 8.4.x works great with Drush 9 dependency wise. For people with a lot of dependencies it might be easier to resolve to a working set of dependencies if we also allow Drush 9 as an option. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 407d3424fe..d08c03e77e 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "drupal-composer/drupal-scaffold": "^2.2", "drupal/console": "^1.0.1", "drupal/core": "~8.0", - "drush/drush": "~8.0", + "drush/drush": "~8.0|^9.0.0-beta4", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, From 4487b2e3269eb10d306d153ffca7dd40bb5a8257 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Mon, 4 Sep 2017 14:41:32 +0200 Subject: [PATCH 11/62] Update .travis.yml --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5477b6e6b2..ef06714dd5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,6 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.4.x-dev drush/drush:9.0.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From e861d65f67c927afcf1e4e090d15ad81080fe7e9 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Mon, 4 Sep 2017 15:01:12 +0200 Subject: [PATCH 12/62] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ef06714dd5..2f369ed5f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.4.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From 8ebc3e15c594ab713a77d4cbb8daddefb88e1b2b Mon Sep 17 00:00:00 2001 From: Thom Toogood Date: Mon, 25 Sep 2017 22:14:42 +1000 Subject: [PATCH 13/62] Added composer validate to CI. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5477b6e6b2..c603bd1157 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ before_install: - composer --version install: + - composer --verbose validate - composer --verbose install script: From 7ddc4eed9ed81e57a5551e9101d2a21cc3a3bbd6 Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Wed, 11 Oct 2017 16:38:49 +0200 Subject: [PATCH 14/62] Declare compatibility with versions of Drush and CSS selector that are compatible with Drupal 8.4 and earlier. --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d08c03e77e..9aa4ed1944 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "drupal-composer/drupal-scaffold": "^2.2", "drupal/console": "^1.0.1", "drupal/core": "~8.0", - "drush/drush": "~8.0|^9.0.0-beta4", + "drush/drush": "~8.0|^9.0.0-beta7", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, @@ -32,7 +32,7 @@ "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", "mikey179/vfsstream": "~1.2", "phpunit/phpunit": ">=4.8.28 <5", - "symfony/css-selector": "~2.8" + "symfony/css-selector": "~2.8|~3.0" }, "conflict": { "drupal/drupal": "*" From 89a6e99a1a536a9bbd5bb5af65b92f68855348ab Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 1 Nov 2017 11:40:36 +0100 Subject: [PATCH 15/62] Update composer dependencies (#325) --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 9aa4ed1944..f36e2a6eca 100644 --- a/composer.json +++ b/composer.json @@ -19,9 +19,9 @@ "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6", "drupal-composer/drupal-scaffold": "^2.2", - "drupal/console": "^1.0.1", - "drupal/core": "~8.0", - "drush/drush": "~8.0|^9.0.0-beta7", + "drupal/console": "^1.0.2", + "drupal/core": "~8.4", + "drush/drush": "~8.0|^9.0.0-beta8", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, From 9646b71051791a9d5bed1a1a8bb26ea2d962e430 Mon Sep 17 00:00:00 2001 From: Dmytro Danylevskyi Date: Mon, 13 Nov 2017 10:36:53 +0200 Subject: [PATCH 16/62] Update README.md (#334) Make obvious that it's possible to add local patches to extra/patches section. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8810aab1f8..15defc376e 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ section of composer.json: "extra": { "patches": { "drupal/foobar": { - "Patch description": "URL to patch" + "Patch description": "URL or local path to patch" } } } From c5f0d6961b4d1b67d373db687c60fa061191701c Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Fri, 8 Dec 2017 11:10:40 +0100 Subject: [PATCH 17/62] Run tests with 8.5.x (#329) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d779b7898c..32a452a388 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.4.x-dev; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.5.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From f1d0d87abaac16035faa14f71a48c496e2b7bf39 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sun, 21 Jan 2018 22:02:27 +0100 Subject: [PATCH 18/62] Replace GPL-2.0+ by GPL-2.0-or-later --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f36e2a6eca..317e86313d 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "drupal-composer/drupal-project", "description": "Project template for Drupal 8 projects with composer", "type": "project", - "license": "GPL-2.0+", + "license": "GPL-2.0-or-later", "authors": [ { "name": "", From 918efcce0cf090cccee82495a29a509b1cce97ed Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 24 Jan 2018 23:45:05 +0100 Subject: [PATCH 19/62] Bump drush version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 317e86313d..a9d3461c05 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "drupal-composer/drupal-scaffold": "^2.2", "drupal/console": "^1.0.2", "drupal/core": "~8.4", - "drush/drush": "~8.0|^9.0.0-beta8", + "drush/drush": "^9.0.0", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, From ffbdbf111352727ee88b8981ed628093c3077321 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 30 Jan 2018 20:22:37 +0100 Subject: [PATCH 20/62] Replace require-dev with webflo/drupal-core-require-dev (#348) --- .travis.yml | 10 +++++++++- composer.json | 8 +------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 32a452a388..98d002db3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 env: global: @@ -16,6 +17,13 @@ env: - RELEASE=dev COMPOSER_CHANNEL=stable - RELEASE=stable COMPOSER_CHANNEL=snapshot +matrix: + exclude: + - php: 7.2 + env: RELEASE=stable COMPOSER_CHANNEL=stable + - php: 7.2 + env: RELEASE=stable COMPOSER_CHANNEL=snapshot + before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - phpenv config-rm xdebug.ini @@ -28,7 +36,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.5.x-dev; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.5.x-dev webflo/drupal-core-require-dev:8.5.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite diff --git a/composer.json b/composer.json index a9d3461c05..3d936ce405 100644 --- a/composer.json +++ b/composer.json @@ -26,13 +26,7 @@ "webmozart/path-util": "^2.3" }, "require-dev": { - "behat/mink": "~1.7", - "behat/mink-goutte-driver": "~1.2", - "jcalderonzumba/gastonjs": "~1.0.2", - "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", - "mikey179/vfsstream": "~1.2", - "phpunit/phpunit": ">=4.8.28 <5", - "symfony/css-selector": "~2.8|~3.0" + "webflo/drupal-core-require-dev": "~8.4" }, "conflict": { "drupal/drupal": "*" From 902fa86e2d56d8b737b9f9632a45ac30e8f14f85 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Fri, 9 Feb 2018 15:50:56 -0500 Subject: [PATCH 21/62] Update /drush dir for Drush9 Shows how the benefits of a policyfile and also illustrates where to store site aliases and druh config. --- drush/Commands/PolicyCommands.php | 55 +++++++++++++++++++++++++++++++ drush/Sites/self.site.yml | 14 ++++++++ drush/drush.yml | 2 ++ drush/policy.drush.inc | 38 --------------------- 4 files changed, 71 insertions(+), 38 deletions(-) create mode 100644 drush/Commands/PolicyCommands.php create mode 100644 drush/Sites/self.site.yml create mode 100644 drush/drush.yml delete mode 100644 drush/policy.drush.inc diff --git a/drush/Commands/PolicyCommands.php b/drush/Commands/PolicyCommands.php new file mode 100644 index 0000000000..00c8e5346c --- /dev/null +++ b/drush/Commands/PolicyCommands.php @@ -0,0 +1,55 @@ +input()->getArgument('destination') == '@prod') { + throw new \Exception(dt('Per !file, you may never overwrite the production database.', ['!file' => __FILE__])); + } + } + + /** + * Limit rsync operations to production site. + * + * hook validate core:rsync + */ + public function rsyncValidate(CommandData $commandData) { + if (preg_match("/^@prod/", $commandData->input()->getArgument('destination'))) { + throw new \Exception(dt('Per !file, you may never rsync to the production site.', ['!file' => __FILE__])); + } + } + + /** + * Unauthorized may not execute updates. + * + * @hook validate updatedb + */ + public function validateUpdateDb(CommandData $commandData) { + if (!$commandData->input()->getOption('secret') == 'mysecret') { + throw new \Exception(dt('UpdateDb command requires a secret token per site policy.')); + } + } + + /** + * @hook option updatedb + * @option secret A required token else user may not run updatedb command. + */ + public function optionsetUpdateDb($options = ['secret' => self::REQ]) {} +} diff --git a/drush/Sites/self.site.yml b/drush/Sites/self.site.yml new file mode 100644 index 0000000000..8742ea4695 --- /dev/null +++ b/drush/Sites/self.site.yml @@ -0,0 +1,14 @@ +# Edit or remove this file as needed. +# Docs at https://github.com/drush-ops/drush/blob/master/examples/example.site.yml + +#live: +# host: live.domain.com +# user: www-admin +# root: /path/to/drupal +# uri: http://www.example.com +# +#stage: +# host: stage.domain.com +# user: www-admin +# root: /path/to/drupal +# uri: http://stage.example.com \ No newline at end of file diff --git a/drush/drush.yml b/drush/drush.yml new file mode 100644 index 0000000000..38342bf576 --- /dev/null +++ b/drush/drush.yml @@ -0,0 +1,2 @@ +# A Drush configuration file. +# Details at https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml \ No newline at end of file diff --git a/drush/policy.drush.inc b/drush/policy.drush.inc deleted file mode 100644 index 64cd62d0f6..0000000000 --- a/drush/policy.drush.inc +++ /dev/null @@ -1,38 +0,0 @@ - Date: Fri, 9 Feb 2018 15:57:08 -0500 Subject: [PATCH 22/62] Revert "Update /drush dir for Drush9" This reverts commit 902fa86e2d56d8b737b9f9632a45ac30e8f14f85. --- drush/Commands/PolicyCommands.php | 55 ------------------------------- drush/Sites/self.site.yml | 14 -------- drush/drush.yml | 2 -- drush/policy.drush.inc | 38 +++++++++++++++++++++ 4 files changed, 38 insertions(+), 71 deletions(-) delete mode 100644 drush/Commands/PolicyCommands.php delete mode 100644 drush/Sites/self.site.yml delete mode 100644 drush/drush.yml create mode 100644 drush/policy.drush.inc diff --git a/drush/Commands/PolicyCommands.php b/drush/Commands/PolicyCommands.php deleted file mode 100644 index 00c8e5346c..0000000000 --- a/drush/Commands/PolicyCommands.php +++ /dev/null @@ -1,55 +0,0 @@ -input()->getArgument('destination') == '@prod') { - throw new \Exception(dt('Per !file, you may never overwrite the production database.', ['!file' => __FILE__])); - } - } - - /** - * Limit rsync operations to production site. - * - * hook validate core:rsync - */ - public function rsyncValidate(CommandData $commandData) { - if (preg_match("/^@prod/", $commandData->input()->getArgument('destination'))) { - throw new \Exception(dt('Per !file, you may never rsync to the production site.', ['!file' => __FILE__])); - } - } - - /** - * Unauthorized may not execute updates. - * - * @hook validate updatedb - */ - public function validateUpdateDb(CommandData $commandData) { - if (!$commandData->input()->getOption('secret') == 'mysecret') { - throw new \Exception(dt('UpdateDb command requires a secret token per site policy.')); - } - } - - /** - * @hook option updatedb - * @option secret A required token else user may not run updatedb command. - */ - public function optionsetUpdateDb($options = ['secret' => self::REQ]) {} -} diff --git a/drush/Sites/self.site.yml b/drush/Sites/self.site.yml deleted file mode 100644 index 8742ea4695..0000000000 --- a/drush/Sites/self.site.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Edit or remove this file as needed. -# Docs at https://github.com/drush-ops/drush/blob/master/examples/example.site.yml - -#live: -# host: live.domain.com -# user: www-admin -# root: /path/to/drupal -# uri: http://www.example.com -# -#stage: -# host: stage.domain.com -# user: www-admin -# root: /path/to/drupal -# uri: http://stage.example.com \ No newline at end of file diff --git a/drush/drush.yml b/drush/drush.yml deleted file mode 100644 index 38342bf576..0000000000 --- a/drush/drush.yml +++ /dev/null @@ -1,2 +0,0 @@ -# A Drush configuration file. -# Details at https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml \ No newline at end of file diff --git a/drush/policy.drush.inc b/drush/policy.drush.inc new file mode 100644 index 0000000000..64cd62d0f6 --- /dev/null +++ b/drush/policy.drush.inc @@ -0,0 +1,38 @@ + Date: Tue, 6 Mar 2018 12:18:27 -0500 Subject: [PATCH 23/62] Update /drush dir for Drush9 (#350) --- drush/Commands/PolicyCommands.php | 39 +++++++++++++++++++++++++++++++ drush/drush.yml | 6 +++++ drush/policy.drush.inc | 38 ------------------------------ drush/sites/self.site.yml | 14 +++++++++++ 4 files changed, 59 insertions(+), 38 deletions(-) create mode 100644 drush/Commands/PolicyCommands.php create mode 100644 drush/drush.yml delete mode 100644 drush/policy.drush.inc create mode 100644 drush/sites/self.site.yml diff --git a/drush/Commands/PolicyCommands.php b/drush/Commands/PolicyCommands.php new file mode 100644 index 0000000000..85ee907a85 --- /dev/null +++ b/drush/Commands/PolicyCommands.php @@ -0,0 +1,39 @@ +input()->getArgument('destination') == '@prod') { + throw new \Exception(dt('Per !file, you may never overwrite the production database.', ['!file' => __FILE__])); + } + } + + /** + * Limit rsync operations to production site. + * + * @hook validate core:rsync + * + * @throws \Exception + */ + public function rsyncValidate(CommandData $commandData) { + if (preg_match("/^@prod/", $commandData->input()->getArgument('destination'))) { + throw new \Exception(dt('Per !file, you may never rsync to the production site.', ['!file' => __FILE__])); + } + } +} diff --git a/drush/drush.yml b/drush/drush.yml new file mode 100644 index 0000000000..de78500f05 --- /dev/null +++ b/drush/drush.yml @@ -0,0 +1,6 @@ +# +# A Drush configuration file +# +# Docs at https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml +# +# Edit or remove this file as needed. \ No newline at end of file diff --git a/drush/policy.drush.inc b/drush/policy.drush.inc deleted file mode 100644 index 64cd62d0f6..0000000000 --- a/drush/policy.drush.inc +++ /dev/null @@ -1,38 +0,0 @@ - Date: Tue, 6 Mar 2018 23:49:15 -0600 Subject: [PATCH 24/62] Add platform version to FAQ to help user specifying PHP version, fixes #359. (#360) --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 15defc376e..5a9ff65a92 100644 --- a/README.md +++ b/README.md @@ -129,3 +129,15 @@ section of composer.json: ### How do I switch from packagist.drupal-composer.org to packages.drupal.org? Follow the instructions in the [documentation on drupal.org](https://www.drupal.org/docs/develop/using-composer/using-packagesdrupalorg). + +### How do I specify a PHP version ? + +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+. + +To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: +```json +"config": { + "sort-packages": true, + "platform": {"php": "5.5.9"} +}, +``` From d0568a8c8d9009091499c8c06aaf7d5fe3275181 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 7 Mar 2018 23:11:26 +0100 Subject: [PATCH 25/62] Update to Drupal 8.5 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3d936ce405..0eed730084 100644 --- a/composer.json +++ b/composer.json @@ -20,13 +20,13 @@ "cweagans/composer-patches": "^1.6", "drupal-composer/drupal-scaffold": "^2.2", "drupal/console": "^1.0.2", - "drupal/core": "~8.4", + "drupal/core": "~8.5", "drush/drush": "^9.0.0", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, "require-dev": { - "webflo/drupal-core-require-dev": "~8.4" + "webflo/drupal-core-require-dev": "~8.5" }, "conflict": { "drupal/drupal": "*" From c08d18801aefb84275199ade5791eb66e118f43b Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 8 Mar 2018 11:56:04 +0100 Subject: [PATCH 26/62] Run tests with 8.6.x --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 98d002db3c..95e5f55d08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.5.x-dev webflo/drupal-core-require-dev:8.5.x-dev; fi; + - 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; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From 56936005b3ab8d13d05302e28559a353475e11dd Mon Sep 17 00:00:00 2001 From: alexpott Date: Thu, 8 Mar 2018 11:25:28 +0000 Subject: [PATCH 27/62] Improve update instructions (#366) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a9ff65a92..1be593b3b1 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ new release of Drupal core. Follow the steps below to update your core files. -1. Run `composer update drupal/core --with-dependencies` to update Drupal Core and its dependencies. +1. Run `composer update drupal/core webflo/drupal-core-require-dev symfony/* --with-dependencies` to update Drupal Core and its dependencies. 1. Run `git diff` to determine if any of the scaffolding files have changed. Review the files for any changes and restore any customizations to `.htaccess` or `robots.txt`. From 16653756a94254ad12998c6af925b53ab5275574 Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Fri, 16 Mar 2018 17:40:55 -0400 Subject: [PATCH 28/62] Honor .env files and suggest usage (#351) --- .env.example | 27 +++++++++++++++++++++++++++ .gitignore | 3 +++ README.md | 3 ++- composer.json | 4 +++- load.environment.php | 20 ++++++++++++++++++++ 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 .env.example create mode 100644 load.environment.php diff --git a/.env.example b/.env.example new file mode 100644 index 0000000000..9b2cc373ac --- /dev/null +++ b/.env.example @@ -0,0 +1,27 @@ +# +# Copy and rename this file to .env at root of this project. +# + +# A common use case is to supply database creds via the environment. Edit settings.php +# like so: +# +# $databases['default']['default'] = [ +# 'database' => getenv('MYSQL_DATABASE'), +# 'driver' => 'mysql', +# 'host' => getenv('MYSQL_HOSTNAME'), +# 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', +# 'password' => getenv('MYSQL_PASSWORD'), +# 'port' => getenv('MYSQL_PORT'), +# 'prefix' => '', +# 'username' => getenv('MYSQL_USER'), +# ]; +# +# Uncomment and populate as needed. +# MYSQL_DATABASE= +# MYSQL_HOSTNAME= +# MYSQL_PASSWORD= +# MYSQL_PORT= +# MYSQL_USER= + +# Another common use case is to set Drush's --uri via environment. +# DRUSH_OPTIONS_URI=http://example.com \ No newline at end of file diff --git a/.gitignore b/.gitignore index cf18fe4b20..50d278d8f4 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ # Ignore files generated by PhpStorm /.idea/ + +# Ignore .env files as they are personal +/.env diff --git a/README.md b/README.md index 1be593b3b1..dff0566bfa 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/drupal-composer/drupal-project.svg?branch=8.x)](https://travis-ci.org/drupal-composer/drupal-project) -This project template should provide a kickstart for managing your site +This project template provides a starter kit for managing your site dependencies with [Composer](https://getcomposer.org/). If you want to know how to use it as replacement for @@ -49,6 +49,7 @@ When installing the given `composer.json` some tasks are taken care of: * Creates `web/sites/default/files`-directory. * Latest version of drush is installed locally for use at `vendor/bin/drush`. * Latest version of DrupalConsole is installed locally for use at `vendor/bin/drupal`. +* Creates environment variables based on your .env file. See [.env.example](.env.example). ## Updating Drupal Core diff --git a/composer.json b/composer.json index 0eed730084..bd681a814f 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "drupal/console": "^1.0.2", "drupal/core": "~8.5", "drush/drush": "^9.0.0", + "vlucas/phpdotenv": "^2.4", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, @@ -39,7 +40,8 @@ "autoload": { "classmap": [ "scripts/composer/ScriptHandler.php" - ] + ], + "files": ["load.environment.php"] }, "scripts": { "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", diff --git a/load.environment.php b/load.environment.php new file mode 100644 index 0000000000..769343fd6f --- /dev/null +++ b/load.environment.php @@ -0,0 +1,20 @@ +load(); +} +catch (InvalidPathException $e) { + // Do nothing. Production environments rarely use .env files. +} From 6be94f447e67009a385959ef57f58163d651e052 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Tue, 27 Mar 2018 10:33:55 +0200 Subject: [PATCH 29/62] Remove extra whitespace (#371) --- .env.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 9b2cc373ac..60581237b1 100644 --- a/.env.example +++ b/.env.example @@ -6,7 +6,7 @@ # like so: # # $databases['default']['default'] = [ -# 'database' => getenv('MYSQL_DATABASE'), +# 'database' => getenv('MYSQL_DATABASE'), # 'driver' => 'mysql', # 'host' => getenv('MYSQL_HOSTNAME'), # 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', @@ -24,4 +24,4 @@ # MYSQL_USER= # Another common use case is to set Drush's --uri via environment. -# DRUSH_OPTIONS_URI=http://example.com \ No newline at end of file +# DRUSH_OPTIONS_URI=http://example.com From 9e90e4f3b12a45d0a1c580ca13be7ed1cd4b5411 Mon Sep 17 00:00:00 2001 From: Markus Orenstrat Date: Wed, 28 Mar 2018 19:20:02 +0200 Subject: [PATCH 30/62] Updated argument name --- drush/Commands/PolicyCommands.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drush/Commands/PolicyCommands.php b/drush/Commands/PolicyCommands.php index 85ee907a85..b5bdec6cd6 100644 --- a/drush/Commands/PolicyCommands.php +++ b/drush/Commands/PolicyCommands.php @@ -19,7 +19,7 @@ class PolicyCommands extends DrushCommands { * @throws \Exception */ public function sqlSyncValidate(CommandData $commandData) { - if ($commandData->input()->getArgument('destination') == '@prod') { + if ($commandData->input()->getArgument('target') == '@prod') { throw new \Exception(dt('Per !file, you may never overwrite the production database.', ['!file' => __FILE__])); } } @@ -32,7 +32,7 @@ public function sqlSyncValidate(CommandData $commandData) { * @throws \Exception */ public function rsyncValidate(CommandData $commandData) { - if (preg_match("/^@prod/", $commandData->input()->getArgument('destination'))) { + if (preg_match("/^@prod/", $commandData->input()->getArgument('target'))) { throw new \Exception(dt('Per !file, you may never rsync to the production site.', ['!file' => __FILE__])); } } From 91672522090604e4ec385fc3a4c30c23f62a14da Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 28 Mar 2018 22:27:49 +0200 Subject: [PATCH 31/62] Bump minimal version --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index bd681a814f..a787820c28 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,14 @@ "cweagans/composer-patches": "^1.6", "drupal-composer/drupal-scaffold": "^2.2", "drupal/console": "^1.0.2", - "drupal/core": "~8.5", + "drupal/core": "~8.5.1", "drush/drush": "^9.0.0", "vlucas/phpdotenv": "^2.4", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, "require-dev": { - "webflo/drupal-core-require-dev": "~8.5" + "webflo/drupal-core-require-dev": "~8.5.1" }, "conflict": { "drupal/drupal": "*" From 24ab11d2bf57929544944a1c29b72c7a2c942e98 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 26 Apr 2018 07:57:28 +0200 Subject: [PATCH 32/62] Bump minimal version to 8.5.3 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a787820c28..49abe50c7f 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,14 @@ "cweagans/composer-patches": "^1.6", "drupal-composer/drupal-scaffold": "^2.2", "drupal/console": "^1.0.2", - "drupal/core": "~8.5.1", + "drupal/core": "~8.5.3", "drush/drush": "^9.0.0", "vlucas/phpdotenv": "^2.4", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, "require-dev": { - "webflo/drupal-core-require-dev": "~8.5.1" + "webflo/drupal-core-require-dev": "~8.5.3" }, "conflict": { "drupal/drupal": "*" From 4a35beba005a4930145f146e5ddd7b172726437c Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Fri, 25 May 2018 08:43:13 -0400 Subject: [PATCH 33/62] Fix installer path for drush commandfiles. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 49abe50c7f..f2a4efbcc8 100644 --- a/composer.json +++ b/composer.json @@ -65,7 +65,7 @@ "web/modules/contrib/{$name}": ["type:drupal-module"], "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], - "drush/contrib/{$name}": ["type:drupal-drush"] + "drush/Commands/{$name}": ["type:drupal-drush"] } } } From 04138e374bdeeb838020c2a1c4b0591118686d45 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 29 May 2018 18:54:13 +0200 Subject: [PATCH 34/62] Update drupal-composer/drupal-scaffold drupal-composer/drupal-scaffold is a full featured plugin and provides its own command. --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f2a4efbcc8..bf513b3f6a 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "require": { "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6", - "drupal-composer/drupal-scaffold": "^2.2", + "drupal-composer/drupal-scaffold": "^2.5", "drupal/console": "^1.0.2", "drupal/core": "~8.5.3", "drush/drush": "^9.0.0", @@ -44,7 +44,6 @@ "files": ["load.environment.php"] }, "scripts": { - "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", "pre-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], From dc7e43819a228fb0f180cbe0a022155fb1289b16 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 26 Jun 2018 23:19:16 +0200 Subject: [PATCH 35/62] Fix tests on Travis CI (#405) --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 95e5f55d08..bbb5507101 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,12 +19,13 @@ env: matrix: exclude: - - php: 7.2 - env: RELEASE=stable COMPOSER_CHANNEL=stable - - php: 7.2 + - php: 5.6 + env: RELEASE=dev COMPOSER_CHANNEL=stable + - php: 5.6 env: RELEASE=stable COMPOSER_CHANNEL=snapshot before_install: + - if [[ $TRAVIS_PHP_VERSION = 5.6 ]]; then export COMPOSER_MEMORY_LIMIT=-1; fi; - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - phpenv config-rm xdebug.ini - composer --verbose self-update --$COMPOSER_CHANNEL @@ -44,6 +45,7 @@ script: - until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null # Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json # Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673 - - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache + # Ignore Setup group temporarily, @see https://www.drupal.org/node/2962157 + - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache,Setup - ./../vendor/bin/drush - if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi; From 3be2be59967107af135d72eb8992dcd3f2e8af8f Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Tue, 26 Jun 2018 23:53:57 +0200 Subject: [PATCH 36/62] Copy the editor config and gitattributes from drupal to the root. (#404) --- composer.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/composer.json b/composer.json index bf513b3f6a..49a9884a0c 100644 --- a/composer.json +++ b/composer.json @@ -65,6 +65,12 @@ "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], "drush/Commands/{$name}": ["type:drupal-drush"] + }, + "drupal-scaffold": { + "initial": { + ".editorconfig": "../.editorconfig", + ".gitattributes": "../.gitattributes" + } } } } From b0c4ce82a9a93e6bd8cae511faff1c0e40bedc16 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 27 Jun 2018 00:04:52 +0200 Subject: [PATCH 37/62] Remove "drupal-scaffold" from scripts (#275) --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dff0566bfa..67e44fb1db 100644 --- a/README.md +++ b/README.md @@ -95,17 +95,16 @@ The [drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) plugin index.php, update.php, …) to the web/ directory of your project. If you have not customized those files you could choose to not check them into your version control system (e.g. git). If that is the case for your project it might be convenient to automatically run the drupal-scaffold plugin after every install or update of your project. You can -achieve that by registering `@drupal-scaffold` as post-install and post-update command in your composer.json: +achieve that by registering `@composer drupal:scaffold` as post-install and post-update command in your composer.json: ```json "scripts": { - "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", "post-install-cmd": [ - "@drupal-scaffold", + "@composer drupal:scaffold", "..." ], "post-update-cmd": [ - "@drupal-scaffold", + "@composer drupal:scaffoldd", "..." ] }, From 2b9d84a115536e598586a9ad9597855d19587c4e Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 27 Jun 2018 00:05:49 +0200 Subject: [PATCH 38/62] Fix typo in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67e44fb1db..395b7aa917 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ achieve that by registering `@composer drupal:scaffold` as post-install and post "..." ], "post-update-cmd": [ - "@composer drupal:scaffoldd", + "@composer drupal:scaffold", "..." ] }, From 24f29be11ebcb2c2e610dcfd348b61e15f0d6d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20K=C3=A4mper-Leymann?= Date: Thu, 28 Jun 2018 19:00:17 +0200 Subject: [PATCH 39/62] Remove unused use statement. (#406) --- drush/Commands/PolicyCommands.php | 1 - 1 file changed, 1 deletion(-) diff --git a/drush/Commands/PolicyCommands.php b/drush/Commands/PolicyCommands.php index b5bdec6cd6..290b4e0331 100644 --- a/drush/Commands/PolicyCommands.php +++ b/drush/Commands/PolicyCommands.php @@ -3,7 +3,6 @@ namespace Drush\Commands; use Consolidation\AnnotatedCommand\CommandData; -use Drush\Commands\DrushCommands; /** * Edit this file to reflect your organization's needs. From 96f02b37d3d9cb159da412a857420a97b8ebac2e Mon Sep 17 00:00:00 2001 From: Alex Milkovskyi Date: Thu, 16 Aug 2018 11:27:15 +0200 Subject: [PATCH 40/62] Adjust default core patch level to -p2. (#418) --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 49a9884a0c..8bc6a54fd7 100644 --- a/composer.json +++ b/composer.json @@ -58,6 +58,9 @@ ] }, "extra": { + "patchLevel": { + "drupal/core": "-p2" + }, "installer-paths": { "web/core": ["type:drupal-core"], "web/libraries/{$name}": ["type:drupal-library"], From 970d307847504ba4248ddc39c000e87ddafd9d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dezs=C5=91=20BICZ=C3=93?= Date: Thu, 16 Aug 2018 16:10:03 +0200 Subject: [PATCH 41/62] Bump minimum required composer-patches version to support default patch level (#410) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8bc6a54fd7..aeae74a1f4 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "composer/installers": "^1.2", - "cweagans/composer-patches": "^1.6", + "cweagans/composer-patches": "^1.6.5", "drupal-composer/drupal-scaffold": "^2.5", "drupal/console": "^1.0.2", "drupal/core": "~8.5.3", From c1e2b6e6b32d51e75321d76c503714d8515e2420 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Thu, 6 Sep 2018 04:29:23 -0400 Subject: [PATCH 42/62] Update composer.json to require latest stable version of Drupal (#424) --- .travis.yml | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bbb5507101..c35782b5e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - - 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; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.7.x-dev webflo/drupal-core-require-dev:8.7.x-dev; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite diff --git a/composer.json b/composer.json index aeae74a1f4..3fe34336e9 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,14 @@ "cweagans/composer-patches": "^1.6.5", "drupal-composer/drupal-scaffold": "^2.5", "drupal/console": "^1.0.2", - "drupal/core": "~8.5.3", + "drupal/core": "^8.6.0", "drush/drush": "^9.0.0", "vlucas/phpdotenv": "^2.4", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, "require-dev": { - "webflo/drupal-core-require-dev": "~8.5.3" + "webflo/drupal-core-require-dev": "^8.6.0" }, "conflict": { "drupal/drupal": "*" From 21698cf2699c24255e402a9af67591dfe2805acb Mon Sep 17 00:00:00 2001 From: Andy Postnikov Date: Sat, 26 Jan 2019 14:55:48 +0200 Subject: [PATCH 43/62] Require zaporylie/composer-drupal-optimizations (#442) --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3fe34336e9..9681a1d967 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,8 @@ "drush/drush": "^9.0.0", "vlucas/phpdotenv": "^2.4", "webflo/drupal-finder": "^1.0.0", - "webmozart/path-util": "^2.3" + "webmozart/path-util": "^2.3", + "zaporylie/composer-drupal-optimizations": "^1.0" }, "require-dev": { "webflo/drupal-core-require-dev": "^8.6.0" From 4a664d249486c836fc8cb55cc1471018cbff11b0 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 26 Jan 2019 15:12:59 +0100 Subject: [PATCH 44/62] Issue #408: Bump minimum PHP version to 5.6 --- README.md | 6 ++++-- composer.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 395b7aa917..adc47c71ad 100644 --- a/README.md +++ b/README.md @@ -132,12 +132,14 @@ Follow the instructions in the [documentation on drupal.org](https://www.drupal. ### How do I specify a PHP version ? -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+. +This project supports PHP 5.6 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+. To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: ```json "config": { "sort-packages": true, - "platform": {"php": "5.5.9"} + "platform": { + "php": "5.6.40" + } }, ``` diff --git a/composer.json b/composer.json index 9681a1d967..9aa3dbd877 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ } ], "require": { + "php": ">=5.6", "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6.5", "drupal-composer/drupal-scaffold": "^2.5", From 4eb9750681374c19fa40fa12a5995d9bc04c3411 Mon Sep 17 00:00:00 2001 From: Hans Fredrik Nordhaug Date: Sat, 26 Jan 2019 15:56:25 +0100 Subject: [PATCH 45/62] Removing redundant "--stability dev" from installation command (#450) Fixes #449. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index adc47c71ad..bdcb92be94 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ for your setup. After that you can create the project: ``` -composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction +composer create-project drupal-composer/drupal-project:8.x-dev some-dir --no-interaction ``` With `composer require ...` you can download new dependencies to your From f2b83dc777a188cc1ccc4526f947e66d70fad380 Mon Sep 17 00:00:00 2001 From: Maarten Segers Date: Sat, 26 Jan 2019 16:08:30 +0100 Subject: [PATCH 46/62] Added "composer-exit-on-patch-failure": true option to composer.json (#420) --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 9aa3dbd877..8726b1d000 100644 --- a/composer.json +++ b/composer.json @@ -60,6 +60,7 @@ ] }, "extra": { + "composer-exit-on-patch-failure": true, "patchLevel": { "drupal/core": "-p2" }, From 4229acea4bb6181f421e8dd0e72a02ccdc98df1d Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 31 Jan 2019 09:34:48 +0100 Subject: [PATCH 47/62] Sync new lines at the end of the files (#453) --- drush/drush.yml | 2 +- drush/sites/self.site.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drush/drush.yml b/drush/drush.yml index de78500f05..a8cbd00730 100644 --- a/drush/drush.yml +++ b/drush/drush.yml @@ -3,4 +3,4 @@ # # Docs at https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml # -# Edit or remove this file as needed. \ No newline at end of file +# Edit or remove this file as needed. diff --git a/drush/sites/self.site.yml b/drush/sites/self.site.yml index cf57d09cf5..fda7194097 100644 --- a/drush/sites/self.site.yml +++ b/drush/sites/self.site.yml @@ -11,4 +11,4 @@ # host: stage.domain.com # user: www-admin # root: /path/to/drupal -# uri: http://stage.example.com \ No newline at end of file +# uri: http://stage.example.com From 85d302ef54a4c2307f445f0d8ea1b33bf6db5991 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 13 Mar 2019 08:29:28 +0100 Subject: [PATCH 48/62] Quote wildcards to avoid issues in some shells (#456) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bdcb92be94..114dfaaa71 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ new release of Drupal core. Follow the steps below to update your core files. -1. Run `composer update drupal/core webflo/drupal-core-require-dev symfony/* --with-dependencies` to update Drupal Core and its dependencies. +1. Run `composer update drupal/core webflo/drupal-core-require-dev "symfony/*" --with-dependencies` to update Drupal Core and its dependencies. 1. Run `git diff` to determine if any of the scaffolding files have changed. Review the files for any changes and restore any customizations to `.htaccess` or `robots.txt`. From d8ee4b4defd855b674caead3ded71e211bbefe65 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 8 Apr 2019 22:03:39 +0200 Subject: [PATCH 49/62] Add PHP 7.3 to Travis CI (#476) --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c35782b5e4..858d5fa779 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 env: global: From 9e036f02949d81a423a09ec428c3384742e6b33d Mon Sep 17 00:00:00 2001 From: Charles Tanton Date: Tue, 9 Apr 2019 21:01:07 +0200 Subject: [PATCH 50/62] Change createRequiredFiles messages to reflect what occured (#467) --- scripts/composer/ScriptHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index a75e4d34ee..e7c84f412c 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -48,7 +48,7 @@ public static function createRequiredFiles(Event $event) { ]; drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php'); $fs->chmod($drupalRoot . '/sites/default/settings.php', 0666); - $event->getIO()->write("Create a sites/default/settings.php file with chmod 0666"); + $event->getIO()->write("Created a sites/default/settings.php file with chmod 0666"); } // Create the files directory with chmod 0777 @@ -56,7 +56,7 @@ public static function createRequiredFiles(Event $event) { $oldmask = umask(0); $fs->mkdir($drupalRoot . '/sites/default/files', 0777); umask($oldmask); - $event->getIO()->write("Create a sites/default/files directory with chmod 0777"); + $event->getIO()->write("Created a sites/default/files directory with chmod 0777"); } } From e55e401a5f964294ab3da9ecb7c10a314b17e28c Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 2 May 2019 06:51:59 +0200 Subject: [PATCH 51/62] Drop PHP 5.6 testing (#489) --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 858d5fa779..9c5c342382 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ dist: trusty sudo: false php: - - 5.6 - 7.0 - 7.1 - 7.2 @@ -18,13 +17,6 @@ env: - RELEASE=dev COMPOSER_CHANNEL=stable - RELEASE=stable COMPOSER_CHANNEL=snapshot -matrix: - exclude: - - php: 5.6 - env: RELEASE=dev COMPOSER_CHANNEL=stable - - php: 5.6 - env: RELEASE=stable COMPOSER_CHANNEL=snapshot - before_install: - if [[ $TRAVIS_PHP_VERSION = 5.6 ]]; then export COMPOSER_MEMORY_LIMIT=-1; fi; - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini From 0bc7270af36e2800a225c2c45d8957ea3de36645 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 2 May 2019 07:14:41 +0200 Subject: [PATCH 52/62] Bump minimum version to 8.7.0 (#488) --- .travis.yml | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9c5c342382..eb05c792c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.7.x-dev webflo/drupal-core-require-dev:8.7.x-dev; fi; + - 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; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite diff --git a/composer.json b/composer.json index 8726b1d000..0419896aef 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "cweagans/composer-patches": "^1.6.5", "drupal-composer/drupal-scaffold": "^2.5", "drupal/console": "^1.0.2", - "drupal/core": "^8.6.0", + "drupal/core": "^8.7.0", "drush/drush": "^9.0.0", "vlucas/phpdotenv": "^2.4", "webflo/drupal-finder": "^1.0.0", @@ -29,7 +29,7 @@ "zaporylie/composer-drupal-optimizations": "^1.0" }, "require-dev": { - "webflo/drupal-core-require-dev": "^8.6.0" + "webflo/drupal-core-require-dev": "^8.7.0" }, "conflict": { "drupal/drupal": "*" From ec0f41171516c18357ca4cda9068ee4cdeabaa19 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 2 May 2019 07:14:59 +0200 Subject: [PATCH 53/62] Update .travis.yml --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eb05c792c1..5a3b11b9ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,6 @@ env: - RELEASE=stable COMPOSER_CHANNEL=snapshot before_install: - - if [[ $TRAVIS_PHP_VERSION = 5.6 ]]; then export COMPOSER_MEMORY_LIMIT=-1; fi; - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - phpenv config-rm xdebug.ini - composer --verbose self-update --$COMPOSER_CHANNEL From 50854107161a5a5308dfe8776303ebb460ae8888 Mon Sep 17 00:00:00 2001 From: Maarten Segers Date: Fri, 20 Sep 2019 10:23:37 +0200 Subject: [PATCH 54/62] Deprecate PHP 7.0 and 7.1 (#518) --- .travis.yml | 2 -- README.md | 6 +++--- composer.json | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5a3b11b9ba..ee96f1f83a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ dist: trusty sudo: false php: - - 7.0 - - 7.1 - 7.2 - 7.3 diff --git a/README.md b/README.md index 114dfaaa71..4bf9f5badc 100644 --- a/README.md +++ b/README.md @@ -132,14 +132,14 @@ Follow the instructions in the [documentation on drupal.org](https://www.drupal. ### How do I specify a PHP version ? -This project supports PHP 5.6 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+. +This project supports PHP 7.2 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)). -To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: +You can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: ```json "config": { "sort-packages": true, "platform": { - "php": "5.6.40" + "php": "7.3.9" } }, ``` diff --git a/composer.json b/composer.json index 0419896aef..d78a6f56e5 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.2", "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6.5", "drupal-composer/drupal-scaffold": "^2.5", From 4de437963a0470c71c9ee22c22ba04e4edb6c127 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Fri, 20 Sep 2019 21:58:49 +0200 Subject: [PATCH 55/62] Revert "Deprecate PHP 7.1" (#521) This reverts commit 50854107161a5a5308dfe8776303ebb460ae8888. --- .travis.yml | 2 ++ README.md | 6 +++--- composer.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index ee96f1f83a..5a3b11b9ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ dist: trusty sudo: false php: + - 7.0 + - 7.1 - 7.2 - 7.3 diff --git a/README.md b/README.md index 4bf9f5badc..114dfaaa71 100644 --- a/README.md +++ b/README.md @@ -132,14 +132,14 @@ Follow the instructions in the [documentation on drupal.org](https://www.drupal. ### How do I specify a PHP version ? -This project supports PHP 7.2 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)). +This project supports PHP 5.6 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+. -You can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: +To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: ```json "config": { "sort-packages": true, "platform": { - "php": "7.3.9" + "php": "5.6.40" } }, ``` diff --git a/composer.json b/composer.json index d78a6f56e5..0419896aef 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=7.2", + "php": ">=5.6", "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6.5", "drupal-composer/drupal-scaffold": "^2.5", From a49e2059fb03463db4f204baddffbf4d362e5ebd Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 21 Sep 2019 09:24:50 +0200 Subject: [PATCH 56/62] Issue #518: Bump minimum php version to 7.0.8 --- README.md | 44 ++++++++++++++++++++++---------------------- composer.json | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 114dfaaa71..4f42497a2e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ the [Documentation on drupal.org](https://www.drupal.org/node/2471553). First you need to [install composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx). > Note: The instructions below refer to the [global composer installation](https://getcomposer.org/doc/00-intro.md#globally). -You might need to replace `composer` with `php composer.phar` (or similar) +You might need to replace `composer` with `php composer.phar` (or similar) for your setup. After that you can create the project: @@ -23,7 +23,7 @@ After that you can create the project: composer create-project drupal-composer/drupal-project:8.x-dev some-dir --no-interaction ``` -With `composer require ...` you can download new dependencies to your +With `composer require ...` you can download new dependencies to your installation. ``` @@ -31,8 +31,8 @@ cd some-dir composer require drupal/devel:~1.0 ``` -The `composer create-project` command passes ownership of all files to the -project that is created. You should create a new git repository, and commit +The `composer create-project` command passes ownership of all files to the +project that is created. You should create a new git repository, and commit all files not excluded by the .gitignore file. ## What does the template do? @@ -53,26 +53,26 @@ When installing the given `composer.json` some tasks are taken care of: ## Updating Drupal Core -This project will attempt to keep all of your Drupal Core files up-to-date; the -project [drupal-composer/drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) -is used to ensure that your scaffold files are updated every time drupal/core is -updated. If you customize any of the "scaffolding" files (commonly .htaccess), -you may need to merge conflicts if any of your modified files are updated in a +This project will attempt to keep all of your Drupal Core files up-to-date; the +project [drupal-composer/drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) +is used to ensure that your scaffold files are updated every time drupal/core is +updated. If you customize any of the "scaffolding" files (commonly .htaccess), +you may need to merge conflicts if any of your modified files are updated in a new release of Drupal core. Follow the steps below to update your core files. 1. Run `composer update drupal/core webflo/drupal-core-require-dev "symfony/*" --with-dependencies` to update Drupal Core and its dependencies. -1. Run `git diff` to determine if any of the scaffolding files have changed. - Review the files for any changes and restore any customizations to +1. Run `git diff` to determine if any of the scaffolding files have changed. + Review the files for any changes and restore any customizations to `.htaccess` or `robots.txt`. 1. Commit everything all together in a single commit, so `web` will remain in sync with the `core` when checking out branches or running `git bisect`. -1. In the event that there are non-trivial conflicts in step 2, you may wish - to perform these steps on a branch, and use `git merge` to combine the - updated core files with your customized files. This facilitates the use - of a [three-way merge tool such as kdiff3](http://www.gitshah.com/2010/12/how-to-setup-kdiff-as-diff-tool-for-git.html). This setup is not necessary if your changes are simple; - keeping all of your modifications at the beginning or end of the file is a +1. In the event that there are non-trivial conflicts in step 2, you may wish + to perform these steps on a branch, and use `git merge` to combine the + updated core files with your customized files. This facilitates the use + of a [three-way merge tool such as kdiff3](http://www.gitshah.com/2010/12/how-to-setup-kdiff-as-diff-tool-for-git.html). This setup is not necessary if your changes are simple; + keeping all of your modifications at the beginning or end of the file is a good strategy to keep merges easy. ## Generate composer.json from existing project @@ -86,7 +86,7 @@ that the generated `composer.json` might differ from this project's file. ### Should I commit the contrib modules I download? -Composer recommends **no**. They provide [argumentation against but also +Composer recommends **no**. They provide [argumentation against but also workrounds if a project decides to do it anyway](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md). ### Should I commit the scaffolding files? @@ -111,11 +111,11 @@ achieve that by registering `@composer drupal:scaffold` as post-install and post ``` ### How can I apply patches to downloaded modules? -If you need to apply patches (depending on the project being modified, a pull -request is often a better solution), you can do so with the +If you need to apply patches (depending on the project being modified, a pull +request is often a better solution), you can do so with the [composer-patches](https://github.com/cweagans/composer-patches) plugin. -To add a patch to drupal module foobar insert the patches section in the extra +To add a patch to drupal module foobar insert the patches section in the extra section of composer.json: ```json "extra": { @@ -132,14 +132,14 @@ Follow the instructions in the [documentation on drupal.org](https://www.drupal. ### How do I specify a PHP version ? -This project supports PHP 5.6 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+. +This project supports PHP 7.0 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+. To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: ```json "config": { "sort-packages": true, "platform": { - "php": "5.6.40" + "php": "7.0.33" } }, ``` diff --git a/composer.json b/composer.json index 0419896aef..dfa248ba26 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.0.8", "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6.5", "drupal-composer/drupal-scaffold": "^2.5", From ee5bf36b89602f127446edc48126c792b670cf23 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 21 Sep 2019 09:40:03 +0200 Subject: [PATCH 57/62] Update CI to Ubuntu 18.04 (#520) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5a3b11b9ba..87db9c30c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: trusty +dist: bionic sudo: false php: From 309e83ca464c449ba4ffc63a0135f033a5d7ee2e Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 26 Sep 2019 08:45:10 +0200 Subject: [PATCH 58/62] Revert "Update CI to Ubuntu 18.04" (#526) This reverts commit ee5bf36b89602f127446edc48126c792b670cf23. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 87db9c30c8..5a3b11b9ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: bionic +dist: trusty sudo: false php: From bdaa8fd53b120fa556e44cbfaa42f4c56831b9bd Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 26 Sep 2019 00:06:51 -0700 Subject: [PATCH 59/62] Add 'contrib' to Drush commandfile installer path (#525) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dfa248ba26..9b30b092c4 100644 --- a/composer.json +++ b/composer.json @@ -70,7 +70,7 @@ "web/modules/contrib/{$name}": ["type:drupal-module"], "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], - "drush/Commands/{$name}": ["type:drupal-drush"] + "drush/Commands/contrib/{$name}": ["type:drupal-drush"] }, "drupal-scaffold": { "initial": { From 53f6910c35db73d0b367d5b6f22be4af94dd1af3 Mon Sep 17 00:00:00 2001 From: Paul <1727604+paulvandenburg@users.noreply.github.com> Date: Fri, 8 Nov 2019 22:52:47 +0100 Subject: [PATCH 60/62] Prefer usage of && operator instead of "and" (#530) --- scripts/composer/ScriptHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index e7c84f412c..4a344f53c9 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -36,7 +36,7 @@ public static function createRequiredFiles(Event $event) { } // Prepare the settings file for installation - if (!$fs->exists($drupalRoot . '/sites/default/settings.php') and $fs->exists($drupalRoot . '/sites/default/default.settings.php')) { + if (!$fs->exists($drupalRoot . '/sites/default/settings.php') && $fs->exists($drupalRoot . '/sites/default/default.settings.php')) { $fs->copy($drupalRoot . '/sites/default/default.settings.php', $drupalRoot . '/sites/default/settings.php'); require_once $drupalRoot . '/core/includes/bootstrap.inc'; require_once $drupalRoot . '/core/includes/install.inc'; From d2e7410c8453ff18462278836c76e56b9a973585 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 5 Dec 2019 14:48:04 -0800 Subject: [PATCH 61/62] Use scaffold plugin and composer packages from Drupal core 8.8.0 (#522) --- .travis.yml | 17 +++++++---------- README.md | 8 ++++---- composer.json | 22 ++++++++++------------ load.environment.php | 9 ++------- 4 files changed, 23 insertions(+), 33 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5a3b11b9ba..ac51e49242 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,15 +29,12 @@ install: script: - if [[ $RELEASE = dev ]]; then composer --verbose remove --no-update drupal/console; fi; - - 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; + - 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; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - - cd $TRAVIS_BUILD_DIR/web - - ./../vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite - - ./../vendor/bin/drush runserver $SIMPLETEST_BASE_URL & + - ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite + - ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL & - until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null - # Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json - # Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673 - # Ignore Setup group temporarily, @see https://www.drupal.org/node/2962157 - - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache,Setup - - ./../vendor/bin/drush - - if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi; + # Run a single unit test to verfiy the testing setup. + - ./vendor/bin/phpunit -c ./web/core ./web/core/modules/system/tests/src/Unit/SystemRequirementsTest.php + - ./vendor/bin/drush + - if [[ $RELEASE = stable ]]; then ./vendor/bin/drupal; fi; diff --git a/README.md b/README.md index 4f42497a2e..2c40e4384f 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ When installing the given `composer.json` some tasks are taken care of: ## Updating Drupal Core This project will attempt to keep all of your Drupal Core files up-to-date; the -project [drupal-composer/drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) +project [drupal/core-composer-scaffold](https://github.com/drupal/core-composer-scaffold) is used to ensure that your scaffold files are updated every time drupal/core is updated. If you customize any of the "scaffolding" files (commonly .htaccess), you may need to merge conflicts if any of your modified files are updated in a @@ -62,8 +62,8 @@ new release of Drupal core. Follow the steps below to update your core files. -1. Run `composer update drupal/core webflo/drupal-core-require-dev "symfony/*" --with-dependencies` to update Drupal Core and its dependencies. -1. Run `git diff` to determine if any of the scaffolding files have changed. +1. Run `composer update drupal/core drupal/core-dev --with-dependencies` to update Drupal Core and its dependencies. +2. Run `git diff` to determine if any of the scaffolding files have changed. Review the files for any changes and restore any customizations to `.htaccess` or `robots.txt`. 1. Commit everything all together in a single commit, so `web` will remain in @@ -91,7 +91,7 @@ workrounds if a project decides to do it anyway](https://getcomposer.org/doc/faq ### Should I commit the scaffolding files? -The [drupal-scaffold](https://github.com/drupal-composer/drupal-scaffold) plugin can download the scaffold files (like +The [Drupal Composer Scaffold](https://github.com/drupal/core-composer-scaffold) plugin can download the scaffold files (like index.php, update.php, …) to the web/ directory of your project. If you have not customized those files you could choose to not check them into your version control system (e.g. git). If that is the case for your project it might be convenient to automatically run the drupal-scaffold plugin after every install or update of your project. You can diff --git a/composer.json b/composer.json index 9b30b092c4..b29500cc0c 100644 --- a/composer.json +++ b/composer.json @@ -19,17 +19,16 @@ "php": ">=7.0.8", "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6.5", - "drupal-composer/drupal-scaffold": "^2.5", "drupal/console": "^1.0.2", - "drupal/core": "^8.7.0", - "drush/drush": "^9.0.0", - "vlucas/phpdotenv": "^2.4", + "drupal/core": "^8.8.0", + "drupal/core-composer-scaffold": "^8.8.0", + "drush/drush": "^9.7.1 | ^10.0.0", + "vlucas/phpdotenv": "^4.0", "webflo/drupal-finder": "^1.0.0", - "webmozart/path-util": "^2.3", "zaporylie/composer-drupal-optimizations": "^1.0" }, "require-dev": { - "webflo/drupal-core-require-dev": "^8.7.0" + "drupal/core-dev": "^8.8.0" }, "conflict": { "drupal/drupal": "*" @@ -64,6 +63,11 @@ "patchLevel": { "drupal/core": "-p2" }, + "drupal-scaffold": { + "locations": { + "web-root": "web/" + } + }, "installer-paths": { "web/core": ["type:drupal-core"], "web/libraries/{$name}": ["type:drupal-library"], @@ -71,12 +75,6 @@ "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], "drush/Commands/contrib/{$name}": ["type:drupal-drush"] - }, - "drupal-scaffold": { - "initial": { - ".editorconfig": "../.editorconfig", - ".gitattributes": "../.gitattributes" - } } } } diff --git a/load.environment.php b/load.environment.php index 769343fd6f..eef1d28d07 100644 --- a/load.environment.php +++ b/load.environment.php @@ -11,10 +11,5 @@ /** * Load any .env file. See /.env.example. */ -$dotenv = new Dotenv(__DIR__); -try { - $dotenv->load(); -} -catch (InvalidPathException $e) { - // Do nothing. Production environments rarely use .env files. -} +$dotenv = Dotenv::createImmutable(__DIR__); +$dotenv->safeLoad(); From 04a3fe08d35bfdbdcb9718556fbe8181cd111ff0 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 18 Dec 2019 14:52:01 +0100 Subject: [PATCH 62/62] Issue #539: Remove deprecated CONFIG_SYNC_DIRECTORY --- scripts/composer/ScriptHandler.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index 4a344f53c9..51026d38a1 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -9,6 +9,7 @@ use Composer\Script\Event; use Composer\Semver\Comparator; +use Drupal\Core\Site\Settings; use DrupalFinder\DrupalFinder; use Symfony\Component\Filesystem\Filesystem; use Webmozart\PathUtil\Path; @@ -40,11 +41,10 @@ public static function createRequiredFiles(Event $event) { $fs->copy($drupalRoot . '/sites/default/default.settings.php', $drupalRoot . '/sites/default/settings.php'); require_once $drupalRoot . '/core/includes/bootstrap.inc'; require_once $drupalRoot . '/core/includes/install.inc'; - $settings['config_directories'] = [ - CONFIG_SYNC_DIRECTORY => (object) [ - 'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot), - 'required' => TRUE, - ], + new Settings([]); + $settings['settings']['config_sync_directory'] = (object) [ + 'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot), + 'required' => TRUE, ]; drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php'); $fs->chmod($drupalRoot . '/sites/default/settings.php', 0666);