Skip to content

Commit c27c018

Browse files
committed
Update test script and autostart for Composer downgrade
1 parent a682d97 commit c27c018

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

.tests/scripts/get-modules.sh

+19-2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ PHP80_BASE="$( get_modules "8.0" "base" )"
6666
PHP81_BASE="$( get_modules "8.1" "base" )"
6767
PHP82_BASE="$( get_modules "8.2" "base" )"
6868
PHP83_BASE="$( get_modules "8.3" "base" )"
69+
PHP84_BASE="$( get_modules "8.4" "base" )"
6970

7071
PHP56_MODS="$( get_modules "5.6" "mods" )"
7172
PHP70_MODS="$( get_modules "7.0" "mods" )"
@@ -77,12 +78,13 @@ PHP80_MODS="$( get_modules "8.0" "mods" )"
7778
PHP81_MODS="$( get_modules "8.1" "mods" )"
7879
PHP82_MODS="$( get_modules "8.2" "mods" )"
7980
PHP83_MODS="$( get_modules "8.3" "mods" )"
81+
PHP84_MODS="$( get_modules "8.4" "mods" )"
8082

8183

8284
###
8385
### Todo: add ioncube
8486
###
85-
MODS="$( echo "${PHP56_MODS}, ${PHP70_MODS}, ${PHP71_MODS}, ${PHP72_MODS}, ${PHP73_MODS}, ${PHP74_MODS}, ${PHP80_MODS}, ${PHP81_MODS}, ${PHP82_MODS}, ${PHP83_MODS}" | sed 's/,/\n/g' | sed_command -e 's/^\s*//g' -e 's/\s*$//g' | sort -uf )"
87+
MODS="$( echo "${PHP56_MODS}, ${PHP70_MODS}, ${PHP71_MODS}, ${PHP72_MODS}, ${PHP73_MODS}, ${PHP74_MODS}, ${PHP80_MODS}, ${PHP81_MODS}, ${PHP82_MODS}, ${PHP83_MODS}, ${PHP84_MODS}" | sed 's/,/\n/g' | sed_command -e 's/^\s*//g' -e 's/\s*$//g' | sort -uf )"
8688

8789

8890
###
@@ -95,7 +97,7 @@ E="🗸" # Enabled mods modules (can be disabled)
9597
D="d" # Disabled modules (can be enabled)
9698
U=" " # Unavailable
9799

98-
echo "| Modules | <sup>PHP 5.6</sup> | <sup>PHP 7.0</sup> | <sup>PHP 7.1</sup> | <sup>PHP 7.2</sup> | <sup>PHP 7.3</sup> | <sup>PHP 7.4</sup> | <sup>PHP 8.0</sup> | <sup>PHP 8.1</sup> | <sup>PHP 8.2</sup> | <sup>PHP 8.3</sup> |"
100+
echo "| Modules | <sup>PHP 5.6</sup> | <sup>PHP 7.0</sup> | <sup>PHP 7.1</sup> | <sup>PHP 7.2</sup> | <sup>PHP 7.3</sup> | <sup>PHP 7.4</sup> | <sup>PHP 8.0</sup> | <sup>PHP 8.1</sup> | <sup>PHP 8.2</sup> | <sup>PHP 8.3</sup> | <sup>PHP 8.4</sup> |"
99101
echo "|-------------------------------|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|"
100102
echo "${MODS}" | while read -r line; do
101103
# Ignore modules
@@ -256,5 +258,20 @@ echo "${MODS}" | while read -r line; do
256258
printf " %s |" "${U}" # Not available
257259
fi
258260

261+
# ---------- PHP 8.4 ----------#
262+
if echo ",${PHP84_MODS}," | sed_command 's/,\s/,/g' | grep -Eq ",${line},"; then
263+
if echo "${DISABLED}" | grep -Eq ",${line},"; then
264+
printf " %s |" "${D}" # Currently disabled
265+
else
266+
if echo ",${PHP84_BASE}," | sed_command 's/,\s/,/g' | grep -Eq ",${line},"; then
267+
printf " %s |" "${B}" # Enabled, but cannot be disabled
268+
else
269+
printf " %s |" "${E}" # Enabled, can be disabled
270+
fi
271+
fi
272+
else
273+
printf " %s |" "${U}" # Not available
274+
fi
275+
259276
printf "\\n"
260277
done

.tests/tests/framework-cakephp.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )"
1414

1515
RETRIES=10
1616
# see framework-cakephp-php8.sh for PHP 8+ tests
17-
DISABLED_VERSIONS=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2" "8.3")
17+
DISABLED_VERSIONS=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2" "8.3", "8.4")
1818

1919
PHP_VERSION="$( get_php_version "${DVLBOX_PATH}" )"
2020

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -u
5+
set -o pipefail
6+
7+
# COMPOSER binary
8+
COMPOSER_BIN="/usr/local/bin/composer-2"
9+
10+
$COMPOSER_BIN self-update --2.2

0 commit comments

Comments
 (0)