45
45
dependency : symfony
46
46
47
47
tests :
48
- name : ${{ matrix.job-name }}
48
+ name : PHP ${{ matrix.php-version }} & Sf ${{ matrix.symfony-version }} - ${{ matrix.job-name }}
49
49
needs : [fetch-supported-versions]
50
50
runs-on : ubuntu-latest
51
51
permissions :
@@ -61,28 +61,28 @@ jobs:
61
61
php-version : ' ${{ needs.fetch-supported-versions.outputs.php-max }}'
62
62
symfony-version : ' ${{ needs.fetch-supported-versions.outputs.symfony-max }}'
63
63
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
64
- pkg-extra-constraints : behat/gherkin:~4.12.0
65
- - job-name : Up to date versions - Special case - Symfony 5.4
64
+ pkg-extra-constraints : --with ' behat/gherkin:~4.12.0'
65
+ - job-name : Up to date versions - Sf 5.4 case
66
66
php-version : ' ${{ needs.fetch-supported-versions.outputs.php-max }}'
67
67
symfony-version : ' 5.4'
68
68
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
69
69
# Fix - symfony/yaml - Avoid issue with Sf YAML 6.4+ and Framework bundle
70
- pkg-extra-constraints : behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' ) && 'symfony/yaml:~6.4.0' || '' }}
70
+ pkg-extra-constraints : --with ' behat/gherkin:~4.12.0' ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' ) && '--with " symfony/yaml:~6.4.0" ' || '' }}
71
71
- job-name : Bare minimum # => Lowest versions allowed by composer config
72
72
php-version : ' ${{ needs.fetch-supported-versions.outputs.php-min }}'
73
73
symfony-version : ' ${{ needs.fetch-supported-versions.outputs.symfony-min }}'
74
- - job-name : Bare minimum - Special case - Symfony 5.4
74
+ - job-name : Bare minimum - Sf 5.4 case
75
75
php-version : ' ${{ needs.fetch-supported-versions.outputs.php-min }}'
76
76
symfony-version : ' 5.4'
77
- - job-name : Late migration - PHP # => Highest symfony version with lowest php version allowed by composer config
77
+ - job-name : Late PHP migration # => Highest symfony version with lowest php version allowed by composer config
78
78
# Fix - Sf 6.4 require php 8.1 minimum !
79
79
php-version : ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.1' || needs.fetch-supported-versions.outputs.php-min }}
80
80
symfony-version : ' ${{ needs.fetch-supported-versions.outputs.symfony-max }}'
81
- - job-name : Late migration - Symfony # => Lowest symfony version with highest php version allowed by composer config
81
+ - job-name : Late Symfony migration # => Lowest symfony version with highest php version allowed by composer config
82
82
php-version : ' ${{ needs.fetch-supported-versions.outputs.php-max }}'
83
83
symfony-version : ' ${{ needs.fetch-supported-versions.outputs.symfony-min }}'
84
84
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
85
- pkg-extra-constraints : behat/gherkin:~4.12.0
85
+ pkg-extra-constraints : --with ' behat/gherkin:~4.12.0'
86
86
steps :
87
87
- name : Check out code
88
88
uses : actions/checkout@v5
@@ -119,13 +119,12 @@ jobs:
119
119
120
120
- name : Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }}
121
121
run : |
122
+ # Rely on "composer update --with" rather than "composer require" !
123
+ # => it ensures the tested version is actually allowed by constraints
124
+ # ("composer require" would override those constraints, which may not produce something actually installable by end-user)
122
125
SF_CONSTRAINT="~${{ matrix.symfony-version }}.0"
123
- composer require -W \
124
- symfony/config:${SF_CONSTRAINT} \
125
- symfony/dependency-injection:${SF_CONSTRAINT} \
126
- symfony/event-dispatcher:${SF_CONSTRAINT} \
127
- symfony/http-foundation:${SF_CONSTRAINT} \
128
- symfony/http-kernel:${SF_CONSTRAINT} \
126
+ composer update --no-install --with-all-dependencies --minimal-changes \
127
+ --with "symfony/validator:${SF_CONSTRAINT}" \
129
128
${{ matrix.pkg-extra-constraints }} \
130
129
&& make build
131
130
@@ -205,13 +204,12 @@ jobs:
205
204
206
205
- name : Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ env.SYMFONY_VERSION }}
207
206
run : |
207
+ # Rely on "composer update --with" rather than "composer require" !
208
+ # => it ensures the tested version is actually allowed by constraints
209
+ # ("composer require" would override those constraints, which may not produce something actually installable by end-user)
208
210
SF_CONSTRAINT="~${{ env.SYMFONY_VERSION }}.0"
209
- composer require -W \
210
- symfony/config:${SF_CONSTRAINT} \
211
- symfony/dependency-injection:${SF_CONSTRAINT} \
212
- symfony/event-dispatcher:${SF_CONSTRAINT} \
213
- symfony/http-foundation:${SF_CONSTRAINT} \
214
- symfony/http-kernel:${SF_CONSTRAINT} \
211
+ composer update --no-install --with-all-dependencies --minimal-changes \
212
+ --with "symfony/validator:${SF_CONSTRAINT}" \
215
213
&& make build
216
214
217
215
- name : ComposerRequireChecker
@@ -222,7 +220,7 @@ jobs:
222
220
uses : actions/dependency-review-action@v4
223
221
224
222
nightly-tests :
225
- name : Nightly - ${{ matrix.job-name }}
223
+ name : Nightly - PHP ${{ matrix.php-version }} & Sf ${{ matrix.symfony-version }} - ${{ matrix.job-name }}
226
224
needs : [ fetch-supported-versions, tests ]
227
225
if : ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'with-nightly-tests') ) }}
228
226
runs-on : ubuntu-latest
@@ -235,23 +233,23 @@ jobs:
235
233
fail-fast : false
236
234
matrix :
237
235
include :
238
- - job-name : PHP - With highest supported Symfony versions
236
+ - job-name : PHP with highest supported Symfony versions
239
237
php-version : ${{ needs.fetch-supported-versions.outputs.php-next }}
240
238
symfony-version : ${{ needs.fetch-supported-versions.outputs.symfony-max }}
241
239
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
242
240
pkg-extra-constraints : behat/gherkin:~4.12.0
243
- - job-name : PHP - With lowest supported Symfony versions
241
+ - job-name : PHP with lowest supported Symfony versions
244
242
php-version : ${{ needs.fetch-supported-versions.outputs.php-next }}
245
243
symfony-version : ${{ needs.fetch-supported-versions.outputs.symfony-min }}
246
244
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
247
245
pkg-extra-constraints : behat/gherkin:~4.12.0
248
- - job-name : Symfony - With highest supported PHP version
246
+ - job-name : Symfony with highest supported PHP version
249
247
php-version : ${{ needs.fetch-supported-versions.outputs.php-max }}
250
248
symfony-version : ${{ needs.fetch-supported-versions.outputs.symfony-next }}
251
249
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
252
250
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
253
251
pkg-extra-constraints : behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-max == '8.4' ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }}
254
- - job-name : Symfony - With lowest supported PHP version
252
+ - job-name : Symfony with lowest supported PHP version
255
253
# Fix - Sf 7.0 require php 8.1 minimum, most of deps require 8.2 !
256
254
php-version : ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.2' || needs.fetch-supported-versions.outputs.php-min }}
257
255
symfony-version : ${{ needs.fetch-supported-versions.outputs.symfony-next }}
@@ -288,14 +286,12 @@ jobs:
288
286
289
287
- name : Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }}
290
288
run : |
289
+ # For nightly builds, rely on "composer require" rather than "composer update --with" !
290
+ # => tested version is likely outside of constraints, in that case "composer update --with" would fail
291
291
SF_CONSTRAINT="~${{ matrix.symfony-version }}.0@dev"
292
292
composer config minimum-stability dev \
293
- && composer require -W \
294
- symfony/config:${SF_CONSTRAINT} \
295
- symfony/dependency-injection:${SF_CONSTRAINT} \
296
- symfony/event-dispatcher:${SF_CONSTRAINT} \
297
- symfony/http-foundation:${SF_CONSTRAINT} \
298
- symfony/http-kernel:${SF_CONSTRAINT} \
293
+ && composer require --no-install --with-all-dependencies --minimal-changes \
294
+ symfony/validator:${SF_CONSTRAINT} \
299
295
${{ matrix.pkg-extra-constraints }} \
300
296
&& make build
301
297
0 commit comments