Skip to content

Commit fb66a99

Browse files
committed
Fix PHP 8.2 composer install by locking Symfony 7.4.
CI code-style jobs install from the lock on PHP 8.2; regenerating against platform 8.2 keeps Symfony 7.x in the lock, and composer-sync / CS workflows no longer drift to Symfony 8.1.
1 parent bcd6dea commit fb66a99

6 files changed

Lines changed: 504 additions & 435 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,16 @@ jobs:
112112
php-version: '8.2'
113113
tools: composer:v2, cs2pr
114114

115-
- name: Install dependencies
116-
run: composer install --prefer-dist --no-progress --no-interaction
115+
- name: Install dependencies (Symfony 7.4 for PHP 8.2)
116+
run: |
117+
composer require \
118+
symfony/config:^7.4 \
119+
symfony/dependency-injection:^7.4 \
120+
symfony/http-client:^7.4 \
121+
symfony/http-kernel:^7.4 \
122+
symfony/framework-bundle:^7.4 \
123+
--no-interaction --no-update
124+
composer update symfony/* --with-all-dependencies --no-interaction --prefer-dist --no-progress
117125
118126
- name: Fix code style
119127
run: composer cs-fix
@@ -151,8 +159,16 @@ jobs:
151159
php-version: '8.2'
152160
tools: composer:v2, cs2pr
153161

154-
- name: Install dependencies
155-
run: composer install --prefer-dist --no-progress --no-interaction
162+
- name: Install dependencies (Symfony 7.4 for PHP 8.2)
163+
run: |
164+
composer require \
165+
symfony/config:^7.4 \
166+
symfony/dependency-injection:^7.4 \
167+
symfony/http-client:^7.4 \
168+
symfony/http-kernel:^7.4 \
169+
symfony/framework-bundle:^7.4 \
170+
--no-interaction --no-update
171+
composer update symfony/* --with-all-dependencies --no-interaction --prefer-dist --no-progress
156172
157173
- name: Check code style
158174
run: composer cs-check

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ release-check-demos:
118118

119119
composer-sync: ensure-up
120120
$(COMPOSE) exec -T $(SERVICE_PHP) composer validate --strict
121-
$(COMPOSE) exec -T $(SERVICE_PHP) composer update --no-install
121+
@echo "Aligning composer.lock for PHP 8.2 / Symfony 7.x (CI code-style + local install)…"
122+
$(COMPOSE) exec -T $(SERVICE_PHP) composer config platform.php 8.2.32
123+
$(COMPOSE) exec -T $(SERVICE_PHP) composer update --no-install --no-interaction
124+
$(COMPOSE) exec -T $(SERVICE_PHP) composer config --unset platform.php
122125

123126
clean: ensure-up
124127
$(COMPOSE) exec -T $(SERVICE_PHP) sh -c "rm -rf vendor .phpunit.cache coverage coverage.xml .php-cs-fixer.cache"

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@
8282
"root-version": "1.0.0-dev",
8383
"allow-plugins": {
8484
"phpstan/extension-installer": true
85-
},
86-
"platform": {}
85+
}
8786
},
8887
"minimum-stability": "stable",
8988
"prefer-stable": true,

0 commit comments

Comments
 (0)