Skip to content

Commit

Permalink
Merge pull request #16 from shopware/add-phpstan-workaround
Browse files Browse the repository at this point in the history
fix: older shopware versions
  • Loading branch information
shyim authored Nov 13, 2024
2 parents 7ee1899 + e80a758 commit 237b44c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 237b44c

Please sign in to comment.