From b1a68a01935d53fcfafb85de4246e8fa5629a01e Mon Sep 17 00:00:00 2001 From: Lee Mills Date: Thu, 3 Jul 2025 17:44:43 +0100 Subject: [PATCH 1/9] fix: force drupal/facets 2.0 for dev dependencies and testing --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c6196b..e2ac3ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,7 +81,9 @@ jobs: run: composer create-project --stability dev localgovdrupal/localgov-project:${COMPOSER_REF} ./html - name: Obtain all dev dependencies for LocalGov Drupal - run: jq --raw-output '.packages[] | select(.name | startswith("localgovdrupal/")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction + run: | + composer --working-dir=./html require 'drupal/facets:^2.0' + jq --raw-output '.packages[] | select(.name | startswith("localgovdrupal/")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction phpcs: name: Coding standards checks From ce704e93738cad9f2e0e2c24f21c6f6b42638988 Mon Sep 17 00:00:00 2001 From: Finn Date: Thu, 10 Jul 2025 16:28:39 +0100 Subject: [PATCH 2/9] Add default gitlab-ci.yml for drupal.org --- .gitlab-ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e12e584 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,23 @@ +################ +# GitLabCI template for Drupal projects. +################ + +include: + - project: $_GITLAB_TEMPLATES_REPO + ref: $_GITLAB_TEMPLATES_REF + file: + - '/includes/include.drupalci.main.yml' + - '/includes/include.drupalci.variables.yml' + - '/includes/include.drupalci.workflows.yml' +# +################ +# Pipeline configuration variables are defined with default values and descriptions in the file +# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml +################ +variables: + SKIP_CSPELL: "1" + OPT_IN_TEST_MAX_PHP: 1 + OPT_IN_TEST_PREVIOUS_MAJOR: 1 + OPT_IN_TEST_NEXT_MAJOR: 1 + + From 6d463a2582b4fc9724de8d4d6c73a2f5c308a37f Mon Sep 17 00:00:00 2001 From: Lee <8024370+millnut@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:11:18 +0100 Subject: [PATCH 3/9] [3.x] feat: catch xdebug_break() function calls (#217) * feat: catch xdebug_break() function calls * feat: catch any xdebug function calls --------- Co-authored-by: Stephen Cox --- phpstan.neon | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpstan.neon b/phpstan.neon index f3e036c..41bf029 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -19,6 +19,11 @@ parameters: allRules: false strictCalls: true + disallowedFunctionCalls: + - + function: 'xdebug_*()' + message: 'do not include in production code' + # Exclude microsite project submodules from phpstan checks on the main project. excludePaths: - web/modules/contrib/localgov_alert_banner/modules/group_alert_banner/* From dc6d8b8748889e78920d4a0f162e2ddc9374fae0 Mon Sep 17 00:00:00 2001 From: Lee <8024370+millnut@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:11:18 +0100 Subject: [PATCH 4/9] [3.x] feat: catch xdebug_break() function calls (#217) * feat: catch xdebug_break() function calls * feat: catch any xdebug function calls --------- Co-authored-by: Stephen Cox --- phpstan.neon | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpstan.neon b/phpstan.neon index f3e036c..41bf029 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -19,6 +19,11 @@ parameters: allRules: false strictCalls: true + disallowedFunctionCalls: + - + function: 'xdebug_*()' + message: 'do not include in production code' + # Exclude microsite project submodules from phpstan checks on the main project. excludePaths: - web/modules/contrib/localgov_alert_banner/modules/group_alert_banner/* From 0e3bf7b82bd65027d0e8b75b9aa80f47dd993318 Mon Sep 17 00:00:00 2001 From: Finn Date: Thu, 10 Jul 2025 16:28:39 +0100 Subject: [PATCH 5/9] Add default gitlab-ci.yml for drupal.org --- .gitlab-ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e12e584 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,23 @@ +################ +# GitLabCI template for Drupal projects. +################ + +include: + - project: $_GITLAB_TEMPLATES_REPO + ref: $_GITLAB_TEMPLATES_REF + file: + - '/includes/include.drupalci.main.yml' + - '/includes/include.drupalci.variables.yml' + - '/includes/include.drupalci.workflows.yml' +# +################ +# Pipeline configuration variables are defined with default values and descriptions in the file +# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml +################ +variables: + SKIP_CSPELL: "1" + OPT_IN_TEST_MAX_PHP: 1 + OPT_IN_TEST_PREVIOUS_MAJOR: 1 + OPT_IN_TEST_NEXT_MAJOR: 1 + + From 2b3e5a58cedf43476b443a7cf25ef32b838580f9 Mon Sep 17 00:00:00 2001 From: Lee <8024370+millnut@users.noreply.github.com> Date: Tue, 7 Oct 2025 12:11:17 +0100 Subject: [PATCH 6/9] fix: ignore localgov_editoria11y from phpcs testing (#226) --- phpcs.xml.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index f825e96..1bb3bc9 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -17,6 +17,7 @@ web/profiles/contrib/localgov/localgov.info.yml + web/modules/contrib/localgov_editoria11y web/modules/contrib/localgov_utilities From 3025a32df9adc62a352b4b7628b52256a847c9c2 Mon Sep 17 00:00:00 2001 From: Mark Conroy Date: Tue, 21 Oct 2025 12:17:15 +0100 Subject: [PATCH 7/9] Reorder arguments in stylelint-fix command --- .ddev/commands/web/stylelint-fix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ddev/commands/web/stylelint-fix b/.ddev/commands/web/stylelint-fix index 2135e94..4680896 100755 --- a/.ddev/commands/web/stylelint-fix +++ b/.ddev/commands/web/stylelint-fix @@ -4,4 +4,4 @@ ## Usage: stylelint-fix ## Example: "ddev stylelint-fix" -/var/www/html/web/core/node_modules/.bin/stylelint --ignore-path /var/www/html/web/core/.stylelintignore --config /var/www/html/web/core/.stylelintrc.json --fix $* \ No newline at end of file +/var/www/html/web/core/node_modules/.bin/stylelint --ignore-path /var/www/html/web/core/.stylelintignore --config /var/www/html/web/core/.stylelintrc.json $* --fix From f202cbf2a4b30f7f1ad397130d99df4df3dee963 Mon Sep 17 00:00:00 2001 From: Lee Mills Date: Sat, 8 Nov 2025 12:44:17 +0000 Subject: [PATCH 8/9] fix: keep mariadb version for local dev in sync --- .ddev/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 4064769..61d4277 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -10,7 +10,7 @@ additional_hostnames: [] additional_fqdns: [] database: type: mariadb - version: "10.3" + version: "10.6" nfs_mount_enabled: false mutagen_enabled: false use_dns_when_possible: true From c9865f7377d0375678eaeedb6c458682dad2adff Mon Sep 17 00:00:00 2001 From: Finn Lewis Date: Tue, 16 Dec 2025 13:04:12 +0000 Subject: [PATCH 9/9] Update namespace on localgov dependencies to point to drupal.org. (#236) * Update namespace on localgov dependencies to point to drupal.org. * Install dev dependencies starting with drupal/localgov_ * Update dev dependencies in test workflow Replaced 'drupal/facets' dependency with 'drupal/group'. * Run tests with phpunit * Add facets_form dependency to LocalGov Drupal * Update PHPUnit command to use Paratest --------- Co-authored-by: Stephen Cox --- .github/workflows/test.yml | 7 ++++++- composer.json | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2ac3ce..1a804f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,8 +82,13 @@ jobs: - name: Obtain all dev dependencies for LocalGov Drupal run: | + # Installing all localgov dev dependencies doesn't work due to issues with drupal.org packaging. + # jq --raw-output '.packages[] | select(.name | startswith("drupal/localgov*")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction + # Instead just install the dependencies needed for the tests. composer --working-dir=./html require 'drupal/facets:^2.0' - jq --raw-output '.packages[] | select(.name | startswith("localgovdrupal/")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction + composer --working-dir=./html require 'drupal/facets_form:^1.3' + composer --working-dir=./html require 'drupal/group:^3.2' + phpcs: name: Coding standards checks diff --git a/composer.json b/composer.json index 80953bd..00d7b01 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "cweagans/composer-patches": "^1.6", "drupal/core-composer-scaffold": "^10.3", "drupal/core-recommended": "^10.3", - "localgovdrupal/localgov": "^3.0", - "localgovdrupal/localgov_search_solr": "^1.1", + "drupal/localgov": "^3.0", + "drupal/localgov_search_solr": "^1.1", "wikimedia/composer-merge-plugin": "^2.1" }, "require-dev": { @@ -74,12 +74,12 @@ } }, "patches-ignore": { - "localgovdrupal/localgov": { + "drupal/localgov": { "drupal/core": { "Content moderation and Workspaces https://www.drupal.org/project/drupal/issues/3179199#comment-15711680" : "https://www.drupal.org/files/issues/2024-08-11/3179199-3132022-content-moderation-workspaces-query.patch" } }, - "localgovdrupal/localgov_services": { + "drupal/localgov_services": { "drupal/core": { "node_access filters out accessible nodes when node is left joined (1349080)" : "https://git.drupalcode.org/project/drupal/-/commit/c271adb.diff" }