Skip to content

Commit

Permalink
chore: set Symfony compatibility to 5.4, 6.4 and 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroTroller committed Feb 22, 2024
1 parent 56cccc2 commit 5be4d8d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 97 deletions.
89 changes: 0 additions & 89 deletions .circleci/config.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
on: push

jobs:
test:
name: "php${{ matrix.php }} symfony${{ matrix.symfony }} ${{matrix.minimumStability}} ${{ matrix.composerOptions }}"
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '8.1'
- '8.2'
- '8.3'
symfony:
- '5.4'
- '6.4'
minimumStability:
- 'stable'
composerOptions:
- '--prefer-stable --prefer-lowest'
- '--prefer-stable'
includes:
- symfony: 7.0
php:
- '8.2'
- '8.3'
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl
tools: composer
- uses: actions/checkout@v4
- run: |
curl -s https://raw.githubusercontent.com/symfony/symfony/${{ matrix.symfony }}/composer.json | jq '.replace | to_entries | map({key: .key, value: ("< " + "${{ matrix.symfony }}" + ".0 || >= " + ("${{ matrix.symfony }}" | (((.|tonumber + 0.1) * 10)|round / 10)|tostring) + ".0")}) | from_entries' > conflict.json
jq -s '.[0] + {conflict: .[1]}' composer.json conflict.json > composer.new.json
mv composer.new.json composer.json
rm conflict.json
cat composer.json
- run: |
jq -s '.[0] + {"minimum-stability": "${{ matrix.minimumStability }}"}' composer.json > composer.new.json
mv composer.new.json composer.json
cat composer.json
- run: composer update ${{ matrix.composerOptions }}
- run: vendor/bin/phpstan analyse --no-progress --memory-limit=-1
- run: vendor/bin/phpspec run -v --config=phpspec.no-coverage.yml
- run: bin/lint-twig src/
- run: PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --diff --dry-run -vvv
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
],
"require": {
"php": ">=8.0",
"symfony/config": "^5.4 || ^6.2@dev",
"symfony/dependency-injection": "^5.4 || ^6.2@dev",
"symfony/form": "^5.4 || ^6.2@dev",
"symfony/http-foundation": "^5.4 || ^6.2@dev",
"symfony/http-kernel": "^5.4 || ^6.2@dev",
"symfony/validator": "^5.4 || ^6.2@dev",
"symfony/config": "^5.4 || ^6.4 || ^7.0@dev",
"symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0@dev",
"symfony/form": "^5.4 || ^6.4 || ^7.0@dev",
"symfony/http-foundation": "^5.4 || ^6.4 || ^7.0@dev",
"symfony/http-kernel": "^5.4 || ^6.4 || ^7.0@dev",
"symfony/validator": "^5.4 || ^6.4 || ^7.0@dev",
"twig/twig": "^2.15.3 || ^3.4.3"
},
"require-dev": {
Expand All @@ -35,8 +35,8 @@
"phpspec/prophecy": "1.18.0",
"phpstan/phpstan": "1.10.59",
"rector/rector": "1.0.1",
"symfony/twig-bridge": "^5.4 || ^6.2@dev",
"symfony/var-dumper": "^5.4 || ^6.2@dev",
"symfony/twig-bridge": "^5.4 || ^6.4 || ^7.0@dev",
"symfony/var-dumper": "^5.4 || ^6.4 || ^7.0@dev",
"webmozart/assert": "1.11.0"
},
"minimum-stability": "stable",
Expand Down

0 comments on commit 5be4d8d

Please sign in to comment.