From dc7e43819a228fb0f180cbe0a022155fb1289b16 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Tue, 26 Jun 2018 23:19:16 +0200 Subject: [PATCH 01/28] 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 02/28] 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 03/28] 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 04/28] 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 05/28] 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 06/28] 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 07/28] 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 08/28] 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 09/28] 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 10/28] 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 11/28] 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 12/28] 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 13/28] 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 14/28] 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 15/28] 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 16/28] 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 17/28] 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 18/28] 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 19/28] 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 20/28] 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 21/28] 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 22/28] 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 23/28] 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 24/28] 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 25/28] 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 26/28] 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 27/28] 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 28/28] 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);