From beaac7ab98ec1956226b71d1a20c567f469fc255 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 15 Apr 2021 20:23:12 +0200 Subject: [PATCH 01/39] Setup ramsalt/drupal-project for Drupal 9 (#18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add Drupal 9 compatible release using a new custom ramsalt scaffolding dependency * Add ramsalt/drupal-scaffold as a dependency * Fix the name of the ramsalt scaffold repository * Don’t ignore /web/sites/*/settings.php, since we do not store sensitive informations. * [CI] Update Action to reflect the new changes Co-authored-by: Marlon (esolitos) Saglia --- .github/workflows/ci.yml | 10 ++++++---- .gitignore | 1 - composer.json | 27 ++++++++++++++++++--------- composer.patches.json | 3 +++ 4 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 composer.patches.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 435662706d..2dd88eed50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,8 @@ env: COMPOSER_MEMORY_LIMIT: -1 SIMPLETEST_DB: sqlite://tmp/site.sqlite SIMPLETEST_BASE_URL: "http://127.0.0.1:8080" + COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} + WODBY_ENVIRONMENT_TYPE: CI jobs: build: @@ -51,10 +53,10 @@ jobs: run: composer --verbose install - if: matrix.drupal-release == 'dev' - run: composer --verbose require --no-update drupal/core-recommended:9.2.x-dev && composer --verbose require --no-update --dev drupal/core-dev:9.2.x-dev - - - if: matrix.drupal-release == 'dev' - run: composer --verbose update + run: | + composer --verbose require --no-update drupal/core-recommended:9.2.x-dev + composer --verbose require --no-update --dev drupal/core-dev:9.2.x-dev + composer --verbose update - run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite diff --git a/.gitignore b/.gitignore index 12ad63d871..596dbbe545 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ /web/libraries/ # Ignore sensitive information -/web/sites/*/settings.php /web/sites/*/settings.local.php # Ignore Drupal's file directory diff --git a/composer.json b/composer.json index 1e5828add3..f0d3b2a060 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,25 @@ { - "name": "drupal-composer/drupal-project", + "name": "ramsalt/drupal-project", "description": "Project template for Drupal 9 projects with Composer", "type": "project", "license": "GPL-2.0-or-later", "authors": [ { - "name": "", + "name": "Marlon ", "role": "" - } - ], - "repositories": [ + }, { - "type": "composer", - "url": "https://packages.drupal.org/8" + "name": "Stephan ", + "role": "" } ], + "repositories": { + "private-packagist": { + "type": "composer", + "url": "https://repo.packagist.com/ramsalt/" + }, + "packagist.org": false + }, "require": { "php": ">=7.3", "composer/installers": "^1.9", @@ -22,6 +27,7 @@ "drupal/core-composer-scaffold": "^9.1", "drupal/core-recommended": "^9.1", "drush/drush": "^10.3", + "ramsalt/drupal-scaffold": "*", "vlucas/phpdotenv": "^5.1", "webflo/drupal-finder": "^1.2" }, @@ -60,6 +66,9 @@ }, "extra": { "drupal-scaffold": { + "allowed-packages": [ + "ramsalt/drupal-scaffold" + ], "locations": { "web-root": "web/" } @@ -76,7 +85,7 @@ "patchLevel": { "drupal/core": "-p2" }, - "patches": { - } + "enable-patching": true, + "patches-file": "composer.patches.json" } } diff --git a/composer.patches.json b/composer.patches.json new file mode 100644 index 0000000000..4b3fa6f391 --- /dev/null +++ b/composer.patches.json @@ -0,0 +1,3 @@ +{ + "patches": {} +} From 7216bcb818a1734cc1cf9edcf3f6b41876370189 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Fri, 16 Apr 2021 09:29:35 +0200 Subject: [PATCH 02/39] Show the correct package name in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 93c66aea64..8bb272ea26 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ for your setup. After that you can create the project: ``` -composer create-project drupal-composer/drupal-project:9.x-dev some-dir --no-interaction +composer create-project ramsalt/drupal-project:9.x-dev some-dir --no-interaction ``` With `composer require ...` you can download new dependencies to your From e155239cafe27679b93d3db81843f94bcbbba519 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Fri, 16 Apr 2021 09:30:25 +0200 Subject: [PATCH 03/39] Make the testing badge use the Ramsalt repository --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bb272ea26..92777e2809 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Composer template for Drupal projects -[![CI](https://github.com/drupal-composer/drupal-project/actions/workflows/ci.yml/badge.svg?branch=9.x)](https://github.com/drupal-composer/drupal-project/actions/workflows/ci.yml) +[![CI](https://github.com/ramsalt/drupal-project/actions/workflows/ci.yml/badge.svg?branch=9.x)](https://github.com/ramsalt/drupal-project/actions/workflows/ci.yml) This project template provides a starter kit for managing your site dependencies with [Composer](https://getcomposer.org/). From 4005e590827c14848b039189f9cf7639383d75a6 Mon Sep 17 00:00:00 2001 From: "Marlon (Esolitos) Saglia" Date: Mon, 31 May 2021 15:54:54 +0200 Subject: [PATCH 04/39] Require Composer 2+ (#19) --- 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 51026d38a1..c5b5f88a56 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -91,8 +91,8 @@ public static function checkComposerVersion(Event $event) { 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')) { - $io->writeError('Drupal-project requires Composer version 1.0.0 or higher. Please update your Composer before continuing.'); + elseif (Comparator::lessThan($version, '2.0.0')) { + $io->writeError('Drupal-project requires Composer version 2.0.0 or higher. Please update your Composer before continuing.'); exit(1); } } From 2bdc88a43e1b2764552e4a07b6b24ab0d78ecb31 Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Fri, 24 Sep 2021 08:30:32 +0200 Subject: [PATCH 05/39] Add composer-installers-extender (#20) composer-installers-extender is required for ramsaltmedia type modules to be installed, let's add it --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index f0d3b2a060..b3752e96da 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "require": { "php": ">=7.3", "composer/installers": "^1.9", + "oomphinc/composer-installers-extender": "^2.0", "cweagans/composer-patches": "^1.7", "drupal/core-composer-scaffold": "^9.1", "drupal/core-recommended": "^9.1", From 6fc3fe8e0f7bd9b0cb6df2d3ffae2ff4ae85ddf4 Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Wed, 29 Sep 2021 12:00:50 +0330 Subject: [PATCH 06/39] `development.services.yml` override to false Set the `development.services.yml` to not to be overridden by default --- composer.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/composer.json b/composer.json index b3752e96da..6273a1d585 100644 --- a/composer.json +++ b/composer.json @@ -72,8 +72,15 @@ ], "locations": { "web-root": "web/" + }, + "file-mapping": { + "[web-root]/sites/development.services.yml": { + "mode": "replace", + "path": "web/core/assets/scaffold/files/development.services.yml", + "overwrite": false } }, + }, "installer-paths": { "web/core": ["type:drupal-core"], "web/libraries/{$name}": ["type:drupal-library"], From 93b09c7f862a3f58db79bc5de9225424f8d3de70 Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Wed, 29 Sep 2021 12:02:40 +0330 Subject: [PATCH 07/39] Add ramsalt drupal-scaffold as allowed packages --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6273a1d585..cc9feb5719 100644 --- a/composer.json +++ b/composer.json @@ -78,7 +78,8 @@ "mode": "replace", "path": "web/core/assets/scaffold/files/development.services.yml", "overwrite": false - } + }, + "allowed-packages": ["ramsalt/drupal-scaffold"] }, }, "installer-paths": { From ab7815537c6ffc34fea5145924f2d81a49ac18db Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Wed, 29 Sep 2021 12:05:08 +0330 Subject: [PATCH 08/39] typo fix --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cc9feb5719..d632167f34 100644 --- a/composer.json +++ b/composer.json @@ -80,7 +80,7 @@ "overwrite": false }, "allowed-packages": ["ramsalt/drupal-scaffold"] - }, + } }, "installer-paths": { "web/core": ["type:drupal-core"], From 3648878866fa5c7e83104f78da7d1a18ce274aab Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Fri, 11 Feb 2022 12:15:45 +0330 Subject: [PATCH 09/39] ci(deploy): Add Ramsalt related installer types and paths To support Ramsalt themes and modules --- composer.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/composer.json b/composer.json index b3752e96da..c42a1d9114 100644 --- a/composer.json +++ b/composer.json @@ -66,6 +66,17 @@ ] }, "extra": { + "installer-types": ["bower-asset", "npm-asset", "ramsaltmedia-module", "ramsaltmedia-theme"], + "installer-paths": { + "web/core": ["type:drupal-core"], + "web/libraries/{$name}": ["type:drupal-library", "type:bower-asset", "type:npm-asset"], + "web/modules/contrib/{$name}": ["type:drupal-module"], + "web/modules/ramsaltmedia/{$name}": ["type:ramsaltmedia-module"], + "web/profiles/contrib/{$name}": ["type:drupal-profile"], + "web/themes/contrib/{$name}": ["type:drupal-theme"], + "web/themes/ramsaltmedia/{$name}": ["type:ramsaltmedia-theme"], + "drush/contrib/{$name}": ["type:drupal-drush"] + }, "drupal-scaffold": { "allowed-packages": [ "ramsalt/drupal-scaffold" From 40c2dcf37c5541b7a9eb7cddc99c1cd80a2e7f40 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Fri, 11 Feb 2022 13:55:53 +0100 Subject: [PATCH 10/39] Bring back accidentally removed ramsalt/drupal-scaffold package --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 0de87b64fa..3e8f5910ca 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ "drupal/core-composer-scaffold": "^9.3", "drupal/core-recommended": "^9.3", "drush/drush": "^10.6", + "ramsalt/drupal-scaffold": "*", "vlucas/phpdotenv": "^5.1", "webflo/drupal-finder": "^1.2" }, From 7b0d4c5454c560988253af5a3bfdb751c83553d5 Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Fri, 11 Feb 2022 17:28:49 +0330 Subject: [PATCH 11/39] feat(composer): Exclude development.services.yml file from override Also remove the duplicate ramsalt drupal-scaffold --- composer.json | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index d632167f34..b7286bacbc 100644 --- a/composer.json +++ b/composer.json @@ -21,20 +21,19 @@ "packagist.org": false }, "require": { - "php": ">=7.3", + "php": ">=7.4", "composer/installers": "^1.9", "oomphinc/composer-installers-extender": "^2.0", "cweagans/composer-patches": "^1.7", - "drupal/core-composer-scaffold": "^9.1", - "drupal/core-recommended": "^9.1", - "drush/drush": "^10.3", + "drupal/core-composer-scaffold": "^9.3", + "drupal/core-recommended": "^9.3", + "drush/drush": "^10.6", "ramsalt/drupal-scaffold": "*", "vlucas/phpdotenv": "^5.1", "webflo/drupal-finder": "^1.2" }, "require-dev": { - "drupal/core-dev": "^9.1", - "zaporylie/composer-drupal-optimizations": "^1.2" + "drupal/core-dev": "^9.3" }, "conflict": { "drupal/drupal": "*" @@ -43,7 +42,12 @@ "prefer-stable": true, "config": { "discard-changes": true, - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "composer/installers": true, + "cweagans/composer-patches": true, + "drupal/core-composer-scaffold": true + } }, "autoload": { "classmap": [ @@ -74,12 +78,11 @@ "web-root": "web/" }, "file-mapping": { - "[web-root]/sites/development.services.yml": { - "mode": "replace", - "path": "web/core/assets/scaffold/files/development.services.yml", - "overwrite": false - }, - "allowed-packages": ["ramsalt/drupal-scaffold"] + "[web-root]/sites/development.services.yml": { + "mode": "replace", + "path": "web/core/assets/scaffold/files/development.services.yml", + "overwrite": false + } } }, "installer-paths": { From 89a8c6d2f905f28dc9a43b9f2b8b5e5b0fbf8172 Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Fri, 11 Feb 2022 18:15:22 +0330 Subject: [PATCH 12/39] Remove the duplicate installer-paths --- composer.json | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index c42a1d9114..27134c5c0b 100644 --- a/composer.json +++ b/composer.json @@ -21,20 +21,19 @@ "packagist.org": false }, "require": { - "php": ">=7.3", + "php": ">=7.4", "composer/installers": "^1.9", "oomphinc/composer-installers-extender": "^2.0", "cweagans/composer-patches": "^1.7", - "drupal/core-composer-scaffold": "^9.1", - "drupal/core-recommended": "^9.1", - "drush/drush": "^10.3", + "drupal/core-composer-scaffold": "^9.3", + "drupal/core-recommended": "^9.3", + "drush/drush": "^10.6", "ramsalt/drupal-scaffold": "*", "vlucas/phpdotenv": "^5.1", "webflo/drupal-finder": "^1.2" }, "require-dev": { - "drupal/core-dev": "^9.1", - "zaporylie/composer-drupal-optimizations": "^1.2" + "drupal/core-dev": "^9.3" }, "conflict": { "drupal/drupal": "*" @@ -43,7 +42,12 @@ "prefer-stable": true, "config": { "discard-changes": true, - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "composer/installers": true, + "cweagans/composer-patches": true, + "drupal/core-composer-scaffold": true + } }, "autoload": { "classmap": [ @@ -85,14 +89,6 @@ "web-root": "web/" } }, - "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"], - "drush/Commands/contrib/{$name}": ["type:drupal-drush"] - }, "composer-exit-on-patch-failure": true, "patchLevel": { "drupal/core": "-p2" From f13f2510b84e307f421f08d0312433dc0396fa85 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Fri, 1 Jul 2022 10:16:33 +0200 Subject: [PATCH 13/39] Bump to Drupal 9.4 # Conflicts: # composer.json --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 65d815911d..d06cc94f05 100644 --- a/composer.json +++ b/composer.json @@ -25,15 +25,15 @@ "composer/installers": "^1.9", "oomphinc/composer-installers-extender": "^2.0", "cweagans/composer-patches": "^1.7", - "drupal/core-composer-scaffold": "^9.3", - "drupal/core-recommended": "^9.3", - "drush/drush": "^10.6", + "drupal/core-composer-scaffold": "^9.4", + "drupal/core-recommended": "^9.4", + "drush/drush": "^11.0", "ramsalt/drupal-scaffold": "*", "vlucas/phpdotenv": "^5.1", "webflo/drupal-finder": "^1.2" }, "require-dev": { - "drupal/core-dev": "^9.3" + "drupal/core-dev": "^9.4" }, "conflict": { "drupal/drupal": "*" From 9fd621a3fd9e549721f9b6bfd1b7185031b4ecfc Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Fri, 1 Jul 2022 10:18:13 +0200 Subject: [PATCH 14/39] Allow dealerdirect/phpcodesniffer-composer-installer by default --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d06cc94f05..9db3267171 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,8 @@ "allow-plugins": { "composer/installers": true, "cweagans/composer-patches": true, - "drupal/core-composer-scaffold": true + "drupal/core-composer-scaffold": true, + "dealerdirect/phpcodesniffer-composer-installer": true } }, "autoload": { From d83d4f96734af6560b2d0c77de0c9df162195021 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Fri, 1 Jul 2022 10:20:19 +0200 Subject: [PATCH 15/39] Test PHP 7.4 and 8.1 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b730b6f282..c8043ad973 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,14 +15,14 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0'] + php-versions: ['7.4', '8.1'] drupal-release: ['stable'] composer-channel: ['stable'] include: - - php-versions: '8.0' + - php-versions: '8.1' drupal-release: dev composer-channel: stable - - php-versions: '8.0' + - php-versions: '8.1' drupal-release: stable composer-channel: snapshot steps: @@ -66,7 +66,7 @@ jobs: # https://www.drupal.org/project/drupal/issues/3182653 # https://www.drupal.org/node/3176567 - - if: ${{ matrix.php-versions == '7.4' }} || ${{ matrix.php-versions == '8.0' }} + - if: ${{ matrix.php-versions == '7.4' }} || ${{ matrix.php-versions == '8.1' }} run: composer require phpspec/prophecy-phpunit:^2 - name: Run a single unit test to verfiy the testing setup. From 81ce9df6a26a1fc78144c52eb1c6bcc15936d6f1 Mon Sep 17 00:00:00 2001 From: Vincent Leduc Date: Wed, 6 Jul 2022 07:49:21 -0400 Subject: [PATCH 16/39] Update php requirements in README.md php 7.4 is minimum required version of php with respect to Drupal 9.4 and drush 11. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92777e2809..d83d331c67 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ section of composer.json: ### How do I specify a PHP version ? -This project supports PHP 7.3 as minimum version (see [Environment requirements of Drupal 9](https://www.drupal.org/docs/understanding-drupal/how-drupal-9-was-made-and-what-is-included/environment-requirements-of)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7.3+. +This project supports PHP 7.4 as minimum version (see Drupal 9.4 [PHP requirements](https://www.drupal.org/docs/system-requirements/php-requirements#versions)) and [Drop official PHP 7.3 support in Drupal 9.4](https://www.drupal.org/project/drupal/issues/2917655), however it's possible that a `composer update` will upgrade some package that will then require PHP 7.4+. To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`: @@ -131,7 +131,7 @@ To prevent this you can add this code to specify the PHP version you want to use "config": { "sort-packages": true, "platform": { - "php": "7.3.19" + "php": "7.4.30" } }, ``` From cfdc8378f76c55b8648963589507f743371e8a82 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Tue, 18 Oct 2022 11:10:24 +0200 Subject: [PATCH 17/39] Allow oomphinc/composer-installers-extender composer plugin --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9db3267171..5e159d9276 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,8 @@ "composer/installers": true, "cweagans/composer-patches": true, "drupal/core-composer-scaffold": true, - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "oomphinc/composer-installers-extender": true } }, "autoload": { From ccc8d4ef16a7134631adbcc236b10ce7dba494c9 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Tue, 21 Feb 2023 15:12:26 +0100 Subject: [PATCH 18/39] Add COMPOSER_AUTH environment variable --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6bf0c73b8..c95e86ca0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,12 +48,18 @@ jobs: run: composer --verbose validate - name: Install dependencies + env: + COMPOSER_AUTH: '{"http-basic": {"repo.packagist.com": {"username": "token", "password": "${{secrets.COMPOSER_AUTH}}"}}}' run: composer --verbose install - if: matrix.drupal-release == 'dev' + env: + COMPOSER_AUTH: '{"http-basic": {"repo.packagist.com": {"username": "token", "password": "${{secrets.COMPOSER_AUTH}}"}}}' run: composer --verbose require --no-update drupal/core-recommended:10.0.x-dev && composer --verbose require --no-update --dev drupal/core-dev:10.0.x-dev - if: matrix.drupal-release == 'dev' + env: + COMPOSER_AUTH: '{"http-basic": {"repo.packagist.com": {"username": "token", "password": "${{secrets.COMPOSER_AUTH}}"}}}' run: composer --verbose update - run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From 286bfcb43a4dfc446a4b1338f556dbb90dfe7c8c Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 23 Mar 2023 12:49:12 +0100 Subject: [PATCH 19/39] Merge pull request #25 from ramsalt/remove-phpunit.xml.dist Remove phpunit.xml.dist to be able to let it be scaffolded from another package --- phpunit.xml.dist | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 phpunit.xml.dist diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index ce29746d7c..0000000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - ./test/ - - - From c8c0325d1c604d95a76a8886f02f2be9185a9980 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 23 Mar 2023 12:53:39 +0100 Subject: [PATCH 20/39] Use JSON stirng for COMPOSER_AUTH environment variable --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c95e86ca0d..80989a2de3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: - if: matrix.drupal-release == 'dev' env: - COMPOSER_AUTH: '{"http-basic": {"repo.packagist.com": {"username": "token", "password": "${{secrets.COMPOSER_AUTH}}"}}}' + COMPOSER_AUTH: '${{secrets.COMPOSER_AUTH}}' run: composer --verbose require --no-update drupal/core-recommended:10.0.x-dev && composer --verbose require --no-update --dev drupal/core-dev:10.0.x-dev - if: matrix.drupal-release == 'dev' From e01ffa28f79cb0ca5f32816d43eaf77d82584a24 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 23 Mar 2023 12:55:24 +0100 Subject: [PATCH 21/39] Use JSON string for COMPOSER_AUTH environment variable --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80989a2de3..e73a4beee7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,12 +49,12 @@ jobs: - name: Install dependencies env: - COMPOSER_AUTH: '{"http-basic": {"repo.packagist.com": {"username": "token", "password": "${{secrets.COMPOSER_AUTH}}"}}}' + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} run: composer --verbose install - if: matrix.drupal-release == 'dev' env: - COMPOSER_AUTH: '${{secrets.COMPOSER_AUTH}}' + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} run: composer --verbose require --no-update drupal/core-recommended:10.0.x-dev && composer --verbose require --no-update --dev drupal/core-dev:10.0.x-dev - if: matrix.drupal-release == 'dev' From 869b1447695da9d6544865405ab0ad0349839e49 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 23 Mar 2023 12:57:53 +0100 Subject: [PATCH 22/39] Use JSON string for COMPOSER_AUTH environment variable --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e73a4beee7..e63f6d48ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: - if: matrix.drupal-release == 'dev' env: - COMPOSER_AUTH: '{"http-basic": {"repo.packagist.com": {"username": "token", "password": "${{secrets.COMPOSER_AUTH}}"}}}' + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} run: composer --verbose update - run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From 72cdb5799343b468c306b24ca6d3e1f6feb1c0f9 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 23 Mar 2023 13:05:17 +0100 Subject: [PATCH 23/39] Revert "Merge pull request #25 from ramsalt/remove-phpunit.xml.dist" This reverts commit f31713f9303ff5e4915c93585541172ffd1805df, reversing changes made to cfdc8378f76c55b8648963589507f743371e8a82. --- phpunit.xml.dist | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 phpunit.xml.dist diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000000..ce29746d7c --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,15 @@ + + + + + + ./test/ + + + From 4776aceffc997c41fa261db3b90daffca48a53da Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 23 Mar 2023 18:46:04 +0100 Subject: [PATCH 24/39] Use global environment variable COMPOSER_AUTH for the whole job --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e63f6d48ca..9b38b06003 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: [push] env: COMPOSER_MEMORY_LIMIT: -1 + COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} SIMPLETEST_DB: sqlite://tmp/site.sqlite SIMPLETEST_BASE_URL: "http://127.0.0.1:8080" @@ -48,18 +49,12 @@ jobs: run: composer --verbose validate - name: Install dependencies - env: - COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} run: composer --verbose install - if: matrix.drupal-release == 'dev' - env: - COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} run: composer --verbose require --no-update drupal/core-recommended:10.0.x-dev && composer --verbose require --no-update --dev drupal/core-dev:10.0.x-dev - if: matrix.drupal-release == 'dev' - env: - COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} run: composer --verbose update - run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite From 1cef8f672ed255e2fcdc982e9873adfb45241ff6 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 23 Mar 2023 18:51:13 +0100 Subject: [PATCH 25/39] Disable the Symfony deprecation helpers --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b38b06003..2352a2dbd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: [push] env: COMPOSER_MEMORY_LIMIT: -1 COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} + SYMFONY_DEPRECATIONS_HELPER: 'disabled=1' SIMPLETEST_DB: sqlite://tmp/site.sqlite SIMPLETEST_BASE_URL: "http://127.0.0.1:8080" From c393ce2ebf2a7421e15262ab65a261a71a902d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Fauske?= Date: Mon, 9 Oct 2023 09:30:19 +0200 Subject: [PATCH 26/39] For central logging, make sure drupal/monolog is available --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 5d7cec107d..8e19b1a0e4 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "cweagans/composer-patches": "^1.7", "drupal/core-composer-scaffold": "^10.0.0", "drupal/core-recommended": "^10.0.0", + "drupal/monolog": "^3.0", "drush/drush": "^11.4.0", "oomphinc/composer-installers-extender": "^2.0", "ramsalt/drupal-scaffold": "*", From 316c7cbb1cbd4c9725a72bd024fc0075460345de Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Thu, 21 Dec 2023 11:49:27 +0330 Subject: [PATCH 27/39] Upgrade Drush to 12 due to Drupal 10.2 requirements with Drupal 10.2, the minimum requirement for Drush is 12.4.3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8e19b1a0e4..1900a0aec8 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "drupal/core-composer-scaffold": "^10.0.0", "drupal/core-recommended": "^10.0.0", "drupal/monolog": "^3.0", - "drush/drush": "^11.4.0", + "drush/drush": "^12.0", "oomphinc/composer-installers-extender": "^2.0", "ramsalt/drupal-scaffold": "*", "vlucas/phpdotenv": "^5.1", From 3ab70617393c7da8a1a2592bd112897929245403 Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Fri, 22 Dec 2023 12:09:35 +0330 Subject: [PATCH 28/39] Update ci.yml to use php82 Following up on https://github.com/ramsalt/drupal-project/pull/30, bumping the php version accordingly here as well --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2352a2dbd7..a6060eb321 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,10 @@ jobs: drupal-release: ['stable'] composer-channel: ['stable'] include: - - php-versions: '8.1' + - php-versions: '8.2' drupal-release: dev composer-channel: stable - - php-versions: '8.1' + - php-versions: '8.2' drupal-release: stable composer-channel: snapshot steps: From c055141e9e57e55338705b85530c9d73db4da5b0 Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Fri, 22 Dec 2023 12:13:01 +0330 Subject: [PATCH 29/39] Update the missing version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6060eb321..af182d933e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.1'] + php-versions: ['8.2'] drupal-release: ['stable'] composer-channel: ['stable'] include: From 35855d5de372e26d8ac929b7b29ee9ad58b9caf7 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Fri, 26 Apr 2024 12:33:48 +0200 Subject: [PATCH 30/39] Whitelist new Drupal 10 composer plugin This package includes a composer plugin and would otherwise create warnings when the package gets installed. --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 1900a0aec8..fcf5d801c1 100644 --- a/composer.json +++ b/composer.json @@ -49,6 +49,7 @@ "cweagans/composer-patches": true, "drupal/core-composer-scaffold": true, "dealerdirect/phpcodesniffer-composer-installer": true, + "php-http/discovery": true, "phpstan/extension-installer": true, "oomphinc/composer-installers-extender": true } From 5e1ed1af9135f0996733e57c006aa9370bb4f69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aljo=C5=A1a=20Furlani=C4=8D?= <51315716+joco-sp@users.noreply.github.com> Date: Fri, 5 Jan 2024 21:31:01 +0100 Subject: [PATCH 31/39] Increased drush version to 12.4.3 (#631) # Conflicts: # composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fcf5d801c1..fd0aeae275 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "drupal/core-composer-scaffold": "^10.0.0", "drupal/core-recommended": "^10.0.0", "drupal/monolog": "^3.0", - "drush/drush": "^12.0", + "drush/drush": "^12.4.3", "oomphinc/composer-installers-extender": "^2.0", "ramsalt/drupal-scaffold": "*", "vlucas/phpdotenv": "^5.1", From 8e7684c926fd639de9c7e163d4c800fe930522e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20Ka=CC=88mper-Leymann?= Date: Sat, 6 Jan 2024 02:26:35 +0100 Subject: [PATCH 32/39] Bump to Drupal 10.2 # Conflicts: # composer.json --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index fd0aeae275..38e5b9c817 100644 --- a/composer.json +++ b/composer.json @@ -24,8 +24,8 @@ "php": ">=8.1", "composer/installers": "^2.1", "cweagans/composer-patches": "^1.7", - "drupal/core-composer-scaffold": "^10.0.0", - "drupal/core-recommended": "^10.0.0", + "drupal/core-composer-scaffold": "^10.2.0", + "drupal/core-recommended": "^10.2.0", "drupal/monolog": "^3.0", "drush/drush": "^12.4.3", "oomphinc/composer-installers-extender": "^2.0", @@ -34,7 +34,7 @@ "webflo/drupal-finder": "^1.2" }, "require-dev": { - "drupal/core-dev": "^10.0.0" + "drupal/core-dev": "^10.2.0" }, "conflict": { "drupal/drupal": "*" From 2765f1ab68246b26534ee2e982746eec53df162d Mon Sep 17 00:00:00 2001 From: Jesper Noordsij <45041769+jnoordsij@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:56:58 +0100 Subject: [PATCH 33/39] Replace Drush annotations with attributes (#633) --- drush/Commands/PolicyCommands.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drush/Commands/PolicyCommands.php b/drush/Commands/PolicyCommands.php index 290b4e0331..790bbeb210 100644 --- a/drush/Commands/PolicyCommands.php +++ b/drush/Commands/PolicyCommands.php @@ -3,6 +3,10 @@ namespace Drush\Commands; use Consolidation\AnnotatedCommand\CommandData; +use Consolidation\AnnotatedCommand\Hooks\HookManager; +use Drush\Attributes\Hook; +use Drush\Commands\core\RsyncCommands; +use Drush\Commands\sql\SqlSyncCommands; /** * Edit this file to reflect your organization's needs. @@ -13,10 +17,9 @@ class PolicyCommands extends DrushCommands { * Prevent catastrophic braino. Note that this file has to be local to the * machine that initiates the sql:sync command. * - * @hook validate sql:sync - * * @throws \Exception */ + #[Hook(type: HookManager::ARGUMENT_VALIDATOR, target: SqlSyncCommands::SYNC)] public function sqlSyncValidate(CommandData $commandData) { if ($commandData->input()->getArgument('target') == '@prod') { throw new \Exception(dt('Per !file, you may never overwrite the production database.', ['!file' => __FILE__])); @@ -26,10 +29,9 @@ public function sqlSyncValidate(CommandData $commandData) { /** * Limit rsync operations to production site. * - * @hook validate core:rsync - * * @throws \Exception */ + #[Hook(type: HookManager::ARGUMENT_VALIDATOR, target: RsyncCommands::RSYNC)] public function rsyncValidate(CommandData $commandData) { 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 e84d40b7228ce1170a0a80305b6270deb5855483 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 29 Feb 2024 09:50:47 +1100 Subject: [PATCH 34/39] Updated deprecated drupal_rewrite_settings() in ScriptHandler.php. (#634) --- scripts/composer/ScriptHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index 55ee27982c..2441788172 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -10,6 +10,7 @@ use Composer\Script\Event; use Composer\Semver\Comparator; use Drupal\Core\Site\Settings; +use Drupal\Core\Site\SettingsEditor; use DrupalFinder\DrupalFinder; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Path; @@ -46,7 +47,7 @@ public static function createRequiredFiles(Event $event) { 'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot), 'required' => TRUE, ]; - drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php'); + SettingsEditor::rewrite($drupalRoot . '/sites/default/settings.php', $settings); $fs->chmod($drupalRoot . '/sites/default/settings.php', 0666); $event->getIO()->write("Created a sites/default/settings.php file with chmod 0666"); } From 14364510f39400877d96fdebaaf9325be320affa Mon Sep 17 00:00:00 2001 From: Sohail Lajevardi Date: Thu, 21 Dec 2023 11:51:03 +0330 Subject: [PATCH 35/39] Bump php minimum requirement to 8.2 It's a good consideration to start off with php 8.2 with Drupal 10.2 considerations --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1900a0aec8..4b29ed60f9 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "packagist.org": false }, "require": { - "php": ">=8.1", + "php": ">=8.2", "composer/installers": "^2.1", "cweagans/composer-patches": "^1.7", "drupal/core-composer-scaffold": "^10.0.0", From 6235cf4a3953313fcad27fbf29d85dc881a587d7 Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Wed, 29 May 2024 17:53:45 +0200 Subject: [PATCH 36/39] Require PHP >= 8.3 by default New projects should start with PHP 8.3 now. Force people to start with PHP 8.3 now, even though they might need to change the default DDEV PHP version. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 35822f437e..6d9a72250a 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "packagist.org": false }, "require": { - "php": ">=8.2", + "php": ">=8.3", "composer/installers": "^2.1", "cweagans/composer-patches": "^1.7", "drupal/core-composer-scaffold": "^10.2.0", From 625ee224b068e12b34e3766ac9c2daa56ae3422e Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Wed, 29 May 2024 17:56:55 +0200 Subject: [PATCH 37/39] Run CI with PHP 8.3 When we force Composer to use PHP >= we can only run the CI with this versions (or workaround it) --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af182d933e..1853b7008c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,14 +15,14 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.2'] + php-versions: ['8.3'] drupal-release: ['stable'] composer-channel: ['stable'] include: - - php-versions: '8.2' + - php-versions: '8.3' drupal-release: dev composer-channel: stable - - php-versions: '8.2' + - php-versions: '8.3' drupal-release: stable composer-channel: snapshot steps: From 6ce6705b9d1199f9dac33f7f86ade2da2b67afdf Mon Sep 17 00:00:00 2001 From: Stephan Zeidler Date: Thu, 13 Jun 2024 10:36:59 +0200 Subject: [PATCH 38/39] Add composer PHP platform config --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 6d9a72250a..074e0b4765 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,9 @@ "minimum-stability": "dev", "prefer-stable": true, "config": { + "platform":{ + "php": "8.3" + }, "discard-changes": true, "sort-packages": true, "allow-plugins": { From 4d5bb57e1307b7de987b6b63b3a476355cb526a6 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Sat, 8 Jun 2024 04:20:18 +0700 Subject: [PATCH 39/39] Use new Drupal Finder API. (#673) --- composer.json | 2 +- scripts/composer/ScriptHandler.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 074e0b4765..4b3025108b 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "oomphinc/composer-installers-extender": "^2.0", "ramsalt/drupal-scaffold": "*", "vlucas/phpdotenv": "^5.1", - "webflo/drupal-finder": "^1.2" + "webflo/drupal-finder": "^1.3" }, "require-dev": { "drupal/core-dev": "^10.2.0" diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index 2441788172..3d3ba626f4 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -12,15 +12,14 @@ use Drupal\Core\Site\Settings; use Drupal\Core\Site\SettingsEditor; use DrupalFinder\DrupalFinder; +use DrupalFinder\DrupalFinderComposerRuntime; use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Filesystem\Path; class ScriptHandler { public static function createRequiredFiles(Event $event) { $fs = new Filesystem(); - $drupalFinder = new DrupalFinder(); - $drupalFinder->locateRoot(getcwd()); + $drupalFinder = new DrupalFinderComposerRuntime(); $drupalRoot = $drupalFinder->getDrupalRoot(); $dirs = [ @@ -44,7 +43,7 @@ public static function createRequiredFiles(Event $event) { require_once $drupalRoot . '/core/includes/install.inc'; new Settings([]); $settings['settings']['config_sync_directory'] = (object) [ - 'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot), + 'value' => '../config/sync', 'required' => TRUE, ]; SettingsEditor::rewrite($drupalRoot . '/sites/default/settings.php', $settings);