From 74b17f0ea043d1b92d5bd329ac323e6348cb5f67 Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Thu, 14 Apr 2022 16:11:49 +0100 Subject: [PATCH 01/11] Require Drupal 10 --- composer.json | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 2bfdcbb..56b4369 100644 --- a/composer.json +++ b/composer.json @@ -4,29 +4,33 @@ "type": "project", "license": "GPL-2.0-or-later", "homepage": "https://github.com/localgovdrupal/localgov_project", - "repositories": [ - { + "repositories": { + "lenient": { + "type": "composer", + "url": "https://packages.drupal.org/lenient" + }, + "drupal": { "type": "composer", "url": "https://packages.drupal.org/8" } - ], + }, "require": { "composer/installers": "^1.10", "cweagans/composer-patches": "^1.6", - "drupal/core-composer-scaffold": "^9.1", - "drupal/core-project-message": "^9.1", - "drupal/core-recommended": "^9.1", - "localgovdrupal/localgov": "^2.0" + "drupal/core-composer-scaffold": "^10.0.0-alpha3", + "drupal/core-project-message": "^10.0.0-alpha3", + "drupal/core-recommended": "^10.0.0-alpha3", + "localgovdrupal/localgov": "3.x" }, "require-dev": { "brianium/paratest": "^6.0", "drupal/coder": "^8.3", "drupal/config_inspector": "^1.3", - "drupal/core-dev": "^9.1", - "mglaman/phpstan-drupal": "^0.12", + "drupal/core-dev": "^10.0.0-alpha3", + "mglaman/phpstan-drupal": "^1.0", "phpspec/prophecy-phpunit": "^2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-deprecation-rules": "^1.0", "squizlabs/php_codesniffer": "^3.6" }, "conflict": { From b321035288879387ec70c2f6a4a6eefd8fc21da6 Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Thu, 14 Apr 2022 16:37:05 +0100 Subject: [PATCH 02/11] Lando changes for Drupal 10 --- .lando.dist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.lando.dist.yml b/.lando.dist.yml index 4a597df..1985cd6 100644 --- a/.lando.dist.yml +++ b/.lando.dist.yml @@ -1,9 +1,9 @@ name: localgov -recipe: drupal8 +recipe: drupal10 config: xdebug: false webroot: web - php: '7.4' + php: '8.1' proxy: mailhog: - mail.localgov.lndo.site From f28814b2cfba48405934027f318d2034a819621a Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Thu, 14 Apr 2022 16:37:18 +0100 Subject: [PATCH 03/11] Composer fixes for Drupal 10 dependencies --- composer.json | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 56b4369..1a84ce6 100644 --- a/composer.json +++ b/composer.json @@ -18,20 +18,16 @@ "composer/installers": "^1.10", "cweagans/composer-patches": "^1.6", "drupal/core-composer-scaffold": "^10.0.0-alpha3", - "drupal/core-project-message": "^10.0.0-alpha3", "drupal/core-recommended": "^10.0.0-alpha3", "localgovdrupal/localgov": "3.x" }, "require-dev": { - "brianium/paratest": "^6.0", - "drupal/coder": "^8.3", - "drupal/config_inspector": "^1.3", + "brianium/paratest": "^6.4", + "drupal/code": "^3.0@alpha", "drupal/core-dev": "^10.0.0-alpha3", - "mglaman/phpstan-drupal": "^1.0", - "phpspec/prophecy-phpunit": "^2", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-deprecation-rules": "^1.0", - "squizlabs/php_codesniffer": "^3.6" + "mglaman/phpstan-drupal": "^1.1", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-deprecation-rules": "^1.0" }, "conflict": { "drupal/drupal": "*" @@ -40,7 +36,14 @@ "prefer-stable": true, "config": { "sort-packages": true, - "bin-dir": "bin/" + "bin-dir": "bin/", + "allow-plugins": { + "composer/installers": true, + "cweagans/composer-patches": true, + "drupal/core-composer-scaffold": true, + "phpstan/extension-installer": true, + "dealerdirect/phpcodesniffer-composer-installer": true + } }, "extra": { "enable-patching": true, @@ -88,4 +91,3 @@ } } - From da0fbbde3892aaf2934c8b4a34f4d463e8c85300 Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Thu, 5 Jan 2023 13:47:35 +0000 Subject: [PATCH 04/11] Fixes for Drupal 10 support --- composer.json | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/composer.json b/composer.json index 1a84ce6..5b6218a 100644 --- a/composer.json +++ b/composer.json @@ -5,9 +5,31 @@ "license": "GPL-2.0-or-later", "homepage": "https://github.com/localgovdrupal/localgov_project", "repositories": { - "lenient": { - "type": "composer", - "url": "https://packages.drupal.org/lenient" + "drupal/date_recur_modular": { + "type": "package", + "package": { + "name": "drupal/date_recur_modular", + "type": "drupal-module", + "version": "3.x-dev", + "source": { + "type": "git", + "url": "git@git.drupal.org:issue/date_recur_modular-3296930.git", + "reference": "6ea45215b83b79e78849d9af7a8abd4745a8fb7e" + } + } + }, + "drupal/preview_link": { + "type": "package", + "package": { + "name": "drupal/preview_link", + "type": "drupal-module", + "version": "dev-3325259-d10", + "source": { + "type": "git", + "url": "git@git.drupal.org:issue/preview_link-3325259.git", + "reference": "ded9cb9de4fefa288479ff8b5f9c36cbe53afac9" + } + } }, "drupal": { "type": "composer", @@ -17,14 +39,13 @@ "require": { "composer/installers": "^1.10", "cweagans/composer-patches": "^1.6", - "drupal/core-composer-scaffold": "^10.0.0-alpha3", - "drupal/core-recommended": "^10.0.0-alpha3", + "drupal/core-composer-scaffold": "^10.0", + "drupal/core-recommended": "^10.0", "localgovdrupal/localgov": "3.x" }, "require-dev": { "brianium/paratest": "^6.4", - "drupal/code": "^3.0@alpha", - "drupal/core-dev": "^10.0.0-alpha3", + "drupal/core-dev": "^10.0", "mglaman/phpstan-drupal": "^1.1", "phpstan/phpstan": "^1.5", "phpstan/phpstan-deprecation-rules": "^1.0" @@ -74,19 +95,6 @@ "drush/Commands/contrib/{$name}": ["type:drupal-drush"], "web/modules/custom/{$name}": ["type:drupal-custom-module"], "web/themes/custom/{$name}": ["type:drupal-custom-theme"] - }, - "drupal-core-project-message": { - "post-create-project-cmd-message": [ - " ", - " Congratulations, you’ve installed the LocalGov Drupal codebase ", - " ", - "", - "Next steps:", - - " * Install the site: https://www.drupal.org/docs/8/install", - " * Remove the plugin that prints this message:", - " composer remove drupal/core-project-message" - ] } } From 6362ff34fda939a116d36ad46dc6dd05d2690fb9 Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Wed, 25 Jan 2023 21:33:44 +0000 Subject: [PATCH 05/11] Use HTTPS rather than Git URLs for Drupal Composer repos --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1ae01cd..820b6a5 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "version": "3.x-dev", "source": { "type": "git", - "url": "git@git.drupal.org:issue/date_recur_modular-3296930.git", + "url": "https://git.drupalcode.org/issue/date_recur_modular-3296930", "reference": "6ea45215b83b79e78849d9af7a8abd4745a8fb7e" } } @@ -26,7 +26,7 @@ "version": "dev-3325259-d10", "source": { "type": "git", - "url": "git@git.drupal.org:issue/preview_link-3325259.git", + "url": "https://git.drupal.org/issue/preview_link-3325259.git", "reference": "ded9cb9de4fefa288479ff8b5f9c36cbe53afac9" } } From 1e2221c7d076f9a43f1cb35c2ae3e2aa8dab124a Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Wed, 25 Jan 2023 21:37:41 +0000 Subject: [PATCH 06/11] Enable drupal/core-project-message Composer plugin --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 820b6a5..8f3a655 100644 --- a/composer.json +++ b/composer.json @@ -66,6 +66,7 @@ "composer/installers": true, "cweagans/composer-patches": true, "drupal/core-composer-scaffold": true, + "drupal/core-project-message": true, "phpstan/extension-installer": true, "dealerdirect/phpcodesniffer-composer-installer": true } From eb18837a71c73e6046389fedad17caf4a066f2cb Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Wed, 25 Jan 2023 21:50:08 +0000 Subject: [PATCH 07/11] Remove includes from PHPStan config as they're no longer required --- phpstan.neon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 021caa8..d4a500a 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,6 +7,6 @@ parameters: - '#Plugin definitions cannot be altered.#' - '#Missing cache backend declaration for performance.#' - '#Plugin manager has cache backend specified but does not declare cache tags.#' -includes: - - vendor/mglaman/phpstan-drupal/extension.neon - - vendor/phpstan/phpstan-deprecation-rules/rules.neon +#includes: +# - vendor/mglaman/phpstan-drupal/extension.neon +# - vendor/phpstan/phpstan-deprecation-rules/rules.neon From 206048ff86da6dc25d8784e2b103e5b1630767ff Mon Sep 17 00:00:00 2001 From: Finn Lewis Date: Fri, 16 Jun 2023 12:40:23 +0000 Subject: [PATCH 08/11] Add ddev commands for phpcs, phpstan etc --- .ddev/commands/web/phix | 7 +++++++ .ddev/commands/web/phpcs | 7 +++++++ .ddev/commands/web/phpstan | 7 +++++++ .ddev/commands/web/phpunit | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100755 .ddev/commands/web/phix create mode 100755 .ddev/commands/web/phpcs create mode 100755 .ddev/commands/web/phpstan create mode 100755 .ddev/commands/web/phpunit diff --git a/.ddev/commands/web/phix b/.ddev/commands/web/phix new file mode 100755 index 0000000..0332dc1 --- /dev/null +++ b/.ddev/commands/web/phix @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +## Description: Run phpcbf to automatically fix some phpcs errors. +## Usage: phix +## Example: "ddev phix" + +/var/www/html/bin/phpcbf diff --git a/.ddev/commands/web/phpcs b/.ddev/commands/web/phpcs new file mode 100755 index 0000000..ddf15bb --- /dev/null +++ b/.ddev/commands/web/phpcs @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +## Description: Run phpcs in the web container. +## Usage: phpcs +## Example: "ddev phpcs" + +/var/www/html/bin/phpcs -p \ No newline at end of file diff --git a/.ddev/commands/web/phpstan b/.ddev/commands/web/phpstan new file mode 100755 index 0000000..0c89908 --- /dev/null +++ b/.ddev/commands/web/phpstan @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +## Description: Run PHPSTAN to report on code deprecations. +## Usage: phpix +## Example: "ddev phix" + +/var/www/html/bin/phpstan \ No newline at end of file diff --git a/.ddev/commands/web/phpunit b/.ddev/commands/web/phpunit new file mode 100755 index 0000000..5f4ad3b --- /dev/null +++ b/.ddev/commands/web/phpunit @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +## Description: Run phpunit in the web container to run phpunit tests. +## Usage: phpunit +## Example: "ddev phpunit" + +/var/www/html/bin/phpunit \ No newline at end of file From 835599bf7def32e2b01193abe27583c771082019 Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Wed, 5 Jul 2023 15:58:42 +0100 Subject: [PATCH 09/11] Run tests against 3.x branch --- .github/workflows/test.yml | 40 +++++++++++++++++++++++++------------- composer.json | 2 +- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e2b08b..34df00e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,10 +6,10 @@ name: Test localgovdrupal/localgov-project project on: push: branches: - - '2.x' + - '3.x' pull_request: branches: - - '2.x' + - '3.x' schedule: - cron: "0 7 * * *" @@ -26,9 +26,12 @@ jobs: strategy: fail-fast: false matrix: - localgov-version: ["2.x"] - drupal-version: ["~9.1"] - php-version: ["7.4","8.1"] + localgov-version: + - '3.x' + drupal-version: + - '~10.0' + php-version: + - '8.1' steps: @@ -82,9 +85,12 @@ jobs: strategy: fail-fast: false matrix: - localgov-version: ["2.x"] - drupal-version: ["~9.1"] - php-version: ["7.4","8.1"] + localgov-version: + - '3.x' + drupal-version: + - '~10.0' + php-version: + - '8.1' steps: @@ -114,9 +120,12 @@ jobs: strategy: fail-fast: false matrix: - localgov-version: ["2.x"] - drupal-version: ["~9.1"] - php-version: ["7.4","8.1"] + localgov-version: + - '3.x' + drupal-version: + - '~10.0' + php-version: + - '8.1' steps: @@ -145,9 +154,12 @@ jobs: strategy: fail-fast: false matrix: - localgov-version: ["2.x"] - drupal-version: ["~9.1"] - php-version: ["7.4","8.1"] + localgov-version: + - '3.x' + drupal-version: + - '~10.0' + php-version: + - '8.1' steps: diff --git a/composer.json b/composer.json index 1aeaab0..395f9c5 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "brianium/paratest": "^6.0", "drupal/coder": "^8.3", "drupal/core-dev": "^10.0", - "mglaman/phpstan-drupal": "^1.0", + "mglaman/phpstan-drupal": "1.1.34", "phpspec/prophecy-phpunit": "^2", "phpstan/phpstan": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0", From e24e67a9c5b38d22ed0ec2def9fd7957d5becdeb Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Thu, 6 Jul 2023 15:07:51 +0100 Subject: [PATCH 10/11] Use 3.x-dev until 3.0.0-alpha release --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ad8532b..bb0e267 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "cweagans/composer-patches": "^1.6", "drupal/core-composer-scaffold": "^10.0", "drupal/core-recommended": "^10.0", - "localgovdrupal/localgov": "^3.0@alpha", + "localgovdrupal/localgov": "3.x-dev", "localgovdrupal/localgov_search_solr": "^1.1" }, "require-dev": { From 8e91d2720c50d06d4c2e2756fbb0e5b0e34c6f54 Mon Sep 17 00:00:00 2001 From: Stephen Cox Date: Mon, 24 Jul 2023 15:29:03 +0100 Subject: [PATCH 11/11] Use alpha version of profile --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index bb0e267..210a472 100644 --- a/composer.json +++ b/composer.json @@ -15,14 +15,14 @@ "cweagans/composer-patches": "^1.6", "drupal/core-composer-scaffold": "^10.0", "drupal/core-recommended": "^10.0", - "localgovdrupal/localgov": "3.x-dev", + "localgovdrupal/localgov": "^3.0@alpha", "localgovdrupal/localgov_search_solr": "^1.1" }, "require-dev": { "brianium/paratest": "^6.0", "drupal/coder": "^8.3", "drupal/core-dev": "^10.0", - "mglaman/phpstan-drupal": "1.1.34", + "mglaman/phpstan-drupal": "^1.0", "phpspec/prophecy-phpunit": "^2", "phpstan/phpstan": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0",