Skip to content

Commit fb281ff

Browse files
committed
[LiveComponent] tweak CI
1 parent c08e13b commit fb281ff

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/.utils.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,19 @@ _run_task() {
1919
exit $ok
2020
}
2121
export -f _run_task
22+
23+
install_property_info_for_version() {
24+
local php_version="$1"
25+
local min_stability="$2"
26+
27+
if [ "$php_version" = "8.2" ]; then
28+
composer require symfony/property-info:7.1.* symfony/type-info:7.3.*
29+
elif [ "$php_version" = "8.3" ]; then
30+
composer require symfony/property-info:7.2.* symfony/type-info:7.3.*
31+
elif [ "$php_version" = "8.4" ] && [ "$min_stability" = "stable" ]; then
32+
composer require symfony/property-info:7.3.* symfony/type-info:7.3.*
33+
elif [ "$php_version" = "8.4" ] && [ "$min_stability" = "dev" ]; then
34+
composer require symfony/property-info:>=7.3 symfony/type-info:>=7.3
35+
fi
36+
}
37+
export -f install_property_info_for_version

.github/workflows/unit-tests.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,7 @@ jobs:
7575
'(cd src/{} \
7676
&& $COMPOSER_MIN_STAB \
7777
&& $COMPOSER_UP \
78-
&& ([ {} = LiveComponent ] && [ \"${{ matrix.php-version }}\" = \"8.2\" ] && composer require symfony/property-info:7.1.* symfony/type-info:7.1.*) \
79-
&& ([ {} = LiveComponent ] && [ \"${{ matrix.php-version }}\" = \"8.3\" ] && composer require symfony/property-info:7.2.* symfony/type-info:7.2.*) \
80-
&& ([ {} = LiveComponent ] && [ \"${{ matrix.php-version }}\" = \"8.4\" ] && composer require symfony/property-info:7.3.* symfony/type-info:7.3.*) \
81-
&& ([ {} = LiveComponent ] && [ \"${{ matrix.php-version }}\" = \"8.4\" ] && [ \"${{ matrix.minimum-stability }}\" = \"dev\" ] && composer require symfony/property-info:>=7.3 symfony/type-info:>=7.3) \
78+
&& if [ {} = LiveComponent ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
8279
&& $PHPUNIT)'"
8380
8481
js:

0 commit comments

Comments
 (0)