From 247207c3f0d15ae9593606f7f754bb9b1f2a2d29 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Fri, 20 May 2016 00:59:37 +0200 Subject: [PATCH 001/110] Skip functional tests (#151) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fda43a5403..072d01f418 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,6 @@ script: - ./../vendor/bin/drush runserver http://127.0.0.1:8080 & - sleep 3 # Skip core/tests/Drupal/Tests/ComposerIntegrationTest.php because web/ has no composer.json - - ./../vendor/bin/phpunit -c core --exclude-group Composer + - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer - ./../vendor/bin/drush - ./../vendor/bin/drupal From c469aaaebcf4972a4363e5c463e0515fa5b933f9 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 20 May 2016 00:00:49 +0100 Subject: [PATCH 002/110] Ignore any site files (#148) --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 181eef61dc..452fb82aa6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ web/themes/contrib web/profiles/contrib # Ignore Drupal's file directory -web/sites/default/files +web/sites/*/files # Ignore files generated by PhpStorm .idea From 719a18806d64f2084858a2be7ebde5c049d85064 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 26 May 2016 00:41:02 +0200 Subject: [PATCH 003/110] Update drupal-composer/drupal-scaffold to 2.0.1 (#154) --- .travis.yml | 2 +- composer.json | 4 +--- scripts/composer/ScriptHandler.php | 7 ------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 072d01f418..069f1a6288 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ install: - composer --verbose install script: - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.0.x-dev; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.1.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 c877abd3a9..e2280b486e 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "composer/installers": "^1.0.20", - "drupal-composer/drupal-scaffold": "^1.3.1", + "drupal-composer/drupal-scaffold": "^2.0.1", "cweagans/composer-patches": "~1.0", "drupal/core": "~8.0", "drush/drush": "~8.0", @@ -45,11 +45,9 @@ "scripts": { "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", "post-install-cmd": [ - "DrupalProject\\composer\\ScriptHandler::buildScaffold", "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" ], "post-update-cmd": [ - "DrupalProject\\composer\\ScriptHandler::buildScaffold", "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" ] }, diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index ab1dcda627..018f6a99c7 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -16,13 +16,6 @@ protected static function getDrupalRoot($project_root) { return $project_root . '/web'; } - public static function buildScaffold(Event $event) { - $fs = new Filesystem(); - if (!$fs->exists(static::getDrupalRoot(getcwd()) . '/autoload.php')) { - \DrupalComposer\DrupalScaffold\Plugin::scaffold($event); - } - } - public static function createRequiredFiles(Event $event) { $fs = new Filesystem(); $root = static::getDrupalRoot(getcwd()); From 544ba79cd95cb4fca599cba586498aaf0faf2885 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 26 May 2016 10:05:16 +0200 Subject: [PATCH 004/110] Update dev dependencies --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e2280b486e..38e58bd73e 100644 --- a/composer.json +++ b/composer.json @@ -24,13 +24,13 @@ "drupal/console": "~0.10" }, "require-dev": { - "behat/mink": "~1.6", + "behat/mink": "~1.7", "behat/mink-goutte-driver": "~1.2", - "jcalderonzumba/gastonjs": "^1.1@dev", + "jcalderonzumba/gastonjs": "~1.0.2", "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", "mikey179/vfsStream": "~1.2", "phpunit/phpunit": "~4.8", - "symfony/css-selector": "2.7.*" + "symfony/css-selector": "~2.8" }, "conflict": { "drupal/drupal": "*" From 4ff0b84157d06a0cf530a39564904c9d7d8bb5f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Perrin?= Date: Fri, 17 Jun 2016 14:09:32 +0200 Subject: [PATCH 005/110] Issue #163: Fix ScriptHandler in conjunction with composer-merge-plugin Closes #164 --- 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 018f6a99c7..714f8a6cdb 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -35,14 +35,14 @@ public static function createRequiredFiles(Event $event) { } // Prepare the settings file for installation - if (!$fs->exists($root . '/sites/default/settings.php')) { + if (!$fs->exists($root . '/sites/default/settings.php') and $fs->exists($root . '/sites/default/default.settings.php')) { $fs->copy($root . '/sites/default/default.settings.php', $root . '/sites/default/settings.php'); $fs->chmod($root . '/sites/default/settings.php', 0666); $event->getIO()->write("Create a sites/default/settings.php file with chmod 0666"); } // Prepare the services file for installation - if (!$fs->exists($root . '/sites/default/services.yml')) { + if (!$fs->exists($root . '/sites/default/services.yml') and $fs->exists($root . '/sites/default/default.services.yml')) { $fs->copy($root . '/sites/default/default.services.yml', $root . '/sites/default/services.yml'); $fs->chmod($root . '/sites/default/services.yml', 0666); $event->getIO()->write("Create a sites/default/services.yml file with chmod 0666"); From 6bc31af558f0fbf2fe2a19ddad4680c894b56490 Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Tue, 21 Jun 2016 15:30:54 -0700 Subject: [PATCH 006/110] Update DrupalConsole version to ~1.0 (#169) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 38e58bd73e..1dac4275a9 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "cweagans/composer-patches": "~1.0", "drupal/core": "~8.0", "drush/drush": "~8.0", - "drupal/console": "~0.10" + "drupal/console": "~1.0" }, "require-dev": { "behat/mink": "~1.7", From 2f7941b8f85b064012d7e41e3e8f284d373c8ca0 Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Sun, 26 Jun 2016 12:09:22 +0200 Subject: [PATCH 007/110] Check the Composer version before downloading the dependencies (#170) --- composer.json | 6 ++++++ scripts/composer/ScriptHandler.php | 32 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/composer.json b/composer.json index 1dac4275a9..18c7aad053 100644 --- a/composer.json +++ b/composer.json @@ -44,6 +44,12 @@ }, "scripts": { "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", + "pre-install-cmd": [ + "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" + ], + "pre-update-cmd": [ + "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" + ], "post-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" ], diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index 714f8a6cdb..7cff6a0aa3 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -8,6 +8,7 @@ namespace DrupalProject\composer; use Composer\Script\Event; +use Composer\Semver\Comparator; use Symfony\Component\Filesystem\Filesystem; class ScriptHandler { @@ -57,4 +58,35 @@ public static function createRequiredFiles(Event $event) { } } + /** + * Checks if the installed version of Composer is compatible. + * + * Composer 1.0.0 and higher consider a `composer install` without having a + * lock file present as equal to `composer update`. We do not ship with a lock + * file to avoid merge conflicts downstream, meaning that if a project is + * installed with an older version of Composer the scaffolding of Drupal will + * not be triggered. We check this here instead of in drupal-scaffold to be + * able to give immediate feedback to the end user, rather than failing the + * installation after going through the lengthy process of compiling and + * downloading the Composer dependencies. + * + * @see https://github.com/composer/composer/pull/5035 + */ + public static function checkComposerVersion(Event $event) { + $composer = $event->getComposer(); + $io = $event->getIO(); + + $version = $composer::VERSION; + + // If Composer is installed through git we have no easy way to determine if + // it is new enough, just display a warning. + if ($version === '@package_version@') { + $io->writeError('You are running a development version of Composer. If you experience problems, please update Composer to the latest stable version.'); + } + elseif (Comparator::lessThan($version, '1.0.0')) { + $io->writeError('Drupal-project requires Composer version 1.0.0 or higher. Please update your Composer before continuing.'); + exit(1); + } + } + } From cd8d63512d0d249d69a9aaa6f5606195ff248e69 Mon Sep 17 00:00:00 2001 From: hussainweb Date: Fri, 15 Jul 2016 16:50:43 +0530 Subject: [PATCH 008/110] Fix whitespace in composer.json and ScriptHandler (#177) --- composer.json | 2 +- drush/policy.drush.inc | 1 - scripts/composer/ScriptHandler.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 18c7aad053..7348bedba3 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "drupal/console": "~1.0" }, "require-dev": { - "behat/mink": "~1.7", + "behat/mink": "~1.7", "behat/mink-goutte-driver": "~1.2", "jcalderonzumba/gastonjs": "~1.0.2", "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", diff --git a/drush/policy.drush.inc b/drush/policy.drush.inc index 6a1242e5de..64cd62d0f6 100644 --- a/drush/policy.drush.inc +++ b/drush/policy.drush.inc @@ -36,4 +36,3 @@ function policy_drush_help_alter(&$command) { $command['options']['pm-force'] = 'Override site policy and allow Drush codebase management (pm-* commands)'; } } - diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index 7cff6a0aa3..aa0e91ccb2 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -14,7 +14,7 @@ class ScriptHandler { protected static function getDrupalRoot($project_root) { - return $project_root . '/web'; + return $project_root . '/web'; } public static function createRequiredFiles(Event $event) { From e4c56cc340629930d9b20577b34bd08ed451ca02 Mon Sep 17 00:00:00 2001 From: Markus Orenstrat Date: Tue, 19 Jul 2016 11:07:13 +0200 Subject: [PATCH 009/110] Improve documentation for Drupal Core updates (#181) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09c369b6bd..c4bc89da12 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`. +1. Run `composer update drupal/core --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 716df2539fa1996d5d8f0622f4959eb30c4b6eec Mon Sep 17 00:00:00 2001 From: Iain Houston Date: Sat, 20 Feb 2016 14:03:28 +0000 Subject: [PATCH 010/110] Configure install destination for third-party libraries Fixes #113 #182 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 7348bedba3..3ed57aee3d 100644 --- a/composer.json +++ b/composer.json @@ -63,6 +63,7 @@ "web/modules/contrib/{$name}": ["type:drupal-module"], "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], + "web/sites/all/libraries/{$name}": ["type:drupal-library"], "drush/contrib/{$name}": ["type:drupal-drush"] } } From 1b0065990c8c3e9a828f848eb90368131e9f0462 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 21 Jul 2016 16:31:22 +0200 Subject: [PATCH 011/110] Use web/libraries instead of web/sites/all/libraries --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3ed57aee3d..0d1f3a5ddf 100644 --- a/composer.json +++ b/composer.json @@ -60,10 +60,10 @@ "extra": { "installer-paths": { "web/core": ["type:drupal-core"], + "web/libraries/{$name}": ["type:drupal-library"], "web/modules/contrib/{$name}": ["type:drupal-module"], "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], - "web/sites/all/libraries/{$name}": ["type:drupal-library"], "drush/contrib/{$name}": ["type:drupal-drush"] } } From d76ee6a182d18d6e8ebd6b7cb82ff572f202445a Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 30 Aug 2016 13:55:18 +0200 Subject: [PATCH 012/110] Test #189 --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 069f1a6288..96ad4d7f2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,13 +11,14 @@ env: - SIMPLETEST_DB=sqlite://tmp/site.sqlite - SIMPLETEST_BASE_URL="http://127.0.0.1:8080" matrix: - - RELEASE=stable - - RELEASE=dev + - RELEASE=stable,COMPOSER_CHANNEL=stable + - RELEASE=dev,COMPOSER_CHANNEL=stable + - 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 - - composer --verbose self-update + - composer --verbose self-update --$COMPOSER_CHANNEL - composer --version install: From 6066fc222a6f4d3f64789d554db7971c3ec7702c Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 30 Aug 2016 15:12:41 +0200 Subject: [PATCH 013/110] Update .travis.yml --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96ad4d7f2e..defcabf7e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,9 @@ env: - SIMPLETEST_DB=sqlite://tmp/site.sqlite - SIMPLETEST_BASE_URL="http://127.0.0.1:8080" matrix: - - RELEASE=stable,COMPOSER_CHANNEL=stable - - RELEASE=dev,COMPOSER_CHANNEL=stable - - RELEASE=stable,COMPOSER_CHANNEL=snapshot + - RELEASE=stable COMPOSER_CHANNEL=stable + - RELEASE=dev COMPOSER_CHANNEL=stable + - RELEASE=stable COMPOSER_CHANNEL=snapshot before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini From 37ab405265a566fee9fe6c20b26dc212f7f8ae6c Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 30 Aug 2016 23:03:39 +0200 Subject: [PATCH 014/110] Fix --- .travis.yml | 1 + scripts/composer/ScriptHandler.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index defcabf7e9..dde56d01f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ script: - ./../vendor/bin/drush runserver http://127.0.0.1:8080 & - sleep 3 # 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 - ./../vendor/bin/drush - ./../vendor/bin/drupal diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index aa0e91ccb2..02d0f96f02 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -78,9 +78,15 @@ public static function checkComposerVersion(Event $event) { $version = $composer::VERSION; + // The dev-channel of composer uses the git revision as version number, + // try to the branch alias instead. + if (preg_match('/^[0-9a-f]{40}$/i', $version)) { + $version = $composer::BRANCH_ALIAS_VERSION; + } + // If Composer is installed through git we have no easy way to determine if // it is new enough, just display a warning. - if ($version === '@package_version@') { + if ($version === '@package_version@' || $version === '@package_branch_alias_version@') { $io->writeError('You are running a development version of Composer. If you experience problems, please update Composer to the latest stable version.'); } elseif (Comparator::lessThan($version, '1.0.0')) { From fa2377d10b8d2f5b3c0b8b080032bbbf43eca2b9 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 30 Aug 2016 23:04:36 +0200 Subject: [PATCH 015/110] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dde56d01f7..23d89b6f17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,6 @@ script: - sleep 3 # 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 + - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,PageCache - ./../vendor/bin/drush - ./../vendor/bin/drupal From 6789a34d49cd03ec29ae28507a5165c1f35421d7 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Sat, 24 Sep 2016 19:24:19 +0200 Subject: [PATCH 016/110] #192: Update README with a new link (#195) --- drush/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drush/README.md b/drush/README.md index 8c85c145d6..9d7bd397ad 100644 --- a/drush/README.md +++ b/drush/README.md @@ -1 +1 @@ -This directory contains commands, configuration and site aliases for Drush. See http://packages.drush.org/ for a directory of Drush commands installable via Composer. +This directory contains commands, configuration and site aliases for Drush. See https://packagist.org/search/?type=drupal-drush for a directory of Drush commands installable via Composer. From f322b89edbcac73135494c09600952ae327ed829 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 1 Oct 2016 15:49:27 +0100 Subject: [PATCH 017/110] Disable DI unit test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 23d89b6f17..bc487a3361 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,6 @@ script: - sleep 3 # 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,PageCache + - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache - ./../vendor/bin/drush - ./../vendor/bin/drupal From 49184d678ff0de7f0cda0b597a7b170c6e5261e6 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 4 Oct 2016 17:30:09 +0200 Subject: [PATCH 018/110] Use packages.drupal.org repository (#159) Closes #204 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0d1f3a5ddf..96adea8eb9 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "repositories": [ { "type": "composer", - "url": "https://packagist.drupal-composer.org" + "url": "https://packages.drupal.org/8" } ], "require": { From f6099e3597d82691e16364ab5a5b7edd05d8bf5c Mon Sep 17 00:00:00 2001 From: keopx Date: Wed, 12 Oct 2016 10:48:04 +0200 Subject: [PATCH 019/110] Update README.md composer require command (#206) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4bc89da12..00758d2f8e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ installation. ``` cd some-dir -composer require drupal/devel:8.* +composer require drupal/devel:~1.0 ``` The `composer create-project` command passes ownership of all files to the From 90cfaf4cae2c735477535168b92c6d5f9e283f91 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 5 Nov 2016 11:55:07 +0100 Subject: [PATCH 020/110] Ignore SimpleTest multi-site environment (#208) --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 452fb82aa6..c0bceed5fa 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,8 @@ web/profiles/contrib # Ignore Drupal's file directory web/sites/*/files +# Ignore SimpleTest multi-site environment. +web/sites/simpletest + # Ignore files generated by PhpStorm .idea From 7e329fa6a815a77cfd41194110154fb0305a76f0 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 5 Nov 2016 12:03:25 +0100 Subject: [PATCH 021/110] Update composer/installers and drupal-composer/drupal-scaffold --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 96adea8eb9..c2f7fd5f94 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ } ], "require": { - "composer/installers": "^1.0.20", - "drupal-composer/drupal-scaffold": "^2.0.1", + "composer/installers": "^1.2", + "drupal-composer/drupal-scaffold": "^2.2", "cweagans/composer-patches": "~1.0", "drupal/core": "~8.0", "drush/drush": "~8.0", From 923e8bc41af176f8dcb99fb37a1ba8349258b59e Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Sun, 6 Nov 2016 00:09:36 +0100 Subject: [PATCH 022/110] Add FAQ section about scaffolding files to README.md (#216) --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 00758d2f8e..183b44d454 100644 --- a/README.md +++ b/README.md @@ -83,11 +83,32 @@ that the generated `composer.json` might differ from this project's file. ## FAQ -### Should I commit the contrib modules I download +### Should I commit the contrib modules I download? 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? + +The [drupal-scaffold](https://github.com/drupal-composer/drupal-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 +achieve that by registering `@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", + ... + ], + "post-update-cmd": [ + "@drupal-scaffold", + ... + ] +}, +``` ### How can I apply patches to downloaded modules? If you need to apply patches (depending on the project being modified, a pull From 3b9ee0d3a1c9363d53fc6da4111701269496e9ca Mon Sep 17 00:00:00 2001 From: Joris Steyn Date: Fri, 18 Nov 2016 23:35:12 +0100 Subject: [PATCH 023/110] Minor README improvement: embed only valid json (#217) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 183b44d454..9ddaa63fb6 100644 --- a/README.md +++ b/README.md @@ -101,11 +101,11 @@ achieve that by registering `@drupal-scaffold` as post-install and post-update c "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", "post-install-cmd": [ "@drupal-scaffold", - ... + "..." ], "post-update-cmd": [ "@drupal-scaffold", - ... + "..." ] }, ``` From 543f8e2ae524d26c09bbb3c7f6d7d1d4d5e5d24d Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Date: Sat, 3 Dec 2016 10:55:35 +0000 Subject: [PATCH 024/110] Update paths in .gitignore (#210) --- .gitignore | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index c0bceed5fa..00ab92e352 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,16 @@ # Ignore directories generated by Composer -drush/contrib -vendor -web/core -web/modules/contrib -web/themes/contrib -web/profiles/contrib +/drush/contrib/ +/vendor/ +/web/core/ +/web/modules/contrib/ +/web/themes/contrib/ +/web/profiles/contrib/ # Ignore Drupal's file directory -web/sites/*/files +/web/sites/*/files/ # Ignore SimpleTest multi-site environment. web/sites/simpletest # Ignore files generated by PhpStorm -.idea +/.idea/ From 32e24edbd8c705f09426d5d9d10321eea9aea11d Mon Sep 17 00:00:00 2001 From: Markus Orenstrat Date: Mon, 9 Jan 2017 16:30:04 +0100 Subject: [PATCH 025/110] Add FAQ regarding switch to packages.drupal.org (#231) --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 9ddaa63fb6..cc8debe098 100644 --- a/README.md +++ b/README.md @@ -126,3 +126,6 @@ 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). From f0e44774513488ee15d46d17830e371a99e8cb78 Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Thu, 12 Jan 2017 12:18:21 +0300 Subject: [PATCH 026/110] Ignore libraries directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 00ab92e352..3ec84506f5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /web/modules/contrib/ /web/themes/contrib/ /web/profiles/contrib/ +/web/libraries/ # Ignore Drupal's file directory /web/sites/*/files/ From a271d50e329428529e85f473db3a55c8f5514a7e Mon Sep 17 00:00:00 2001 From: Hendy Irawan Date: Wed, 15 Feb 2017 05:06:17 +0700 Subject: [PATCH 027/110] Ignore web/sites/*/settings.php and web/sites/*/settings.local.php by default (#178) --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 3ec84506f5..525e303be0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,10 @@ /web/profiles/contrib/ /web/libraries/ +# Ignore sensitive information +web/sites/*/settings.php +web/sites/*/settings.local.php + # Ignore Drupal's file directory /web/sites/*/files/ From 7d94b4d322a9625bc5b151bdac0557ed64526492 Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Mon, 6 Mar 2017 16:43:26 +0100 Subject: [PATCH 028/110] Prefix paths with a slash (#245) --- .gitignore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 525e303be0..cf18fe4b20 100644 --- a/.gitignore +++ b/.gitignore @@ -8,14 +8,14 @@ /web/libraries/ # Ignore sensitive information -web/sites/*/settings.php -web/sites/*/settings.local.php +/web/sites/*/settings.php +/web/sites/*/settings.local.php # Ignore Drupal's file directory /web/sites/*/files/ # Ignore SimpleTest multi-site environment. -web/sites/simpletest +/web/sites/simpletest # Ignore files generated by PhpStorm /.idea/ From d8ff15c1fc8090e0281af569f8d0216a4c1c25a6 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Fri, 17 Mar 2017 10:35:49 +0100 Subject: [PATCH 029/110] Update dev dependencies (SA-CORE-2017-001) https://www.drupal.org/SA-2017-001 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c2f7fd5f94..03fbbe81f6 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,8 @@ "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", + "mikey179/vfsstream": "~1.2", + "phpunit/phpunit": ">=4.8.28 <5", "symfony/css-selector": "~2.8" }, "conflict": { From 71ed7c43539e6154397b513dbad5e51bcdf73088 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 22 Mar 2017 12:54:25 +0100 Subject: [PATCH 030/110] Fix typo in README.md Fixes #251 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc8debe098..a6cb5984a7 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ When installing the given `composer.json` some tasks are taken care of: * Theme (packages of type `drupal-theme`) will be placed in `web/themes/contrib/` * Profiles (packages of type `drupal-profile`) will be placed in `web/profiles/contrib/` * Creates default writable versions of `settings.php` and `services.yml`. -* Creates `sites/default/files`-directory. +* 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`. From 217e4a5f583c1d0d21f72e4fa8926d2a897d1ff4 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 22 Mar 2017 18:04:14 +0100 Subject: [PATCH 031/110] Add PHP 7.1 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index bc487a3361..63f94930d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 sudo: false From 38bd0cf12465162c62ad04550474c91ec9414a24 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 22 Mar 2017 20:01:59 +0100 Subject: [PATCH 032/110] Run tests with 8.3.x (#256) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 63f94930d0..69aee58f94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: - composer --verbose install script: - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.1.x-dev; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.3.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 041e1983984c6d294cf8d3fe0261494795908a27 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 23 Mar 2017 11:32:34 +0100 Subject: [PATCH 033/110] Sort packages by name in composer.json --- composer.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 03fbbe81f6..31ca743404 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,11 @@ ], "require": { "composer/installers": "^1.2", + "cweagans/composer-patches": "^1.6", "drupal-composer/drupal-scaffold": "^2.2", - "cweagans/composer-patches": "~1.0", + "drupal/console": "~1.0", "drupal/core": "~8.0", - "drush/drush": "~8.0", - "drupal/console": "~1.0" + "drush/drush": "~8.0" }, "require-dev": { "behat/mink": "~1.7", @@ -37,6 +37,9 @@ }, "minimum-stability": "dev", "prefer-stable": true, + "config": { + "sort-packages": true + }, "autoload": { "classmap": [ "scripts/composer/ScriptHandler.php" From 2f45db31d471922f8f8d798ee6a3965c95c1d4e8 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 22 Mar 2017 12:10:55 +0100 Subject: [PATCH 034/110] Store site configuration outside of the docroot --- scripts/composer/ScriptHandler.php | 35 ++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index 02d0f96f02..afbeeaf56c 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -10,6 +10,7 @@ use Composer\Script\Event; use Composer\Semver\Comparator; use Symfony\Component\Filesystem\Filesystem; +use Webmozart\PathUtil\Path; class ScriptHandler { @@ -19,7 +20,8 @@ protected static function getDrupalRoot($project_root) { public static function createRequiredFiles(Event $event) { $fs = new Filesystem(); - $root = static::getDrupalRoot(getcwd()); + $projectRoot = getcwd(); + $drupalRoot = static::getDrupalRoot($projectRoot); $dirs = [ 'modules', @@ -29,30 +31,39 @@ public static function createRequiredFiles(Event $event) { // Required for unit testing foreach ($dirs as $dir) { - if (!$fs->exists($root . '/'. $dir)) { - $fs->mkdir($root . '/'. $dir); - $fs->touch($root . '/'. $dir . '/.gitkeep'); + if (!$fs->exists($drupalRoot . '/'. $dir)) { + $fs->mkdir($drupalRoot . '/'. $dir); + $fs->touch($drupalRoot . '/'. $dir . '/.gitkeep'); } } // Prepare the settings file for installation - if (!$fs->exists($root . '/sites/default/settings.php') and $fs->exists($root . '/sites/default/default.settings.php')) { - $fs->copy($root . '/sites/default/default.settings.php', $root . '/sites/default/settings.php'); - $fs->chmod($root . '/sites/default/settings.php', 0666); + if (!$fs->exists($drupalRoot . '/sites/default/settings.php') and $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'; + $settings['config_directories'] = [ + CONFIG_SYNC_DIRECTORY => (object) [ + 'value' => Path::makeRelative($projectRoot . '/config/sync', $drupalRoot), + 'required' => TRUE, + ], + ]; + 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"); } // Prepare the services file for installation - if (!$fs->exists($root . '/sites/default/services.yml') and $fs->exists($root . '/sites/default/default.services.yml')) { - $fs->copy($root . '/sites/default/default.services.yml', $root . '/sites/default/services.yml'); - $fs->chmod($root . '/sites/default/services.yml', 0666); + if (!$fs->exists($drupalRoot . '/sites/default/services.yml') and $fs->exists($drupalRoot . '/sites/default/default.services.yml')) { + $fs->copy($drupalRoot . '/sites/default/default.services.yml', $drupalRoot . '/sites/default/services.yml'); + $fs->chmod($drupalRoot . '/sites/default/services.yml', 0666); $event->getIO()->write("Create a sites/default/services.yml file with chmod 0666"); } // Create the files directory with chmod 0777 - if (!$fs->exists($root . '/sites/default/files')) { + if (!$fs->exists($drupalRoot . '/sites/default/files')) { $oldmask = umask(0); - $fs->mkdir($root . '/sites/default/files', 0777); + $fs->mkdir($drupalRoot . '/sites/default/files', 0777); umask($oldmask); $event->getIO()->write("Create a sites/default/files directory with chmod 0777"); } From 2d09cf7be3f8549ec4bb054558096e09b7cd041e Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 22 Mar 2017 12:48:49 +0100 Subject: [PATCH 035/110] Remove ScriptHandler::getDrupalRoot retrieve the data from composer metadata (via DrupalFinder) --- composer.json | 4 +++- scripts/composer/ScriptHandler.php | 12 +++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 31ca743404..dc8692956c 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,9 @@ "drupal-composer/drupal-scaffold": "^2.2", "drupal/console": "~1.0", "drupal/core": "~8.0", - "drush/drush": "~8.0" + "drush/drush": "~8.0", + "webflo/drupal-finder": "^0.2.1", + "webmozart/path-util": "^2.3" }, "require-dev": { "behat/mink": "~1.7", diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index afbeeaf56c..7eab2a17da 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -9,19 +9,17 @@ use Composer\Script\Event; use Composer\Semver\Comparator; +use DrupalFinder\DrupalFinder; use Symfony\Component\Filesystem\Filesystem; use Webmozart\PathUtil\Path; class ScriptHandler { - protected static function getDrupalRoot($project_root) { - return $project_root . '/web'; - } - public static function createRequiredFiles(Event $event) { $fs = new Filesystem(); - $projectRoot = getcwd(); - $drupalRoot = static::getDrupalRoot($projectRoot); + $drupalFinder = new DrupalFinder(); + $drupalFinder->locateRoot(getcwd()); + $drupalRoot = $drupalFinder->getDrupalRoot(); $dirs = [ 'modules', @@ -44,7 +42,7 @@ public static function createRequiredFiles(Event $event) { require_once $drupalRoot . '/core/includes/install.inc'; $settings['config_directories'] = [ CONFIG_SYNC_DIRECTORY => (object) [ - 'value' => Path::makeRelative($projectRoot . '/config/sync', $drupalRoot), + 'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot), 'required' => TRUE, ], ]; From ec0a8ced59b7f47d68787ddc4361230c313dcbb9 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 6 Apr 2017 19:24:20 +0200 Subject: [PATCH 036/110] Run tests with 8.4.x-dev --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 69aee58f94..083d9e3de1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: - composer --verbose install script: - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.3.x-dev; 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 c3cc32161adba046eda1f81fbb19be4390301d53 Mon Sep 17 00:00:00 2001 From: Mikko Rantanen Date: Wed, 19 Apr 2017 21:57:56 +0300 Subject: [PATCH 037/110] Do not copy default.services.yml to services.yml by default. (#265) --- scripts/composer/ScriptHandler.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index 7eab2a17da..a75e4d34ee 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -51,13 +51,6 @@ public static function createRequiredFiles(Event $event) { $event->getIO()->write("Create a sites/default/settings.php file with chmod 0666"); } - // Prepare the services file for installation - if (!$fs->exists($drupalRoot . '/sites/default/services.yml') and $fs->exists($drupalRoot . '/sites/default/default.services.yml')) { - $fs->copy($drupalRoot . '/sites/default/default.services.yml', $drupalRoot . '/sites/default/services.yml'); - $fs->chmod($drupalRoot . '/sites/default/services.yml', 0666); - $event->getIO()->write("Create a sites/default/services.yml file with chmod 0666"); - } - // Create the files directory with chmod 0777 if (!$fs->exists($drupalRoot . '/sites/default/files')) { $oldmask = umask(0); From ab3a8a12da46589de2d225522a158e3ad4dd0fb3 Mon Sep 17 00:00:00 2001 From: John VanDyk Date: Mon, 1 May 2017 04:39:30 -0500 Subject: [PATCH 038/110] Fix typo in README.md (#267) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a6cb5984a7..eb1a71823c 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ 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 modfied files are updated in a +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. From b4ee2c3fac708a304c3e4cd458595250555f42ab Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 3 May 2017 08:47:45 +0200 Subject: [PATCH 039/110] Update to drush 9 for 8.4.x --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 083d9e3de1..0ff7c7b475 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,8 @@ install: - composer --verbose install script: - - 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.4.x-dev drush/drush:^9.0.0; fi; + - if [[ $RELEASE = dev ]]; then composer --verbose remove drupal/console; 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 d69ab799919ede364abe94648a45413cd9811298 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 3 May 2017 09:03:04 +0200 Subject: [PATCH 040/110] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0ff7c7b475..c3d9788f5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: - composer --verbose install script: - - if [[ $RELEASE = dev ]]; then composer --verbose require --no-update drupal/core:8.4.x-dev drush/drush:^9.0.0; 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 remove drupal/console; fi; - if [[ $RELEASE = dev ]]; then composer --verbose update; fi; - cd $TRAVIS_BUILD_DIR/web From 7c4601271e8572eea84cc44c0477809f5a5eae18 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 3 May 2017 09:54:04 +0200 Subject: [PATCH 041/110] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c3d9788f5e..886de934e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,8 +26,8 @@ install: - composer --verbose install script: - - 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 remove 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 d7c66d7002d3e5ed5bcce7e713abd198bd8d6543 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Wed, 3 May 2017 14:59:29 +0200 Subject: [PATCH 042/110] Update .travis.yml --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 886de934e0..87c1be1cfc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: php + php: - 5.5 - 5.6 @@ -7,6 +8,11 @@ php: sudo: false +addons: + apt: + packages: + - libssl1.0.0 + env: global: - SIMPLETEST_DB=sqlite://tmp/site.sqlite From 5ddc582e7d0980437901fe48f31793b323cba739 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 4 May 2017 16:42:06 +0200 Subject: [PATCH 043/110] Remove 5.5 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 87c1be1cfc..4e1a21ba3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.5 - 5.6 - 7.0 - 7.1 From c34d83b49850d940c20d3b8303e9e5ce055486b6 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 6 May 2017 00:55:38 +0200 Subject: [PATCH 044/110] Add remove --no-update --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e1a21ba3d..4ea5efa0ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ install: - composer --verbose install script: - - if [[ $RELEASE = dev ]]; then composer --verbose remove drupal/console; fi; + - 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 @@ -42,4 +42,4 @@ script: # Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673 - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache - ./../vendor/bin/drush - - ./../vendor/bin/drupal + - if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi; - ./../vendor/bin/drupal From 31c3987932b7feb201232085baf97aa1a155edd7 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 6 May 2017 01:01:43 +0200 Subject: [PATCH 045/110] Fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4ea5efa0ff..ab95103890 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,4 +42,4 @@ script: # Ignore PageCache group temporarily, @see https://www.drupal.org/node/2770673 - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache - ./../vendor/bin/drush - - if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi; - ./../vendor/bin/drupal + - if [[ $RELEASE = stable ]]; then ./../vendor/bin/drupal; fi; From 2086ab52159c1242148b775a0f179cb55bd4316a Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 6 May 2017 01:24:58 +0200 Subject: [PATCH 046/110] Use trusty as build env --- .travis.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab95103890..35b81f37cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,12 @@ language: php +dist: trusty +sudo: false php: - 5.6 - 7.0 - 7.1 -sudo: false - -addons: - apt: - packages: - - libssl1.0.0 - env: global: - SIMPLETEST_DB=sqlite://tmp/site.sqlite From abe6d55eae94cb0680df691e92e671f8fc74e350 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sat, 6 May 2017 01:26:39 +0200 Subject: [PATCH 047/110] Replace sleep with until --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 35b81f37cd..5477b6e6b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,8 +31,8 @@ script: - 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 http://127.0.0.1:8080 & - - sleep 3 + - ./../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 - ./../vendor/bin/phpunit -c core --testsuite unit --exclude-group Composer,DependencyInjection,PageCache From 4df8a592db3740a164f74a2036b42ea6b2b61e52 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 9 May 2017 09:28:27 +0200 Subject: [PATCH 048/110] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dc8692956c..28023b44a4 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.2.1", + "webflo/drupal-finder": "^0.3.0", "webmozart/path-util": "^2.3" }, "require-dev": { From 171449ea92ea365d421af0960f10b01ba99b5626 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 22 Jun 2017 17:10:51 +0200 Subject: [PATCH 049/110] 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 050/110] 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 051/110] 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 052/110] 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 053/110] 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 054/110] 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 055/110] 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 056/110] 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 057/110] 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 058/110] 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 059/110] 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 060/110] 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 061/110] 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 062/110] 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 063/110] 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 064/110] 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 065/110] 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 066/110] 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 067/110] 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 068/110] 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 069/110] 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 070/110] 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 071/110] 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 072/110] 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 073/110] 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 074/110] 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 075/110] 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 076/110] 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 077/110] 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 078/110] 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 079/110] 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 080/110] 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 081/110] 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 082/110] 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 083/110] 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 084/110] 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 085/110] 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 086/110] 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 087/110] 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 088/110] 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 089/110] 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 090/110] 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 091/110] 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 092/110] 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 093/110] 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 094/110] 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 095/110] 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 096/110] 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 097/110] 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 098/110] 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 099/110] 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 100/110] 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 101/110] 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 102/110] 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 103/110] 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 104/110] 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 105/110] 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 106/110] 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 107/110] 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 108/110] 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 109/110] 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 110/110] 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);