Skip to content

Commit 59c5419

Browse files
committed
Enhance CI configuration to conditionally set Symfony var-exporter version based on Symfony version. This change ensures compatibility with Symfony 8.x while maintaining support for earlier versions.
1 parent 4935ccc commit 59c5419

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,21 @@ jobs:
5757
${{ runner.os }}-php-${{ matrix.php }}-composer-
5858
5959
- name: Install dependencies with Symfony ${{ matrix.symfony }}
60+
env:
61+
SYMFONY: ${{ matrix.symfony }}
6062
run: |
61-
composer require symfony/config:^${{ matrix.symfony }} symfony/dependency-injection:^${{ matrix.symfony }} symfony/http-kernel:^${{ matrix.symfony }} symfony/property-access:^${{ matrix.symfony }} symfony/yaml:^${{ matrix.symfony }} symfony/var-exporter:^7.4 --no-interaction --no-update
63+
case "$SYMFONY" in
64+
8.*) VAR_EXPORTER="^${SYMFONY}" ;;
65+
*) VAR_EXPORTER="^7.4" ;;
66+
esac
67+
composer require \
68+
symfony/config:^${SYMFONY} \
69+
symfony/dependency-injection:^${SYMFONY} \
70+
symfony/http-kernel:^${SYMFONY} \
71+
symfony/property-access:^${SYMFONY} \
72+
symfony/yaml:^${SYMFONY} \
73+
symfony/var-exporter:${VAR_EXPORTER} \
74+
--no-interaction --no-update
6275
composer update --with-all-dependencies --no-interaction --prefer-dist --no-progress
6376
6477
- name: Run tests

0 commit comments

Comments
 (0)