From ab5c1d4aefebe16d0bdc42b872bb2c7a234493af Mon Sep 17 00:00:00 2001 From: Andy Broomfield Date: Mon, 6 Nov 2023 23:20:47 +0000 Subject: [PATCH 1/5] Add :void to update test Referencing https://git.drupalcode.org/project/drupal/-/merge_requests/4278/diffs#85d25f5dc63bb563be005f32257870110dac218a to try and resolve the update error. --- tests/src/Functional/LocalGovUpdateTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/Functional/LocalGovUpdateTest.php b/tests/src/Functional/LocalGovUpdateTest.php index 7513eac..0b7d2e2 100644 --- a/tests/src/Functional/LocalGovUpdateTest.php +++ b/tests/src/Functional/LocalGovUpdateTest.php @@ -73,7 +73,7 @@ public function setDatabaseDumpFiles() { /** * Tests LocalGov updates from 2.3.18 to current. */ - public function testUpdate() { + public function testUpdate(): void { // Test Drupal update to latest version. $this->runUpdates(); From 25bb121097aabc65967b155faf7496f51450b461 Mon Sep 17 00:00:00 2001 From: Andy Broomfield Date: Tue, 7 Nov 2023 10:57:20 +0000 Subject: [PATCH 2/5] Set $modules on profile tests to protected This is to fix PHPStan deprecation warnings --- .../tests/src/Functional/ContentLockTest.php | 2 +- .../tests/src/Functional/LoginRedirectTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/localgov_content_lock/tests/src/Functional/ContentLockTest.php b/modules/localgov_content_lock/tests/src/Functional/ContentLockTest.php index 3baa4fc..e924660 100644 --- a/modules/localgov_content_lock/tests/src/Functional/ContentLockTest.php +++ b/modules/localgov_content_lock/tests/src/Functional/ContentLockTest.php @@ -22,7 +22,7 @@ class ContentLockTest extends BrowserTestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'localgov_content_lock', ]; diff --git a/modules/localgov_login_redirect/tests/src/Functional/LoginRedirectTest.php b/modules/localgov_login_redirect/tests/src/Functional/LoginRedirectTest.php index 16c66df..ae0b1ea 100644 --- a/modules/localgov_login_redirect/tests/src/Functional/LoginRedirectTest.php +++ b/modules/localgov_login_redirect/tests/src/Functional/LoginRedirectTest.php @@ -22,7 +22,7 @@ class LoginRedirectTest extends BrowserTestBase { /** * {@inheritdoc} */ - public static $modules = [ + protected static $modules = [ 'localgov_login_redirect', ]; From 9c18936686e55fba149169f33868ec061bf422c4 Mon Sep 17 00:00:00 2001 From: Andy Broomfield Date: Tue, 7 Nov 2023 12:08:00 +0000 Subject: [PATCH 3/5] Add geofield map as a profile dev dependancy This is requires as the update test will update from a DB that includes geofield_map, so have it installed when running tests. --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e5af198..86e0d24 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,8 @@ "localgovdrupal/localgov_workflows": "^1.2.0" }, "require-dev": { - "drupal/core-dev": "^10.0" + "drupal/core-dev": "^10.0", + "drupal/geofield_map": "^2.9" }, "minimum-stability": "dev", "prefer-stable": true, From d7a9ee460480e092456e6ef05dedf10623133393 Mon Sep 17 00:00:00 2001 From: Andy Broomfield Date: Tue, 7 Nov 2023 15:22:11 +0000 Subject: [PATCH 4/5] Try to obtain dev dependencies --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00bef50..8d608d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -100,6 +100,9 @@ jobs: with: path: ${{ env.LOCALGOV_DRUPAL_PROJECT_PATH }} + - name: Obtain dev dependencies + run: jq --raw-output '.["require-dev"] | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/web/profiles/contrib/localgov/composer.json | xargs composer --working-dir=./html require + phpcs: name: Coding standards checks needs: build From e510f92c00656e6a4cf732c09af33f829739174a Mon Sep 17 00:00:00 2001 From: Andy Broomfield Date: Tue, 7 Nov 2023 15:30:31 +0000 Subject: [PATCH 5/5] Bump geofield map dev dependancy to 3.0 Since it's only needed to make sure the update is run, it shouldn't matter which version so use a PHP 8.2 compataible one. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 86e0d24..e1e1028 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ }, "require-dev": { "drupal/core-dev": "^10.0", - "drupal/geofield_map": "^2.9" + "drupal/geofield_map": "^3.0" }, "minimum-stability": "dev", "prefer-stable": true,