From 8648bffbc7c2334fe46ca87d07ee71f13e03f623 Mon Sep 17 00:00:00 2001 From: alexpozzi Date: Mon, 18 Dec 2023 10:19:33 +0100 Subject: [PATCH 1/2] chore: support symfony 7 --- .github/workflows/build.yaml | 34 ++++++++++++++++++++-------------- composer.json | 17 ++++++++--------- tests/fixtures/config/base.yml | 6 +----- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eae4d6a..d406053 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,24 +20,30 @@ jobs: fail-fast: false matrix: include: - - description: 'No Symfony specified' - php: '7.4' - - description: 'Lowest deps' - php: '7.4' - composer_option: '--prefer-lowest' - env: - SYMFONY_DEPRECATIONS_HELPER: max[self]=0 - - description: 'PHP 8.0' - php: '8.0' - - description: 'PHP 8.1' + - description: 'Symfony 7.0' + php: '8.3' + symfony: '7.0.*' + - description: 'Symfony 6.4' + php: '8.1' + symfony: '6.4.*' + - description: 'Symfony 6.0' + php: '8.3' + symfony: '6.0.*' + - description: 'Symfony 5.4' php: '8.1' - - description: 'PHP 8.2' - php: '8.2' - - description: 'PHP 8.3' + symfony: '5.4.*' + - description: 'Symfony 5.0' php: '8.3' + symfony: '5.0.*' - description: 'Dev deps' - php: '8.2' + php: '8.3' + symfony: '7.0.*' dev: true + - description: 'Lowest deps' + php: '8.1' + composer_option: '--prefer-lowest' + env: + SYMFONY_DEPRECATIONS_HELPER: max[self]=0 name: PHP ${{ matrix.php }} tests (${{ matrix.description }}) steps: - name: Checkout diff --git a/composer.json b/composer.json index 019183a..cc01e9d 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ } ], "require": { - "php": ">=7.4", - "symfony/framework-bundle": "^4.4|^5.1|^6.0", + "php": ">=8.1", + "symfony/framework-bundle": "^5.1|^6.0|^7.0", "knplabs/knp-snappy": "^1.4.3" }, "autoload": { @@ -31,12 +31,11 @@ } }, "require-dev": { - "symfony/asset": "^4.4|^5.1|^6.0", - "symfony/finder": "^4.4|^5.1|^6.0", - "symfony/phpunit-bridge": "^4.4|^5.1|^6.0", - "symfony/security-csrf": "^4.4|^5.1|^6.0", - "symfony/templating": "^4.4|^5.1|^6.0", - "symfony/validator": "^4.4|^5.1|^6.0", - "symfony/yaml": "^4.4|^5.1|^6.0" + "symfony/asset": "^5.1|^6.0|^7.0", + "symfony/finder": "^5.1|^6.0|^7.0", + "symfony/phpunit-bridge": "^5.1|^6.0|^7.0", + "symfony/security-csrf": "^5.1|^6.0|^7.0", + "symfony/validator": "^5.1|^6.0|^7.0", + "symfony/yaml": "^5.1|^6.0|^7.0" } } diff --git a/tests/fixtures/config/base.yml b/tests/fixtures/config/base.yml index 2c18b8b..00874fb 100644 --- a/tests/fixtures/config/base.yml +++ b/tests/fixtures/config/base.yml @@ -1,5 +1 @@ -framework: - secret: ThisIsNotReallyASecretSoPleaseChangeIt - router: { resource: "%kernel.project_dir%/config/routing.yml", utf8: true } - validation: { enabled: true, enable_annotations: false } - http_method_override: false +framework: ~ From d52813b27ab1e64ad3d158c7b2bde4172e2abbfd Mon Sep 17 00:00:00 2001 From: alexpozzi Date: Mon, 18 Dec 2023 10:40:27 +0100 Subject: [PATCH 2/2] upgrade test matrix --- .github/workflows/build.yaml | 27 +++++++++++---------------- composer.json | 6 +----- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d406053..eb847ba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,6 +20,9 @@ jobs: fail-fast: false matrix: include: + - description: 'Symfony 7.1 DEV' + php: '8.2' + symfony: '7.1.*@dev' - description: 'Symfony 7.0' php: '8.3' symfony: '7.0.*' @@ -35,23 +38,13 @@ jobs: - description: 'Symfony 5.0' php: '8.3' symfony: '5.0.*' - - description: 'Dev deps' - php: '8.3' - symfony: '7.0.*' - dev: true - - description: 'Lowest deps' + - description: 'Beta deps' php: '8.1' - composer_option: '--prefer-lowest' - env: - SYMFONY_DEPRECATIONS_HELPER: max[self]=0 + beta: true name: PHP ${{ matrix.php }} tests (${{ matrix.description }}) steps: - name: Checkout uses: actions/checkout@v3 - - run: | - phpenv config-rm xdebug.ini || true - composer global config --no-plugins allow-plugins.symfony/flex true - composer global require --no-progress --no-scripts --no-plugins symfony/flex 1.* - name: Cache uses: actions/cache@v3 with: @@ -64,7 +57,9 @@ jobs: - run: | sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json; if: matrix.symfony - - run: composer config minimum-stability dev && composer config prefer-stable true - if: matrix.dev - - run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_option }} - - run: vendor/bin/simple-phpunit -v + - run: | + composer config minimum-stability dev + composer config prefer-stable true + if: matrix.beta + - run: composer update --prefer-dist --no-interaction --no-progress --ansi ${{ matrix.composer_option }} + - run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index cc01e9d..82bf074 100644 --- a/composer.json +++ b/composer.json @@ -31,11 +31,7 @@ } }, "require-dev": { - "symfony/asset": "^5.1|^6.0|^7.0", - "symfony/finder": "^5.1|^6.0|^7.0", - "symfony/phpunit-bridge": "^5.1|^6.0|^7.0", - "symfony/security-csrf": "^5.1|^6.0|^7.0", - "symfony/validator": "^5.1|^6.0|^7.0", + "phpunit/phpunit": "^8.5", "symfony/yaml": "^5.1|^6.0|^7.0" } }