Skip to content

Commit b879405

Browse files
committed
iterate
1 parent 32b1a6d commit b879405

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.github/workflows/.utils.sh

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,20 @@ _run_task() {
2323
}
2424
export -f _run_task
2525

26-
install_property_info_for_version() {
27-
local php_version="$1"
28-
local min_stability="$2"
26+
_before_test() {
27+
local package="$1"
28+
local php_version="$2"
29+
local min_stability="$3"
2930

30-
if [ "$php_version" = "8.2" ]; then
31-
composer require symfony/property-info:7.1.* symfony/type-info:7.2.*
32-
elif [ "$php_version" = "8.3" ]; then
33-
composer require symfony/property-info:7.2.* symfony/type-info:7.2.*
34-
elif [ "$php_version" = "8.4" ] && [ "$min_stability" = "stable" ]; then
35-
composer require symfony/property-info:7.3.* symfony/type-info:7.3.*
36-
elif [ "$php_version" = "8.4" ] && [ "$min_stability" = "dev" ]; then
37-
composer require symfony/property-info:>=7.3 symfony/type-info:>=7.3
38-
fi
31+
if [ "$package" = "LiveComponent" ]; then
32+
if [ "$php_version" = "8.2" ]; then
33+
composer require symfony/property-info:7.1.* symfony/type-info:7.2.*
34+
elif [ "$php_version" = "8.3" ]; then
35+
composer require symfony/property-info:7.2.* symfony/type-info:7.2.*
36+
elif [ "$php_version" = "8.4" ] && [ "$min_stability" = "stable" ]; then
37+
composer require symfony/property-info:7.3.* symfony/type-info:7.3.*
38+
elif [ "$php_version" = "8.4" ] && [ "$min_stability" = "dev" ]; then
39+
composer require symfony/property-info:>=7.3 symfony/type-info:>=7.3
40+
fi
41+
fi
3942
}
40-
export -f install_property_info_for_version

.github/workflows/unit-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
'(cd src/{1} \
133133
&& $COMPOSER_MIN_STAB \
134134
&& $COMPOSER_UP \
135-
&& if [ \"{1}\" = \"LiveComponent\" ]; then install_property_info_for_version \"${{ matrix.php-version }}\" \"${{ matrix.minimum-stability }}\"; fi \
135+
&& _before_test {1} ${{ matrix.php-version }} ${{ matrix.minimum-stability }} |
136136
&& $PHPUNIT)'"
137137
138138
js:

0 commit comments

Comments
 (0)