Commit de2394f2 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

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

This patch adds the ability to run commands with PHP8.2 using
`Build/Scripts/`. 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 possibility of the
new PHP version with proper example commands. Additionally, a
note and check for currently not supported xdebug with PHP8.2
is added.

Resolves: #97755
Releases: main, 11.5
Change-Id: I9df13d35278793fba8c5475c8abd602bd1c27896

Tested-by: Nikita Hovratov's avatarNikita Hovratov <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Tested-by: core-ci's avatarcore-ci <>
Tested-by: Stefan Bürk's avatarStefan Bürk <>
Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <>
parent 147e5a66
......@@ -106,6 +106,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
......@@ -207,9 +208,10 @@ Options:
Hack functional or acceptance tests into #numberOfChunks pieces and run tests of #chunk.
Example -c 3/13
-p <8.1>
-p <8.1|8.2>
Specifies the PHP minor version to be used
- 8.1 (default): 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
......@@ -258,7 +260,7 @@ Examples:
# Run all core units tests and enable xdebug (have a PhpStorm listening on port 9003!)
./Build/Scripts/ -x
# Run unit tests in phpunit verbose mode with xdebug on PHP 8.0 and filter for test canRetrieveValueWithGP
# Run unit tests in phpunit verbose mode with xdebug on PHP 8.1 and filter for test canRetrieveValueWithGP
./Build/Scripts/ -x -p 8.1 -e "-v --filter canRetrieveValueWithGP"
# Run functional tests in phpunit with a filtered test method name in a specified file
......@@ -268,7 +270,7 @@ Examples:
# Run unit tests with PHP 8.1 and have xdebug enabled
./Build/Scripts/ -x -p 8.1
# Run functional tests on postgres with xdebug, php 8.0 and execute a restricted set of tests
# Run functional tests on postgres with xdebug, php 8.1 and execute a restricted set of tests
./Build/Scripts/ -x -p 8.1 -s functional -d postgres typo3/sysext/core/Tests/Functional/Authentication
# Run functional tests on mariadb 10.5
......@@ -397,7 +399,7 @@ while getopts ":a:s:c:d:i:j:k:p:e:xy:o:nhuv" OPT; do
if ! [[ ${PHP_VERSION} =~ ^(8.1)$ ]]; then
if ! [[ ${PHP_VERSION} =~ ^(8.1|8.2)$ ]]; then
......@@ -435,6 +437,12 @@ while getopts ":a:s:c:d:i:j:k:p:e:xy:o:nhuv" OPT; do
# @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
# Exit on invalid options
if [ ${#INVALID_OPTIONS[@]} -ne 0 ]; then
echo "Invalid option(s):" >&2
Supports Markdown
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