From 7799f0f9bf788545bc36924b6528c09c6a8bb09a Mon Sep 17 00:00:00 2001 From: David Lambauer Date: Fri, 24 Apr 2026 00:41:45 +0200 Subject: [PATCH] fix(check-extension): probe vendor dir for MageOS/Magento standards when running phpcs (#216) Closes #213 --- .github/workflows/check-extension.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-extension.yaml b/.github/workflows/check-extension.yaml index 1f01e85..1ead2c8 100644 --- a/.github/workflows/check-extension.yaml +++ b/.github/workflows/check-extension.yaml @@ -182,7 +182,18 @@ jobs: - name: Register Coding Standard shell: bash working-directory: ${{ inputs.path }} - run: vendor/bin/phpcs --config-set installed_paths vendor/magento/magento-coding-standard,vendor/magento/php-compatibility-fork + run: | + if [ -d vendor/magento/magento-coding-standard ]; then + CODING_STANDARD_VENDOR=magento + elif [ -d vendor/mage-os/magento-coding-standard ]; then + CODING_STANDARD_VENDOR=mage-os + else + echo "No magento-coding-standard directory found under vendor/magento or vendor/mage-os." + echo "Trusting dealerdirect/phpcodesniffer-composer-installer to have registered installed_paths." + exit 0 + fi + vendor/bin/phpcs --config-set installed_paths \ + "vendor/${CODING_STANDARD_VENDOR}/magento-coding-standard,vendor/${CODING_STANDARD_VENDOR}/php-compatibility-fork" - name: Coding Standard Check shell: bash