From e80a758524a85c20137e0aace20c976c34ca8812 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Wed, 13 Nov 2024 13:15:26 +0100 Subject: [PATCH] fix: older shopware versions --- .github/workflows/blank.yml | 22 ++++++++++++++++++++-- action.yml | 14 ++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index c3227f9..dc73e7e 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -49,5 +49,23 @@ jobs: installAdmin: 'true' path: 'sw-test' - - + version-matrix: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: + - 'trunk' + - 'v6.6.4.0' + - 'v6.6.8.2' + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Setup Shopware + uses: ./. + with: + shopware-version: '${{ matrix.version }}' + path: 'sw-test' + - name: Show version + working-directory: sw-test + run: ./bin/console --version diff --git a/action.yml b/action.yml index f5683fc..53187b7 100644 --- a/action.yml +++ b/action.yml @@ -92,6 +92,20 @@ runs: working-directory: ${{ inputs.path }} run: rm -rf vendor-bin + - name: Fix temporary PHPStan Failure + shell: bash + working-directory: ${{ inputs.path }} + run: | + if ! jq -e '.["require-dev"]["phpstan/phpdoc-parser"]' composer.json > /dev/null 2>&1; then + echo "phpstan/phpdoc-parser not found in require-dev, adding it..." + + # Create a temporary file with the new content + jq '.["require-dev"]["phpstan/phpdoc-parser"] = "~1"' composer.json > composer.json.tmp + + # Replace the original file + mv composer.json.tmp composer.json + fi + - name: Setup PHP uses: shivammathur/setup-php@v2 with: