Skip to content

Commit 6ccb67d

Browse files
authored
Enable support for Symfony 8 (#938)
1 parent 6222066 commit 6ccb67d

File tree

3 files changed

+37
-44
lines changed

3 files changed

+37
-44
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,43 @@ on:
66
- "*.x"
77
- "feature/*"
88
push:
9+
branches:
10+
- "*.x"
11+
- "feature/*"
912

1013
env:
1114
fail-fast: true
1215

1316
jobs:
1417
phpunit:
1518
name: "PHPUnit"
16-
runs-on: "${{ matrix.os }}"
17-
env:
18-
SYMFONY_REQUIRE: ${{matrix.symfony-version}}
19+
runs-on: "ubuntu-24.04"
1920

2021
strategy:
2122
fail-fast: false
2223
matrix:
23-
os:
24-
- "ubuntu-24.04"
2524
php-version:
2625
- "8.1"
2726
- "8.2"
2827
- "8.3"
2928
- "8.4"
30-
stability:
31-
- "stable"
32-
symfony-version:
33-
- "6.4.*"
34-
- "7.2.*"
35-
- "7.3.*"
29+
symfony-require:
30+
- ""
3631
driver-version:
3732
- "stable"
3833
dependencies:
3934
- "highest"
4035
include:
36+
# Tests the lowest set of dependencies
4137
- dependencies: "lowest"
42-
os: "ubuntu-24.04"
4338
php-version: "8.1"
4439
driver-version: "1.21.0"
45-
stability: "stable"
46-
symfony-version: "6.4.*"
47-
- dependencies: "highest"
48-
os: "ubuntu-24.04"
49-
php-version: "8.2"
50-
driver-version: "mongodb/mongo-php-driver@v2.x"
51-
stability: "dev"
52-
symfony-version: "7.2.*"
53-
exclude:
54-
- php-version: "8.1"
55-
symfony-version: "7.2.*"
56-
- php-version: "8.1"
57-
symfony-version: "7.3.*"
40+
41+
# Test Symfony LTS
42+
- symfony-require: "6.4.*"
43+
php-version: "8.4"
44+
- symfony-require: "7.4.*"
45+
php-version: "8.4"
5846

5947
services:
6048
mongodb:
@@ -92,21 +80,22 @@ jobs:
9280
coverage: "pcov"
9381
ini-values: "zend.assertions=1"
9482

95-
- name: "Set minimum-stability to stable in Composer"
96-
run: "composer config minimum-stability ${{ matrix.stability }}"
97-
9883
- name: "Install dependencies with Composer"
9984
uses: "ramsey/composer-install@v3"
10085
with:
10186
dependency-versions: "${{ matrix.dependencies }}"
87+
env:
88+
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
10289

10390
- name: "Run PHPUnit"
10491
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
92+
env:
93+
SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.dependencies == 'lowest' && 'disabled=1' || 'max[direct]=0' }}
10594

10695
- name: "Upload coverage file"
10796
uses: "actions/upload-artifact@v5"
10897
with:
109-
name: "phpunit-${{ matrix.php-version }}-${{ hashFiles('composer.lock') }}.coverage"
98+
name: "phpunit-${{ matrix.php-version }}-${{ hashFiles('composer.lock') }}-${{ matrix.driver-version }}.coverage"
11099
path: "coverage.xml"
111100

112101
upload_coverage:

.github/workflows/static-analysis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- phpstan*
1414
- tests/StaticAnalysis/**
1515
push:
16+
branches:
17+
- "*.x"
18+
- "feature/*"
1619

1720
jobs:
1821
static-analysis:

composer.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
"doctrine/mongodb-odm": "^2.6",
3131
"doctrine/persistence": "^3.0 || ^4.0",
3232
"psr/log": "^1.0 || ^2.0 || ^3.0",
33-
"symfony/config": "^6.4 || ^7.0",
34-
"symfony/console": "^6.4 || ^7.0",
35-
"symfony/dependency-injection": "^6.4 || ^7.0",
36-
"symfony/doctrine-bridge": "^6.4 || ^7.0",
37-
"symfony/framework-bundle": "^6.4 || ^7.0",
38-
"symfony/http-kernel": "^6.4 || ^7.0",
39-
"symfony/options-resolver": "^6.4 || ^7.0"
33+
"symfony/config": "^6.4 || ^7.0 || ^8.0",
34+
"symfony/console": "^6.4 || ^7.0 || ^8.0",
35+
"symfony/dependency-injection": "^6.4 || ^7.0 || ^8.0",
36+
"symfony/doctrine-bridge": "^6.4 || ^7.0 || ^8.0",
37+
"symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0",
38+
"symfony/http-kernel": "^6.4 || ^7.0 || ^8.0",
39+
"symfony/options-resolver": "^6.4 || ^7.0 || ^8.0"
4040
},
4141
"require-dev": {
4242
"composer/semver": "^3.4",
@@ -45,22 +45,23 @@
4545
"phpstan/phpstan": "^2.1",
4646
"phpunit/phpunit": "^10.5",
4747
"squizlabs/php_codesniffer": "^4",
48-
"symfony/browser-kit": "^6.4 || ^7.0",
49-
"symfony/form": "^6.4 || ^7.0",
50-
"symfony/messenger": "^6.4 || ^7.0",
48+
"symfony/browser-kit": "^6.4 || ^7.0 || ^8.0",
49+
"symfony/form": "^6.4 || ^7.0 || ^8.0",
50+
"symfony/messenger": "^6.4 || ^7.0 || ^8.0",
5151
"symfony/phpunit-bridge": "^6.4.1 || ^7.0.1",
52-
"symfony/security-bundle": "^6.4 || ^7.0",
53-
"symfony/stopwatch": "^6.4 || ^7.0",
54-
"symfony/validator": "^6.4 || ^7.0",
55-
"symfony/yaml": "^6.4 || ^7.0"
52+
"symfony/security-bundle": "^6.4 || ^7.0 || ^8.0",
53+
"symfony/stopwatch": "^6.4 || ^7.0 || ^8.0",
54+
"symfony/validator": "^6.4 || ^7.0 || ^8.0",
55+
"symfony/yaml": "^6.4 || ^7.0 || ^8.0"
5656
},
5757
"conflict": {
5858
"doctrine/data-fixtures": "<1.8 || >=3"
5959
},
6060
"suggest": {
6161
"doctrine/data-fixtures": "Load data fixtures"
6262
},
63-
"minimum-stability": "stable",
63+
"minimum-stability": "dev",
64+
"prefer-stable": true,
6465
"autoload": {
6566
"psr-4": {
6667
"Doctrine\\Bundle\\MongoDBBundle\\": "src"

0 commit comments

Comments
 (0)