Skip to content

Commit

Permalink
drop symfony 2&3, handle symfony 6
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeniau committed Sep 26, 2023
1 parent 0e9a4f2 commit 420eb21
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PHP Composer

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request: ~

permissions:
Expand All @@ -12,23 +12,31 @@ jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
include:
- php: "8.2"
scenario: "symfony6"
- php: "8.1"
scenario: "symfony6"
- php: "8.2"
scenario: "symfony5"
- php: "8.1"
scenario: "symfony5"
- php: "8.2"
scenario: "symfony4"
- php: "8.1"
scenario: "symfony4"

steps:
- uses: actions/checkout@v3

- name: Setup PHP with composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:${{ matrix.composer || 'v2' }}
tools: composer:v2

# - name: Validate composer.json and composer.lock
# run: composer validate --strict
Expand All @@ -44,9 +52,9 @@ jobs:

- name: Install dependencies
run: .scenarios.lock/install "${{ matrix.scenario }}" "${{ matrix.dependencies }}"

- name: PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon src/

- name: atoum
run: vendor/bin/atoum
12 changes: 9 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"guzzlehttp/guzzle": "^6.2.2 || ^7.5.0",
"friendsofphp/proxy-manager-lts": "^1.0",
"doctrine/annotations": "^1.2",
"symfony/http-foundation": "^2.7 || ^3.3 || ^4.0 || ^5.0",
"symfony/property-access": "^2.7 || ^3.3 || ^4.0 || ^5.0",
"symfony/http-foundation": "^4.4 || ^5.0 || ^6.0",
"symfony/property-access": "^4.4 || ^5.0 || ^6.0",
"psr/cache": "^1.0"
},
"require-dev": {
"atoum/atoum": "^4.1",
"symfony/cache": "^4.0 || ^5.0",
"symfony/cache": "^4.0 || ^5.0 || ^6.0",
"phpstan/phpstan": "^0.12.38",
"mapado/php-cs-fixer-config": "^3.2",
"g1a/composer-test-scenarios": "^3.0",
Expand Down Expand Up @@ -58,6 +58,12 @@
],
"extra": {
"scenarios": {
"symfony6": {
"conflict": {
"symfony/http-foundation": ">=7.0.0",
"symfony/property-access": ">=7.0.0"
}
},
"symfony5": {
"conflict": {
"symfony/http-foundation": ">=6.0.0",
Expand Down

0 comments on commit 420eb21

Please sign in to comment.