From 6a858e0538a2b33a4eaf9169c1e78c556b57e547 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 01:37:04 +0000 Subject: [PATCH 1/5] Initial plan From 48b42ccca1f20f735e3c659817d66ec1651b45e6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 01:39:12 +0000 Subject: [PATCH 2/5] fix: install phpcs with Drupal coding standard in CI workflow Co-authored-by: darrenoh <2293701+darrenoh@users.noreply.github.com> --- .github/workflows/tests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 270e53a..d8fce7b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,6 +39,18 @@ jobs: sudo mv "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" /usr/local/bin/shellcheck shellcheck --version + - name: Install PHP CodeSniffer with Drupal coding standard + run: | + composer global require "squizlabs/php_codesniffer=^4.0" "drupal/coder=^9.0" + # Register the Drupal coding standard with phpcs + "$(composer global config bin-dir --absolute --quiet)/phpcs" \ + --config-set installed_paths \ + "$(composer global config home --quiet)/vendor/drupal/coder/coder_sniffer" + # Make phpcs available system-wide + sudo ln -sf "$(composer global config bin-dir --absolute --quiet)/phpcs" /usr/local/bin/phpcs + env: + COMPOSER_ALLOW_SUPERUSER: '1' + - name: Run unit tests run: | bash tests/unit-test.sh From 06946318d03a7100d70b87397dd1dc1809a71b5b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 02:03:03 +0000 Subject: [PATCH 3/5] fix: use wildcard version constraints for phpcs and drupal/coder Co-authored-by: darrenoh <2293701+darrenoh@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d8fce7b..5a5a7ec 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,7 +41,7 @@ jobs: - name: Install PHP CodeSniffer with Drupal coding standard run: | - composer global require "squizlabs/php_codesniffer=^4.0" "drupal/coder=^9.0" + composer global require "squizlabs/php_codesniffer=*" "drupal/coder=*" # Register the Drupal coding standard with phpcs "$(composer global config bin-dir --absolute --quiet)/phpcs" \ --config-set installed_paths \ From 261ef71cf2be1c05820c31fa2ddfc5433656b6b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 02:08:40 +0000 Subject: [PATCH 4/5] ci: allow dealerdirect plugin before composer global require Co-authored-by: darrenoh <2293701+darrenoh@users.noreply.github.com> --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5a5a7ec..b46b797 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,6 +41,7 @@ jobs: - name: Install PHP CodeSniffer with Drupal coding standard run: | + composer global config --no-interaction allow-plugins.dealerdirect/phpcodesniffer-composer-installer true composer global require "squizlabs/php_codesniffer=*" "drupal/coder=*" # Register the Drupal coding standard with phpcs "$(composer global config bin-dir --absolute --quiet)/phpcs" \ From ea9cfb2b7188005013ac470b325eda9527d8e38e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 02:16:58 +0000 Subject: [PATCH 5/5] ci: let dealerdirect plugin auto-register sniffs, use GITHUB_PATH for phpcs Co-authored-by: darrenoh <2293701+darrenoh@users.noreply.github.com> --- .github/workflows/tests.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b46b797..9c29e99 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,12 +43,8 @@ jobs: run: | composer global config --no-interaction allow-plugins.dealerdirect/phpcodesniffer-composer-installer true composer global require "squizlabs/php_codesniffer=*" "drupal/coder=*" - # Register the Drupal coding standard with phpcs - "$(composer global config bin-dir --absolute --quiet)/phpcs" \ - --config-set installed_paths \ - "$(composer global config home --quiet)/vendor/drupal/coder/coder_sniffer" - # Make phpcs available system-wide - sudo ln -sf "$(composer global config bin-dir --absolute --quiet)/phpcs" /usr/local/bin/phpcs + # Add Composer global bin-dir to PATH so phpcs is available system-wide + echo "$(composer global config bin-dir --absolute --quiet)" >> "$GITHUB_PATH" env: COMPOSER_ALLOW_SUPERUSER: '1'