Skip to content
Snippets Groups Projects
Commit 199e0da3 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[TASK] Add support for PHP8.2 to Build/Scripts/runTests.sh

This patch adds the ability to run commands with PHP8.2 using
`Build/Scripts/runTests.sh`. Support is added early to check
which issues may raise up with new major PHP version.

Help text of script is adopted to state the possibilty of the
new PHP version with proper example commands. Additionally a
note and check for currently not suppored xdebug with PHP8.2
is added.

Resolves: #97755
Releases: main, 11.5
Change-Id: I9df13d35278793fba8c5475c8abd602bd1c27896
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74870


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 56c8c01e
Branches
Tags
No related merge requests found
......@@ -115,6 +115,7 @@ cleanTestFiles() {
}
# Load help text into $HELP
# @todo Remove xdebug / php8.2 note after PHP8.2 image contains working xdebug.
read -r -d '' HELP <<EOF
TYPO3 core test runner. Execute acceptance, unit, functional and other test suites in
a docker based test environment. Handles execution of single test files, sending
......@@ -226,11 +227,12 @@ Options:
Hack functional or acceptance tests into #numberOfChunks pieces and run tests of #chunk.
Example -c 3/13
-p <7.4|8.0|8.1>
-p <7.4|8.0|8.1|8.2>
Specifies the PHP minor version to be used
- 7.4: (default) use PHP 7.4
- 8.0: use PHP 8.0
- 8.1: use PHP 8.1
- 8.2: use PHP 8.2 (note that xdebug is currently not available for PHP8.2)
-e "<phpunit options>"
Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom|acceptance
......@@ -418,7 +420,7 @@ while getopts ":a:s:c:d:i:j:k:p:e:xy:o:nhuv" OPT; do
;;
p)
PHP_VERSION=${OPTARG}
if ! [[ ${PHP_VERSION} =~ ^(7.4|8.0|8.1)$ ]]; then
if ! [[ ${PHP_VERSION} =~ ^(7.4|8.0|8.1|8.2)$ ]]; then
INVALID_OPTIONS+=("${OPTARG}")
fi
;;
......@@ -456,6 +458,12 @@ while getopts ":a:s:c:d:i:j:k:p:e:xy:o:nhuv" OPT; do
esac
done
# @todo Remove this check after PHP8.2 image contains xdebug
if [ "${PHP_VERSION}" == "8.2" -a ${PHP_XDEBUG_ON} -eq 1 ]; then
echo "xdebug not available for PHP 8.2; either use other PHP version or do not use -x"
exit 1
fi
# Exit on invalid options
if [ ${#INVALID_OPTIONS[@]} -ne 0 ]; then
echo "Invalid option(s):" >&2
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment