Skip to content

Commit 97912da

Browse files
committed
Fix symfony requirements
1 parent 0c718c6 commit 97912da

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

.github/workflows/reusable-CI-workflow.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ jobs:
6262
php-version: '${{ inputs.php-max-version }}'
6363
symfony-version: '5.4'
6464
## Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
65-
pkg-extra-constraints: behat/gherkin:~4.12.0
65+
# Fix - symfony/yaml - Avoid issue with Sf YAML 6.4+ and Framework bundle
66+
pkg-extra-constraints: behat/gherkin:~4.12.0 symfony/yaml:~6.4.0
6667
- job-name: Bare minimum # => Lowest versions allowed by composer config
6768
php-version: '${{ inputs.php-min-version }}'
6869
symfony-version: '${{ inputs.symfony-min-version }}'
@@ -115,12 +116,11 @@ jobs:
115116
run: |
116117
SF_CONSTRAINT="~${{ matrix.symfony-version }}.0"
117118
composer require -W \
118-
symfony/http-foundation:${SF_CONSTRAINT} \
119-
symfony/http-kernel:${SF_CONSTRAINT} \
120119
symfony/config:${SF_CONSTRAINT} \
121120
symfony/dependency-injection:${SF_CONSTRAINT} \
122121
symfony/event-dispatcher:${SF_CONSTRAINT} \
123-
symfony/routing:${SF_CONSTRAINT} \
122+
symfony/http-foundation:${SF_CONSTRAINT} \
123+
symfony/http-kernel:${SF_CONSTRAINT} \
124124
${{ matrix.pkg-extra-constraints }} \
125125
&& make build
126126
@@ -199,12 +199,11 @@ jobs:
199199
run: |
200200
SF_CONSTRAINT="~${{ env.SYMFONY_VERSION }}.0"
201201
composer require -W \
202-
symfony/http-foundation:${SF_CONSTRAINT} \
203-
symfony/http-kernel:${SF_CONSTRAINT} \
204202
symfony/config:${SF_CONSTRAINT} \
205203
symfony/dependency-injection:${SF_CONSTRAINT} \
206204
symfony/event-dispatcher:${SF_CONSTRAINT} \
207-
symfony/routing:${SF_CONSTRAINT} \
205+
symfony/http-foundation:${SF_CONSTRAINT} \
206+
symfony/http-kernel:${SF_CONSTRAINT} \
208207
&& make build
209208
210209
- name: ComposerRequireChecker
@@ -239,12 +238,15 @@ jobs:
239238
php-version: ${{ inputs.php-max-version }}
240239
symfony-version: ${{ inputs.symfony-next-version }}
241240
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
242-
pkg-extra-constraints: behat/gherkin:~4.12.0
241+
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
242+
pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( inputs.symfony-next-version == '7.0' && inputs.php-max-version < 8.1 ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }}
243243
- job-name: Symfony - With lowest supported PHP version
244-
php-version: ${{ ( inputs.symfony-next-version == '7.0' && inputs.php-min-version < 8.1 ) && '8.1' || inputs.php-min-version }} # Fix - Sf 7.0 require php 8.1 minimum !
244+
# Fix - Sf 7.0 require php 8.1 minimum, most of deps require 8.2 !
245+
php-version: ${{ ( inputs.symfony-next-version == '7.0' && inputs.php-min-version < 8.2 ) && '8.2' || inputs.php-min-version }}
245246
symfony-version: ${{ inputs.symfony-next-version }}
246247
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
247-
pkg-extra-constraints: behat/gherkin:~4.12.0
248+
# Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum !
249+
pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( inputs.symfony-next-version == '7.0' && inputs.php-min-version < 8.1 ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }}
248250

249251
steps:
250252
- name: Check out code
@@ -278,12 +280,11 @@ jobs:
278280
SF_CONSTRAINT="~${{ matrix.symfony-version }}.0@dev"
279281
composer config minimum-stability dev \
280282
&& composer require -W \
281-
symfony/http-foundation:${SF_CONSTRAINT} \
282-
symfony/http-kernel:${SF_CONSTRAINT} \
283283
symfony/config:${SF_CONSTRAINT} \
284284
symfony/dependency-injection:${SF_CONSTRAINT} \
285285
symfony/event-dispatcher:${SF_CONSTRAINT} \
286-
symfony/routing:${SF_CONSTRAINT} \
286+
symfony/http-foundation:${SF_CONSTRAINT} \
287+
symfony/http-kernel:${SF_CONSTRAINT} \
287288
${{ matrix.pkg-extra-constraints }} \
288289
&& make build
289290

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
"require-dev": {
4444
"behat/behat": "^3.9.0,<=3.16.1",
4545
"dvdoug/behat-code-coverage": "^5.0",
46-
"matthiasnoback/symfony-config-test": "^4.0",
47-
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
46+
"matthiasnoback/symfony-config-test": "^4.0 || ^5.0",
47+
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
4848
"phpspec/prophecy": "^1.15",
4949
"phpspec/prophecy-phpunit": "^2.0",
5050
"phpunit/php-code-coverage": "^9.2.4",

0 commit comments

Comments
 (0)