Skip to content

Add source diagnostic suppressions #250

Add source diagnostic suppressions

Add source diagnostic suppressions #250

name: Symfony compatibility
on:
pull_request:
paths:
- .github/workflows/compatibility.yaml
- composer.json
- composer.lock
- phpunit.xml.dist
- resources/bridge.php
- resources/bridge/**
- src/Runtime/**
- tests/Compatibility/**
- tests/Fixtures/RuntimeApplication/**
push:
branches: [main]
paths:
- .github/workflows/compatibility.yaml
- CHANGELOG.md
- composer.json
- composer.lock
- phpunit.xml.dist
- resources/bridge.php
- resources/bridge/**
- src/Runtime/**
- tests/Compatibility/**
- tests/Fixtures/RuntimeApplication/**
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
supported_versions:
name: Resolve supported Symfony versions
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.versions.outputs.versions }}
steps:
- name: Read Symfony release metadata
id: versions
run: |
versions="$(curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 https://symfony.com/releases.json | jq -cer '
.supported_versions
| if type == "array"
and length > 0
and all(.[]; type == "string" and test("^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"))
then .
else error("Invalid supported_versions release metadata")
end
')"
echo "versions=$versions" >> "$GITHUB_OUTPUT"
bridge:
name: Symfony ${{ matrix.symfony }}
needs: supported_versions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
symfony: ${{ fromJSON(needs.supported_versions.outputs.versions) }}
steps:
- uses: actions/checkout@v7
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: none
- uses: ramsey/composer-install@v4
- name: Install the compatibility application
working-directory: tests/Fixtures/RuntimeApplication
run: >-
composer update --no-interaction --no-progress --with-all-dependencies
--with "symfony/asset-mapper:${{ matrix.symfony }}.*"
--with "symfony/console:${{ matrix.symfony }}.*"
--with "symfony/dotenv:${{ matrix.symfony }}.*"
--with "symfony/framework-bundle:${{ matrix.symfony }}.*"
--with "symfony/messenger:${{ matrix.symfony }}.*"
--with "symfony/property-info:${{ matrix.symfony }}.*"
--with "symfony/security-bundle:${{ matrix.symfony }}.*"
--with "symfony/string:${{ matrix.symfony }}.*"
--with "symfony/translation:${{ matrix.symfony }}.*"
--with "symfony/twig-bundle:${{ matrix.symfony }}.*"
--with "symfony/yaml:${{ matrix.symfony }}.*"
- name: Test the project bridge
env:
SYMFONY_LSP_COMPAT_BRANCH: ${{ matrix.symfony }}
SYMFONY_LSP_COMPAT_PROJECT: ${{ github.workspace }}/tests/Fixtures/RuntimeApplication
run: ./vendor/bin/phpunit --no-progress tests/Compatibility