Skip to content

Commit a502004

Browse files
authored
Actually use symfony matrix in tests (#97)
* Allow matthiasnoback/symfony-dependency-injection-test v5 for full symfony7 compatibility in dev * Use symfony flex for ensuring symfony version in test matrix * Exclude Symfony7 + php8.1 combo from the matrix as it is inherently incompatible * update versions of standard github actions (checkout+cache)
1 parent ebddd29 commit a502004

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

.github/workflows/static-analyse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
CODING_STANDARDS: 1
2020
steps:
2121
- name: "Checkout"
22-
uses: "actions/checkout@v2"
22+
uses: "actions/checkout@v4"
2323

2424
- name: "Setup PHP"
2525
uses: "shivammathur/setup-php@v2"
@@ -34,7 +34,7 @@ jobs:
3434
echo "::set-output name=dir::$(composer config cache-files-dir)"
3535
3636
- name: "Cache Composer dependencies"
37-
uses: "actions/cache@v2"
37+
uses: "actions/cache@v4"
3838
with:
3939
path: |
4040
${{ steps.composer-cache.outputs.dir }}

.github/workflows/tests.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ jobs:
1919
- "8.3"
2020
operating-system:
2121
- "ubuntu-latest"
22+
exclude:
23+
- symfony-version: "7.0.*"
24+
php-version: "8.1"
2225

2326
runs-on: ${{ matrix.operating-system }}
2427
env:
2528
COMPOSER_MEMORY_LIMIT: -1
2629
steps:
2730
- name: "Checkout"
28-
uses: "actions/checkout@v2"
31+
uses: "actions/checkout@v4"
2932

3033
- name: "Setup PHP"
3134
uses: "shivammathur/setup-php@v2"
@@ -40,19 +43,22 @@ jobs:
4043
run: |
4144
echo "::set-output name=dir::$(composer config cache-files-dir)"
4245
- name: "Cache Composer dependencies"
43-
uses: "actions/cache@v2"
46+
uses: "actions/cache@v4"
4447
with:
4548
path: |
4649
${{ steps.composer-cache.outputs.dir }}
4750
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.lock') }}"
4851
restore-keys: |
4952
php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
5053
51-
- name: "Require php-coveralls/php-coveralls"
52-
run: "composer global require php-coveralls/php-coveralls"
54+
- name: "Require php-coveralls/php-coveralls and symfony/flex"
55+
run: "composer global require php-coveralls/php-coveralls symfony/flex --no-scripts --no-plugins"
56+
57+
- name: "Enable symfony/flex plugin"
58+
run: "composer global config --no-scripts --no-plugins allow-plugins.symfony/flex true"
5359

5460
- name: "Install dependencies"
55-
run: "composer update -n --prefer-dist"
61+
run: "SYMFONY_REQUIRE='${{ matrix.symfony-version }}' composer update -n --prefer-dist"
5662

5763
- name: "Test"
5864
run: "composer test-coverage"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"prooph/bookdown-template": "^0.3",
7070
"friendsofphp/php-cs-fixer": "^3.5",
7171
"prooph/php-cs-fixer-config": "^0.5.0",
72-
"matthiasnoback/symfony-dependency-injection-test": "^3.1 || ^4.1",
72+
"matthiasnoback/symfony-dependency-injection-test": "^3.1 || ^4.1 || ^5.1",
7373
"phpstan/phpstan": "^1.5"
7474
},
7575
"minimum-stability": "dev",

0 commit comments

Comments
 (0)