diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39d7e82..b82ef1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,21 +39,48 @@ jobs: framework: '^8.0.2' prefer: '' testpath: 'Tests/Functional' + - php: '8.1' core: '^12.4' framework: '^8.0.2' prefer: '--prefer-lowest' testpath: 'Tests/Functional' + - php: '8.2' core: '^12.4' framework: '^8.0.2' prefer: '' testpath: 'Tests/Functional' + - php: '8.2' core: '^12.4' framework: '^8.0.2' prefer: '--prefer-lowest' testpath: 'Tests/Functional' + + - php: '8.2' + core: '^13.0' + framework: 'dev-main' + prefer: '' + testpath: 'Tests/Functional' + + - php: '8.2' + core: '^13.0' + framework: 'dev-main' + prefer: '--prefer-lowest' + testpath: 'Tests/Functional' + + - php: '8.3' + core: '^13.0' + framework: 'dev-main' + prefer: '' + testpath: 'Tests/Functional' + + - php: '8.3' + core: '^13.0' + framework: 'dev-main' + prefer: '--prefer-lowest' + testpath: 'Tests/Functional' steps: - name: Checkout uses: actions/checkout@v4 @@ -64,11 +91,11 @@ jobs: -p ${{ matrix.packages.php }} \ -s lintPhp - - name: Composer install - run: | - Build/Scripts/runTests.sh \ - -p ${{ matrix.packages.php }} \ - -s composerInstall +# - name: Composer install +# run: | +# Build/Scripts/runTests.sh \ +# -p ${{ matrix.packages.php }} \ +# -s composerInstall - name: Composer install core run: | diff --git a/Build/Scripts/additionalTests.sh b/Build/Scripts/additionalTests.sh index a0865bc..49fb49a 100755 --- a/Build/Scripts/additionalTests.sh +++ b/Build/Scripts/additionalTests.sh @@ -1,9 +1,11 @@ #!/usr/bin/env bash # -# TYPO3 core test runner based on docker. +# TYPO3 core test runner based on docker or podman # +trap 'cleanUp;exit 2' SIGINT + waitFor() { local HOST=${1} local PORT=${2} @@ -19,14 +21,21 @@ waitFor() { done; " ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name wait-for-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_ALPINE} /bin/sh -c "${TESTCOMMAND}" + if [[ $? -gt 0 ]]; then + kill -SIGINT -$$ + fi } cleanUp() { ATTACHED_CONTAINERS=$(${CONTAINER_BIN} ps --filter network=${NETWORK} --format='{{.Names}}') for ATTACHED_CONTAINER in ${ATTACHED_CONTAINERS}; do - ${CONTAINER_BIN} rm -f ${ATTACHED_CONTAINER} >/dev/null + ${CONTAINER_BIN} kill ${ATTACHED_CONTAINER} >/dev/null done - ${CONTAINER_BIN} network rm ${NETWORK} >/dev/null + if [ ${CONTAINER_BIN} = "docker" ]; then + ${CONTAINER_BIN} network rm ${NETWORK} >/dev/null + else + ${CONTAINER_BIN} network rm -f ${NETWORK} >/dev/null + fi } handleDbmsOptions() { @@ -40,8 +49,8 @@ handleDbmsOptions() { echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 exit 1 fi - [ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10.3" - if ! [[ ${DBMS_VERSION} =~ ^(10.3|10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1)$ ]]; then + [ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10.4" + if ! [[ ${DBMS_VERSION} =~ ^(10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1)$ ]]; then echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2 echo >&2 echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 @@ -57,7 +66,7 @@ handleDbmsOptions() { exit 1 fi [ -z "${DBMS_VERSION}" ] && DBMS_VERSION="8.0" - if ! [[ ${DBMS_VERSION} =~ ^(8.0)$ ]]; then + if ! [[ ${DBMS_VERSION} =~ ^(8.0|8.1|8.2|8.3)$ ]]; then echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2 echo >&2 echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 @@ -72,7 +81,7 @@ handleDbmsOptions() { exit 1 fi [ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10" - if ! [[ ${DBMS_VERSION} =~ ^(10|11|12|13|14|15)$ ]]; then + if ! [[ ${DBMS_VERSION} =~ ^(10|11|12|13|14|15|16)$ ]]; then echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2 echo >&2 echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 @@ -111,16 +120,6 @@ cleanBuildFiles() { echo "done" } -cleanCacheFiles() { - echo -n "Clean caches ... " - rm -rf \ - .cache \ - Build/.cache \ - Build/composer/.cache/ \ - .php-cs-fixer.cache - echo "done" -} - cleanTestFiles() { # test related echo -n "Clean test related files ... " @@ -136,11 +135,18 @@ cleanTestFiles() { echo "done" } -cleanRenderedDocumentationFiles() { - echo -n "Clean rendered documentation files ... " - rm -rf \ - typo3/sysext/*/Documentation-GENERATED-temp - echo "done" +getPhpImageVersion() { + case ${1} in + 8.1) + echo -n "2.12" + ;; + 8.2) + echo -n "1.12" + ;; + 8.3) + echo -n "1.13" + ;; + esac } loadHelp() { @@ -155,56 +161,20 @@ Usage: $0 [options] [file] Options: -s <...> Specifies the test suite to run - - acceptance: main application acceptance tests - - acceptanceInstall: installation acceptance tests, only with -d mariadb|postgres|sqlite - - buildCss: execute scss to css builder - - buildJavascript: execute typescript to javascript builder - - cgl: test and fix all core php files - - cglGit: test and fix latest committed patch for CGL compliance - - cglHeader: test and fix file header for all core php files - - cglHeaderGit: test and fix latest committed patch for CGL file header compliance - - checkAnnotations: check php code for allowed annotations - - checkBom: check UTF-8 files do not contain BOM - - checkComposer: check composer.json files for version integrity - - checkExceptionCodes: test core for duplicate exception codes - - checkExtensionScannerRst: test all .rst files referenced by extension scanner exist - - checkFilePathLength: test core file paths do not exceed maximum length - - checkGitSubmodule: test core git has no sub modules defined - - checkGruntClean: Verify "grunt build" is clean. Warning: Executes git commands! Usually used in CI only. - - checkIsoDatabase: Verify "updateIsoDatabase.php" does not change anything. - - checkNamespaceIntegrity: Verify namespace integrity in class and test code files are in good shape. - - checkPermissions: test some core files for correct executable bits - - checkRst: test .rst files for integrity - - checkTestClassFinal: check test case classes are final - - checkTestMethodsPrefix: check tests methods do not start with "test" + - buildDocumentation: test build the documentation - clean: clean up build, cache and testing related files and folders - - cleanBuild: clean up build related files and folders - - cleanCache: clean up cache related files and folders - - cleanRenderedDocumentation: clean up rendered documentation files and folders (Documentation-GENERATED-temp) - - cleanTests: clean up test related files and folders - - composerInstall: "composer install" - - composerInstallMax: "composer update", with no platform.php config. - - composerInstallMin: "composer update --prefer-lowest", with platform.php set to PHP version x.x.0. - - composerTestDistribution: "composer update" in Build/composer to verify core dependencies - - composerValidate: "composer validate" - - functional: PHP functional tests - - functionalDeprecated: deprecated PHP functional tests - - lintPhp: PHP linting - - lintScss: SCSS linting - - lintTypescript: TS linting - - lintHtml: HTML linting - - listExceptionCodes: list core exception codes in JSON format - - phpstan: phpstan tests - - phpstanGenerateBaseline: regenerate phpstan baseline, handy after phpstan updates - - unit (default): PHP unit tests - - unitDeprecated: deprecated PHP unit tests - - unitJavascript: JavaScript unit tests - - unitRandom: PHP unit tests in random order, add -o to use specific seed + - composerInstallPackage: install a package with composer + - lintXliff: test XLIFF language files + + -b + Container environment: + - podman (default) + - docker -p <8.1|8.2|8.3> Specifies the PHP minor version to be used - - 8.1 (default): use PHP 8.1 - - 8.2: use PHP 8.2 + - 8.1: use PHP 8.1 + - 8.2 (default): use PHP 8.2 - 8.3: use PHP 8.3 -q @@ -221,16 +191,13 @@ Options: Examples: # Run install a package with composer - ./Build/Scripts/additionalTests.sh -p 8.1 -s composerInstallPackage "typo3/cms-core:12.4" - - # Linting scss files - ./Build/Scripts/additionalTests.sh -s lintScss - - # Linting typescript files - ./Build/Scripts/additionalTests.sh -s lintTypescript + ./Build/Scripts/additionalTests.sh -p 8.2 -s composerInstallPackage "typo3/cms-core:13.0" # Test build the documentation ./Build/Scripts/additionalTests.sh -s buildDocumentation + + # Test XLIFF language files + ./Build/Scripts/additionalTests.sh -s lintXliff EOF } @@ -403,8 +370,6 @@ case ${TEST_SUITE} in ;; clean) cleanBuildFiles - cleanCacheFiles - cleanRenderedDocumentationFiles cleanTestFiles ;; composerInstallPackage) @@ -412,21 +377,6 @@ case ${TEST_SUITE} in ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-require-package-${SUFFIX} -w ${CORE_ROOT} -e COMPOSER_CACHE_DIR=${CORE_ROOT}/Build/.cache/composer ${IMAGE_PHP} /bin/sh -c "${COMMAND}" SUITE_EXIT_CODE=$? ;; - lintPhp) - COMMAND="[ ${SCRIPT_VERBOSE} -eq 1 ] && set -x; php -v | grep '^PHP'; find Classes/ -name \\*.php -print0 | xargs -0 -n1 -P4 php -dxdebug.mode=off -l > /dev/null;" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name lint-php-${SUFFIX} -w ${CORE_ROOT} ${IMAGE_PHP} /bin/sh -c "${COMMAND}" - SUITE_EXIT_CODE=$? - ;; - lintScss) - COMMAND="[ ${SCRIPT_VERBOSE} -eq 1 ] && set -x; cd Build; npm ci || exit 1; npm run lint:css;" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name lint-css-${SUFFIX} -w ${CORE_ROOT} -e HOME=${CORE_ROOT}/.cache ${IMAGE_NODEJS} /bin/sh -c "${COMMAND}" - SUITE_EXIT_CODE=$? - ;; - lintTypescript) - COMMAND="[ ${SCRIPT_VERBOSE} -eq 1 ] && set -x; cd Build; npm ci || exit 1; npm run lint:ts;" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name lint-typescript-${SUFFIX} -w ${CORE_ROOT} -e HOME=${CORE_ROOT}/.cache ${IMAGE_NODEJS} /bin/sh -c "${COMMAND}" - SUITE_EXIT_CODE=$? - ;; lintXliff) COMMAND="[ ${SCRIPT_VERBOSE} -eq 1 ] && set -x; xmllint --schema /xliff-core-1.2-strict.xsd --noout *.xlf;" ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name lint-xliff-${SUFFIX} -w ${CORE_ROOT}/Resources/Private/Language ${IMAGE_XLIFF} /bin/sh -c "${COMMAND}" diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index 35a3fc2..6935657 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -1,9 +1,11 @@ #!/usr/bin/env bash # -# TYPO3 core test runner based on docker. +# TYPO3 core test runner based on docker or podman # +trap 'cleanUp;exit 2' SIGINT + waitFor() { local HOST=${1} local PORT=${2} @@ -19,14 +21,21 @@ waitFor() { done; " ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name wait-for-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_ALPINE} /bin/sh -c "${TESTCOMMAND}" + if [[ $? -gt 0 ]]; then + kill -SIGINT -$$ + fi } cleanUp() { ATTACHED_CONTAINERS=$(${CONTAINER_BIN} ps --filter network=${NETWORK} --format='{{.Names}}') for ATTACHED_CONTAINER in ${ATTACHED_CONTAINERS}; do - ${CONTAINER_BIN} rm -f ${ATTACHED_CONTAINER} >/dev/null + ${CONTAINER_BIN} kill ${ATTACHED_CONTAINER} >/dev/null done - ${CONTAINER_BIN} network rm ${NETWORK} >/dev/null + if [ ${CONTAINER_BIN} = "docker" ]; then + ${CONTAINER_BIN} network rm ${NETWORK} >/dev/null + else + ${CONTAINER_BIN} network rm -f ${NETWORK} >/dev/null + fi } handleDbmsOptions() { @@ -40,8 +49,8 @@ handleDbmsOptions() { echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 exit 1 fi - [ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10.3" - if ! [[ ${DBMS_VERSION} =~ ^(10.3|10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1)$ ]]; then + [ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10.4" + if ! [[ ${DBMS_VERSION} =~ ^(10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1)$ ]]; then echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2 echo >&2 echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 @@ -57,7 +66,7 @@ handleDbmsOptions() { exit 1 fi [ -z "${DBMS_VERSION}" ] && DBMS_VERSION="8.0" - if ! [[ ${DBMS_VERSION} =~ ^(8.0)$ ]]; then + if ! [[ ${DBMS_VERSION} =~ ^(8.0|8.1|8.2|8.3)$ ]]; then echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2 echo >&2 echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 @@ -72,7 +81,7 @@ handleDbmsOptions() { exit 1 fi [ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10" - if ! [[ ${DBMS_VERSION} =~ ^(10|11|12|13|14|15)$ ]]; then + if ! [[ ${DBMS_VERSION} =~ ^(10|11|12|13|14|15|16)$ ]]; then echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2 echo >&2 echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 @@ -150,6 +159,20 @@ cleanRenderedDocumentationFiles() { echo "done" } +getPhpImageVersion() { + case ${1} in + 8.1) + echo -n "2.12" + ;; + 8.2) + echo -n "1.12" + ;; + 8.3) + echo -n "1.13" + ;; + esac +} + loadHelp() { # Load help text into $HELP read -r -d '' HELP < Specifies the test suite to run - acceptance: main application acceptance tests + - acceptanceComposer: main application acceptance tests - acceptanceInstall: installation acceptance tests, only with -d mariadb|postgres|sqlite - buildCss: execute scss to css builder - buildJavascript: execute typescript to javascript builder @@ -189,6 +213,7 @@ Options: - cleanCache: clean up cache related files and folders - cleanRenderedDocumentation: clean up rendered documentation files and folders (Documentation-GENERATED-temp) - cleanTests: clean up test related files and folders + - composer: "composer" command dispatcher, to execute various composer commands - composerInstall: "composer install" - composerInstallMax: "composer update", with no platform.php config. - composerInstallMin: "composer update --prefer-lowest", with platform.php set to PHP version x.x.0. @@ -201,6 +226,7 @@ Options: - lintTypescript: TS linting - lintHtml: HTML linting - listExceptionCodes: list core exception codes in JSON format + - npm: "npm" command dispatcher, to execute various npm commands directly - phpstan: phpstan tests - phpstanGenerateBaseline: regenerate phpstan baseline, handy after phpstan updates - unit (default): PHP unit tests @@ -208,6 +234,11 @@ Options: - unitJavascript: JavaScript unit tests - unitRandom: PHP unit tests in random order, add -o to use specific seed + -b + Container environment: + - podman (default) + - docker + -a Only with -s functional|functionalDeprecated Specifies to use another driver, following combinations are available: @@ -219,7 +250,7 @@ Options: - pdo_mysql -d - Only with -s functional|functionalDeprecated|acceptance|acceptanceInstall + Only with -s functional|functionalDeprecated|acceptance|acceptanceComposer|acceptanceInstall Specifies on which DBMS tests are performed - sqlite: (default): use sqlite - mariadb: use mariadb @@ -229,8 +260,7 @@ Options: -i version Specify a specific database version With "-d mariadb": - - 10.3 short-term, maintained until 2023-05-25 (default) - - 10.4 short-term, maintained until 2024-06-18 + - 10.4 short-term, maintained until 2024-06-18 (default) - 10.5 short-term, maintained until 2025-06-24 - 10.6 long-term, maintained until 2026-06 - 10.7 short-term, no longer maintained @@ -240,15 +270,19 @@ Options: - 10.11 long-term, maintained until 2028-02 - 11.0 development series - 11.1 short-term development series - With "-d mariadb": - - 8.0 maintained until 2026-04 (default) + With "-d mysql": + - 8.0 maintained until 2026-04 (default) LTS + - 8.1 unmaintained since 2023-10 + - 8.2 unmaintained since 2024-01 + - 8.3 maintained until 2024-04 With "-d postgres": - 10 unmaintained since 2022-11-10 (default) - - 11 maintained until 2023-11-09 + - 11 unmaintained since 2023-11-09 - 12 maintained until 2024-11-14 - 13 maintained until 2025-11-13 - 14 maintained until 2026-11-12 - 15 maintained until 2027-11-11 + - 16 maintained until 2028-11-09 -c Only with -s functional|acceptance @@ -257,24 +291,35 @@ Options: -p <8.1|8.2|8.3> Specifies the PHP minor version to be used - - 8.1 (default): use PHP 8.1 - - 8.2: use PHP 8.2 + - 8.1: use PHP 8.1 + - 8.2 (default): use PHP 8.2 - 8.3: use PHP 8.3 - -e "" + -t sets|systemplate + Only with -s acceptance|acceptanceComposer + Specifies which frontend rendering mechanism should be used + - sets: (default): use site sets + - systemplate: use sys_template records + + -e "" (DEPRECATED). Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom|acceptance Additional options to send to phpunit (unit & functional tests) or codeception (acceptance tests). For phpunit, options starting with "--" must be added after options starting with "-". - Example -e "-v --filter canRetrieveValueWithGP" to enable verbose output AND filter tests + Example -e "-d memory_limit=-1 --filter filterByValueRecursiveCorrectlyFiltersArray" to enable verbose output AND filter tests named "canRetrieveValueWithGP" + DEPRECATED - pass arguments after the `--` separator directly. For example, instead of + Build/Scripts/runTests.sh -s unit -e "--filter filterByValueRecursiveCorrectlyFiltersArray" + use + Build/Scripts/runTests.sh -s unit -- --filter filterByValueRecursiveCorrectlyFiltersArray + -g - Only with -s acceptance|acceptanceInstall + Only with -s acceptance|acceptanceComposer|acceptanceInstall Activate selenium grid as local port to watch browser clicking around. Can be surfed using http://localhost:7900/. A browser tab is opened automatically if xdg-open is installed. -x - Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom|acceptance|acceptanceInstall + Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom|acceptance|acceptanceComposer|acceptanceInstall Send information to host instance for test or system under test break points. This is especially useful if a local PhpStorm instance is listening on default xdebug port 9003. A different port can be selected with -y @@ -294,33 +339,31 @@ Options: Activate dry-run in CGL check that does not actively change files and only prints broken ones. -u - Update existing typo3/core-testing-*:latest container images and remove dangling local volumes. - New images are published once in a while and only the latest ones are supported by core testing. - Use this if weird test errors occur. Also removes obsolete image versions of typo3/core-testing-*. + Update existing typo3/core-testing-* container images and remove obsolete dangling image versions. + Use this if weird test errors occur. -h Show this help. - -v - Enable verbose script output. Shows variables and docker commands. - Examples: - # Run all core unit tests using PHP 8.1 + # Run all core unit tests using PHP 8.2 ./Build/Scripts/runTests.sh ./Build/Scripts/runTests.sh -s unit # Run all core units tests and enable xdebug (have a PhpStorm listening on port 9003!) ./Build/Scripts/runTests.sh -x - # Run unit tests in phpunit verbose mode with xdebug on PHP 8.1 and filter for test canRetrieveValueWithGP - ./Build/Scripts/runTests.sh -x -p 8.1 -e "-v --filter canRetrieveValueWithGP" + # Run unit tests in phpunit with xdebug on PHP 8.3 and filter for test filterByValueRecursiveCorrectlyFiltersArray + ./Build/Scripts/runTests.sh -x -p 8.3 -- --filter filterByValueRecursiveCorrectlyFiltersArray # Run functional tests in phpunit with a filtered test method name in a specified file # example will currently execute two tests, both of which start with the search term - ./Build/Scripts/runTests.sh -s functional -e "--filter deleteContent" typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php + ./Build/Scripts/runTests.sh -s functional -- \ + --filter datetimeInstanceCanBePersistedToDatabaseIfTypeIsExplicitlySpecified \ + typo3/sysext/core/Tests/Functional/Database/ConnectionTest.php - # Run functional tests on postgres with xdebug, php 8.1 and execute a restricted set of tests - ./Build/Scripts/runTests.sh -x -p 8.1 -s functional -d postgres typo3/sysext/core/Tests/Functional/Authentication + # Run functional tests on postgres with xdebug, php 8.3 and execute a restricted set of tests + ./Build/Scripts/runTests.sh -x -p 8.3 -s functional -d postgres typo3/sysext/core/Tests/Functional/Authentication # Run functional tests on postgres 11 ./Build/Scripts/runTests.sh -s functional -d postgres -i 11 @@ -330,34 +373,62 @@ Examples: # Run installer tests of a new instance on sqlite ./Build/Scripts/runTests.sh -s acceptanceInstall -d sqlite + + # Run composer require to require a dependency + ./Build/Scripts/runTests.sh -s composer -- require --dev typo3/testing-framework:dev-main + + # Some composer command examples + ./Build/Scripts/runTests.sh -s composer -- dumpautoload + ./Build/Scripts/runTests.sh -s composer -- info | grep "symfony" + + # Some npm command examples + ./Build/Scripts/runTests.sh -s npm -- audit + ./Build/Scripts/runTests.sh -s npm -- ci + ./Build/Scripts/runTests.sh -s npm -- run build + ./Build/Scripts/runTests.sh -s npm -- run watch:build + ./Build/Scripts/runTests.sh -s npm -- install --save bootstrap@^5.3.2 EOF } # Test if docker exists, else exit out with error -if ! type "docker" >/dev/null; then - echo "This script relies on docker. Please install" >&2 +if ! type "docker" >/dev/null 2>&1 && ! type "podman" >/dev/null 2>&1; then + echo "This script relies on docker or podman. Please install" >&2 exit 1 fi -# Option defaults +# Go to the directory this script is located, so everything else is relative +# to this dir, no matter from where this script is called, then go up two dirs. +THIS_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" +cd "$THIS_SCRIPT_DIR" || exit 1 +cd ../../ || exit 1 +CORE_ROOT="${PWD}" + +# Default variables TEST_SUITE="unit" DBMS="sqlite" DBMS_VERSION="" -PHP_VERSION="8.1" +PHP_VERSION="8.2" PHP_XDEBUG_ON=0 PHP_XDEBUG_PORT=9003 ACCEPTANCE_HEADLESS=1 +ACCEPTANCE_TOPIC="sets" EXTRA_TEST_OPTIONS="" PHPUNIT_RANDOM="" CGLCHECK_DRY_RUN="" DATABASE_DRIVER="" CHUNKS=0 THISCHUNK=0 -CONTAINER_BIN="docker" - -SCRIPT_VERBOSE=0 - - +CONTAINER_BIN="" +COMPOSER_ROOT_VERSION="13.2.x-dev" +PHPSTAN_CONFIG_FILE="phpstan.local.neon" +CONTAINER_INTERACTIVE="-it --init" +HOST_UID=$(id -u) +HOST_PID=$(id -g) +USERSET="" +SUFFIX=$(echo $RANDOM) +NETWORK="typo3-core-${SUFFIX}" +CI_PARAMS="${CI_PARAMS:-}" +CONTAINER_HOST="host.docker.internal" # Option parsing updates above default vars # Reset in case getopts has been used previously in the shell @@ -365,11 +436,17 @@ OPTIND=1 # Array for invalid options INVALID_OPTIONS=() # Simple option parsing based on getopts (! not getopt) -while getopts ":a:s:c:d:i:p:e:xy:o:nhugv" OPT; do +while getopts ":a:b:s:c:d:i:t:p:e:xy:o:nhug" OPT; do case ${OPT} in s) TEST_SUITE=${OPTARG} ;; + b) + if ! [[ ${OPTARG} =~ ^(docker|podman)$ ]]; then + INVALID_OPTIONS+=("${OPTARG}") + fi + CONTAINER_BIN=${OPTARG} + ;; a) DATABASE_DRIVER=${OPTARG} ;; @@ -400,6 +477,9 @@ while getopts ":a:s:c:d:i:p:e:xy:o:nhugv" OPT; do g) ACCEPTANCE_HEADLESS=0 ;; + t) + ACCEPTANCE_TOPIC=${OPTARG} + ;; x) PHP_XDEBUG_ON=1 ;; @@ -420,9 +500,6 @@ while getopts ":a:s:c:d:i:p:e:xy:o:nhugv" OPT; do u) TEST_SUITE=update ;; - v) - SCRIPT_VERBOSE=1 - ;; \?) INVALID_OPTIONS+=("${OPTARG}") ;; @@ -439,77 +516,73 @@ if [ ${#INVALID_OPTIONS[@]} -ne 0 ]; then echo "-"${I} >&2 done echo >&2 - echo "Use \"./Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 + echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2 exit 1 fi handleDbmsOptions -COMPOSER_ROOT_VERSION="7.0.1" -HOST_UID=$(id -u) -HOST_PID=$(id -g) -USERSET="" -if [ $(uname) != "Darwin" ]; then - USERSET="--user $HOST_UID" +# ENV var "CI" is set by gitlab-ci. Use it to force some CI details. +if [ "${CI}" == "true" ]; then + PHPSTAN_CONFIG_FILE="phpstan.ci.neon" + CONTAINER_INTERACTIVE="" fi -# Go to the directory this script is located, so everything else is relative -# to this dir, no matter from where this script is called, then go up two dirs. -THIS_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" -cd "$THIS_SCRIPT_DIR" || exit 1 -cd ../../ || exit 1 -CORE_ROOT="${PWD}" - -# Create .cache dir: composer and various npm jobs need this. -mkdir -p .cache -mkdir -p typo3temp/var/tests +# determine default container binary to use: 1. podman 2. docker +if [[ -z "${CONTAINER_BIN}" ]]; then + if type "podman" >/dev/null 2>&1; then + CONTAINER_BIN="podman" + elif type "docker" >/dev/null 2>&1; then + CONTAINER_BIN="docker" + fi +fi -PHPSTAN_CONFIG_FILE="phpstan.local.neon" -IMAGE_PREFIX="docker.io/" -# Non-CI fetches TYPO3 images (php and nodejs) from ghcr.io -TYPO3_IMAGE_PREFIX="ghcr.io/" -CONTAINER_INTERACTIVE="-it --init" +if [ $(uname) != "Darwin" ] && [ ${CONTAINER_BIN} = "docker" ]; then + # Run docker jobs as current user to prevent permission issues. Not needed with podman. + USERSET="--user $HOST_UID" +fi -IS_CORE_CI=0 -# ENV var "CI" is set by gitlab-ci. We use it here to distinct 'local' and 'CI' environment. -if [ "${CI}" == "true" ]; then - IS_CORE_CI=1 - PHPSTAN_CONFIG_FILE="phpstan.ci.neon" - # In CI, we need to pull images from docker.io for the registry proxy to kick in. - TYPO3_IMAGE_PREFIX="docker.io/" - IMAGE_PREFIX="" - CONTAINER_INTERACTIVE="" +if ! type ${CONTAINER_BIN} >/dev/null 2>&1; then + echo "Selected container environment \"${CONTAINER_BIN}\" not found. Please install or use -b option to select one." >&2 + exit 1 fi +IMAGE_APACHE="ghcr.io/typo3/core-testing-apache24:1.3" +IMAGE_PHP="ghcr.io/typo3/core-testing-$(echo "php${PHP_VERSION}" | sed -e 's/\.//'):$(getPhpImageVersion $PHP_VERSION)" -IMAGE_APACHE="${TYPO3_IMAGE_PREFIX}typo3/core-testing-apache24:latest" -IMAGE_PHP="${TYPO3_IMAGE_PREFIX}typo3/core-testing-$(echo "php${PHP_VERSION}" | sed -e 's/\.//'):latest" -IMAGE_NODEJS="${TYPO3_IMAGE_PREFIX}typo3/core-testing-nodejs18:latest" -IMAGE_NODEJS_CHROME="${TYPO3_IMAGE_PREFIX}typo3/core-testing-nodejs18-chrome:latest" -IMAGE_ALPINE="${IMAGE_PREFIX}alpine:3.8" -IMAGE_SELENIUM="${IMAGE_PREFIX}selenium/standalone-chrome:4.11.0-20230801" -IMAGE_REDIS="${IMAGE_PREFIX}redis:4-alpine" -IMAGE_MEMCACHED="${IMAGE_PREFIX}memcached:1.5-alpine" -IMAGE_MARIADB="${IMAGE_PREFIX}mariadb:${DBMS_VERSION}" -IMAGE_MYSQL="${IMAGE_PREFIX}mysql:${DBMS_VERSION}" -IMAGE_POSTGRES="${IMAGE_PREFIX}postgres:${DBMS_VERSION}-alpine" +IMAGE_NODEJS="ghcr.io/typo3/core-testing-nodejs22:1.0" +IMAGE_NODEJS_CHROME="ghcr.io/typo3/core-testing-nodejs22-chrome:1.0" +IMAGE_ALPINE="docker.io/alpine:3.8" +IMAGE_SELENIUM="docker.io/selenium/standalone-chrome:4.11.0-20230801" +IMAGE_REDIS="docker.io/redis:4-alpine" +IMAGE_MEMCACHED="docker.io/memcached:1.5-alpine" +IMAGE_MARIADB="docker.io/mariadb:${DBMS_VERSION}" +IMAGE_MYSQL="docker.io/mysql:${DBMS_VERSION}" +IMAGE_POSTGRES="docker.io/postgres:${DBMS_VERSION}-alpine" # Detect arm64 to use seleniarm image. ARCH=$(uname -m) if [ ${ARCH} = "arm64" ]; then - IMAGE_SELENIUM="${IMAGE_PREFIX}seleniarm/standalone-chromium:4.1.2-20220227" - echo "Architecture" ${ARCH} "requires" ${IMAGE_SELENIUM} "to run acceptance tests." + IMAGE_SELENIUM="docker.io/seleniarm/standalone-chromium:4.10.0-20230615" fi -# Set $1 to first mass argument, this is the optional test file or test directory to execute +# Remove handled options and leaving the rest in the line, so it can be passed raw to commands shift $((OPTIND - 1)) -TEST_FILE=${1} -SUFFIX=$(echo $RANDOM) -NETWORK="typo3-core-${SUFFIX}" +# Create .cache dir: composer and various npm jobs need this. +mkdir -p .cache +mkdir -p typo3temp/var/tests + ${CONTAINER_BIN} network create ${NETWORK} >/dev/null -CONTAINER_COMMON_PARAMS="${CONTAINER_INTERACTIVE} --rm --network $NETWORK --add-host "host.docker.internal:host-gateway" $USERSET -v ${CORE_ROOT}:${CORE_ROOT} -w ${CORE_ROOT}" +if [ ${CONTAINER_BIN} = "docker" ]; then + # docker needs the add-host for xdebug remote debugging. podman has host.container.internal built in + CONTAINER_COMMON_PARAMS="${CONTAINER_INTERACTIVE} --rm --network ${NETWORK} --add-host "${CONTAINER_HOST}:host-gateway" ${USERSET} -v ${CORE_ROOT}:${CORE_ROOT} -w ${CORE_ROOT}" +else + # podman + CONTAINER_HOST="host.containers.internal" + CONTAINER_COMMON_PARAMS="${CONTAINER_INTERACTIVE} ${CI_PARAMS} --rm --network ${NETWORK} -v ${CORE_ROOT}:${CORE_ROOT} -w ${CORE_ROOT}" +fi if [ ${PHP_XDEBUG_ON} -eq 0 ]; then XDEBUG_MODE="-e XDEBUG_MODE=off" @@ -517,26 +590,22 @@ if [ ${PHP_XDEBUG_ON} -eq 0 ]; then PHP_FPM_OPTIONS="-d xdebug.mode=off" else XDEBUG_MODE="-e XDEBUG_MODE=debug -e XDEBUG_TRIGGER=foo" - XDEBUG_CONFIG="client_port=${PHP_XDEBUG_PORT} client_host=host.docker.internal" - PHP_FPM_OPTIONS="-d xdebug.mode=debug -d xdebug.start_with_request=yes -d xdebug.client_host=host.docker.internal -d xdebug.client_port=${PHP_XDEBUG_PORT} -d memory_limit=256M" -fi -# if host uid is root, like for example on ci we need to set additional php-fpm command line options -if [ "${HOST_UID}" = 0 ]; then - PHP_FPM_OPTIONS+=" --allow-to-run-as-root" + XDEBUG_CONFIG="client_port=${PHP_XDEBUG_PORT} client_host=${CONTAINER_HOST}" + PHP_FPM_OPTIONS="-d xdebug.mode=debug -d xdebug.start_with_request=yes -d xdebug.client_host=${CONTAINER_HOST} -d xdebug.client_port=${PHP_XDEBUG_PORT} -d memory_limit=256M" fi # Suite execution case ${TEST_SUITE} in acceptance) - CODECEPION_ENV="" + CODECEPION_ENV="--env ci,classic,${ACCEPTANCE_TOPIC}" if [ "${ACCEPTANCE_HEADLESS}" -eq 1 ]; then - CODECEPION_ENV="--env headless" + CODECEPION_ENV="--env ci,classic,headless,${ACCEPTANCE_TOPIC}" fi if [ "${CHUNKS}" -gt 0 ]; then ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-splitter-${SUFFIX} ${IMAGE_PHP} php -dxdebug.mode=off Build/Scripts/splitAcceptanceTests.php -v ${CHUNKS} - COMMAND="bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} ${TEST_FILE} --html reports.html" + COMMAND=(bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} "$@" --html reports.html) else - COMMAND="bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} ${TEST_FILE} --html reports.html" + COMMAND=(bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} "$@" --html reports.html) fi SELENIUM_GRID="" if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ]; then @@ -545,11 +614,18 @@ case ${TEST_SUITE} in rm -rf "${CORE_ROOT}/typo3temp/var/tests/acceptance" "${CORE_ROOT}/typo3temp/var/tests/AcceptanceReports" mkdir -p "${CORE_ROOT}/typo3temp/var/tests/acceptance" APACHE_OPTIONS="-e APACHE_RUN_USER=#${HOST_UID} -e APACHE_RUN_SERVERNAME=web -e APACHE_RUN_GROUP=#${HOST_PID} -e APACHE_RUN_DOCROOT=${CORE_ROOT}/typo3temp/var/tests/acceptance -e PHPFPM_HOST=phpfpm -e PHPFPM_PORT=9000" - ${CONTAINER_BIN} run -d ${SELENIUM_GRID} --name ac-chrome-${SUFFIX} --network ${NETWORK} --network-alias chrome --tmpfs /dev/shm:rw,nosuid,nodev,noexec,relatime ${IMAGE_SELENIUM} >/dev/null - ${CONTAINER_BIN} run -d --name ac-phpfpm-${SUFFIX} --network ${NETWORK} --network-alias phpfpm --add-host "host.docker.internal:host-gateway" $USERSET -e PHPFPM_USER=${HOST_UID} -e PHPFPM_GROUP=${HOST_PID} -v ${CORE_ROOT}:${CORE_ROOT} ${IMAGE_PHP} php-fpm ${PHP_FPM_OPTIONS} >/dev/null - ${CONTAINER_BIN} run -d --name ac-web-${SUFFIX} --network ${NETWORK} --network-alias web --add-host "host.docker.internal:host-gateway" -v ${CORE_ROOT}:${CORE_ROOT} ${APACHE_OPTIONS} ${IMAGE_APACHE} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d ${SELENIUM_GRID} --name ac-chrome-${SUFFIX} --network ${NETWORK} --network-alias chrome --tmpfs /dev/shm:rw,nosuid,nodev,noexec ${IMAGE_SELENIUM} >/dev/null + if [ ${CONTAINER_BIN} = "docker" ]; then + ${CONTAINER_BIN} run --rm -d --name ac-phpfpm-${SUFFIX} --network ${NETWORK} --network-alias phpfpm --add-host "${CONTAINER_HOST}:host-gateway" ${USERSET} -e PHPFPM_USER=${HOST_UID} -e PHPFPM_GROUP=${HOST_PID} -v ${CORE_ROOT}:${CORE_ROOT} ${IMAGE_PHP} php-fpm ${PHP_FPM_OPTIONS} >/dev/null + ${CONTAINER_BIN} run --rm -d --name ac-web-${SUFFIX} --network ${NETWORK} --network-alias web --add-host "${CONTAINER_HOST}:host-gateway" -v ${CORE_ROOT}:${CORE_ROOT} ${APACHE_OPTIONS} ${IMAGE_APACHE} >/dev/null + else + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d --name ac-phpfpm-${SUFFIX} --network ${NETWORK} --network-alias phpfpm ${USERSET} -e PHPFPM_USER=0 -e PHPFPM_GROUP=0 -v ${CORE_ROOT}:${CORE_ROOT} ${IMAGE_PHP} php-fpm -R ${PHP_FPM_OPTIONS} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d --name ac-web-${SUFFIX} --network ${NETWORK} --network-alias web -v ${CORE_ROOT}:${CORE_ROOT} ${APACHE_OPTIONS} ${IMAGE_APACHE} >/dev/null + fi waitFor chrome 4444 - waitFor chrome 7900 + if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ]; then + waitFor chrome 7900 + fi waitFor web 80 if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ] && type "xdg-open" >/dev/null; then xdg-open http://localhost:7900/?autoconnect=1 >/dev/null @@ -558,35 +634,106 @@ case ${TEST_SUITE} in fi case ${DBMS} in mariadb) - ${CONTAINER_BIN} run --name mariadb-ac-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mariadb-ac-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null waitFor mariadb-ac-${SUFFIX} 3306 CONTAINERPARAMS="-e typo3DatabaseName=func_test -e typo3DatabaseUsername=root -e typo3DatabasePassword=funcp -e typo3DatabaseHost=mariadb-ac-${SUFFIX}" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-mariadb ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-mariadb ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; mysql) - ${CONTAINER_BIN} run --name mysql-ac-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mysql-ac-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null waitFor mysql-ac-${SUFFIX} 3306 CONTAINERPARAMS="-e typo3DatabaseName=func_test -e typo3DatabaseUsername=root -e typo3DatabasePassword=funcp -e typo3DatabaseHost=mysql-ac-${SUFFIX}" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-mysql ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-mysql ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; postgres) - ${CONTAINER_BIN} run --name postgres-ac-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-ac-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null waitFor postgres-ac-${SUFFIX} 5432 CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_pgsql -e typo3DatabaseName=func_test -e typo3DatabaseUsername=funcu -e typo3DatabasePassword=funcp -e typo3DatabaseHost=postgres-ac-${SUFFIX}" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-postgres ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-postgres ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; sqlite) rm -rf "${CORE_ROOT}/typo3temp/var/tests/acceptance-sqlite-dbs/" mkdir -p "${CORE_ROOT}/typo3temp/var/tests/acceptance-sqlite-dbs/" CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-sqlite ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-sqlite ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; esac ;; + acceptanceComposer) + rm -rf "${CORE_ROOT}/typo3temp/var/tests/acceptance-composer" "${CORE_ROOT}/typo3temp/var/tests/AcceptanceReports" + + PREPAREPARAMS="" + TESTPARAMS="" + case ${DBMS} in + mariadb) + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mariadb-ac-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=acp -e MYSQL_DATABASE=ac_test --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null + waitFor mariadb-ac-${SUFFIX} 3306 + PREPAREPARAMS="-e TYPO3_DB_DRIVER=mysqli -e TYPO3_DB_DBNAME=ac_test -e TYPO3_DB_USERNAME=root -e TYPO3_DB_PASSWORD=acp -e TYPO3_DB_HOST=mariadb-ac-${SUFFIX} -e TYPO3_DB_PORT=3306" + TESTPARAMS="-e typo3DatabaseName=ac_test -e typo3DatabaseUsername=root -e typo3DatabasePassword=funcp -e typo3DatabaseHost=mariadb-ac-${SUFFIX}" + ;; + mysql) + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mysql-ac-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=acp -e MYSQL_DATABASE=ac_test --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null + waitFor mysql-ac-${SUFFIX} 3306 + PREPAREPARAMS="-e TYPO3_DB_DRIVER=mysqli -e TYPO3_DB_DBNAME=ac_test -e TYPO3_DB_USERNAME=root -e TYPO3_DB_PASSWORD=acp -e TYPO3_DB_HOST=mysql-ac-${SUFFIX} -e TYPO3_DB_PORT=3306" + TESTPARAMS="-e typo3DatabaseName=ac_test -e typo3DatabaseUsername=root -e typo3DatabasePassword=funcp -e typo3DatabaseHost=mysql-ac-${SUFFIX}" + ;; + postgres) + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-ac-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_DB=ac_test -e POSTGRES_PASSWORD=acp -e POSTGRES_USER=ac_test --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null + waitFor postgres-ac-${SUFFIX} 5432 + PREPAREPARAMS="-e TYPO3_DB_DRIVER=postgres -e TYPO3_DB_DBNAME=ac_test -e TYPO3_DB_USERNAME=ac_test -e TYPO3_DB_PASSWORD=acp -e TYPO3_DB_HOST=postgres-ac-${SUFFIX} -e TYPO3_DB_PORT=5432" + TESTPARAMS="-e typo3DatabaseDriver=pdo_pgsql -e typo3DatabaseName=ac_test -e typo3DatabaseUsername=ac_test -e typo3DatabasePassword=acp -e typo3DatabaseHost=postgres-ac-${SUFFIX}" + ;; + sqlite) + PREPAREPARAMS="-e TYPO3_DB_DRIVER=sqlite" + TESTPARAMS="-e typo3DatabaseDriver=pdo_sqlite" + ;; + esac + + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name acceptance-prepare ${XDEBUG_MODE} -e COMPOSER_CACHE_DIR=${CORE_ROOT}/.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${PREPAREPARAMS} ${IMAGE_PHP} "${CORE_ROOT}/Build/Scripts/setupAcceptanceComposer.sh" "typo3temp/var/tests/acceptance-composer" sqlite "" "${ACCEPTANCE_TOPIC}" + SUITE_EXIT_CODE=$? + if [[ ${SUITE_EXIT_CODE} -eq 0 ]]; then + CODECEPION_ENV="--env ci,composer,${ACCEPTANCE_TOPIC}" + if [ "${ACCEPTANCE_HEADLESS}" -eq 1 ]; then + CODECEPION_ENV="--env ci,composer,headless,${ACCEPTANCE_TOPIC}" + fi + if [ "${CHUNKS}" -gt 0 ]; then + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-splitter-${SUFFIX} ${IMAGE_PHP} php -dxdebug.mode=off Build/Scripts/splitAcceptanceTests.php -v ${CHUNKS} + COMMAND=(bin/codecept run Application -d -g AcceptanceTests-Job-${THISCHUNK} -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} "$@" --html reports.html) + else + COMMAND=(bin/codecept run Application -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} "$@" --html reports.html) + fi + SELENIUM_GRID="" + if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ]; then + SELENIUM_GRID="-p 7900:7900 -e SE_VNC_NO_PASSWORD=1 -e VNC_NO_PASSWORD=1" + fi + APACHE_OPTIONS="-e APACHE_RUN_USER=#${HOST_UID} -e APACHE_RUN_SERVERNAME=web -e APACHE_RUN_GROUP=#${HOST_PID} -e APACHE_RUN_DOCROOT=${CORE_ROOT}/typo3temp/var/tests/acceptance-composer/public -e PHPFPM_HOST=phpfpm -e PHPFPM_PORT=9000" + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d ${SELENIUM_GRID} --name ac-chrome-${SUFFIX} --network ${NETWORK} --network-alias chrome --tmpfs /dev/shm:rw,nosuid,nodev,noexec ${IMAGE_SELENIUM} >/dev/null + if [ ${CONTAINER_BIN} = "docker" ]; then + ${CONTAINER_BIN} run --rm -d --name ac-phpfpm-${SUFFIX} --network ${NETWORK} --network-alias phpfpm --add-host "${CONTAINER_HOST}:host-gateway" ${USERSET} -e PHPFPM_USER=${HOST_UID} -e PHPFPM_GROUP=${HOST_PID} -v ${CORE_ROOT}:${CORE_ROOT} ${IMAGE_PHP} php-fpm ${PHP_FPM_OPTIONS} >/dev/null + ${CONTAINER_BIN} run --rm -d --name ac-web-${SUFFIX} --network ${NETWORK} --network-alias web --add-host "${CONTAINER_HOST}:host-gateway" -v ${CORE_ROOT}:${CORE_ROOT} ${APACHE_OPTIONS} ${IMAGE_APACHE} >/dev/null + else + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d --name ac-phpfpm-${SUFFIX} --network ${NETWORK} --network-alias phpfpm ${USERSET} -e PHPFPM_USER=0 -e PHPFPM_GROUP=0 -v ${CORE_ROOT}:${CORE_ROOT} ${IMAGE_PHP} php-fpm -R ${PHP_FPM_OPTIONS} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d --name ac-web-${SUFFIX} --network ${NETWORK} --network-alias web -v ${CORE_ROOT}:${CORE_ROOT} ${APACHE_OPTIONS} ${IMAGE_APACHE} >/dev/null + fi + waitFor chrome 4444 + if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ]; then + waitFor chrome 7900 + fi + waitFor web 80 + if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ] && type "xdg-open" >/dev/null; then + xdg-open http://localhost:7900/?autoconnect=1 >/dev/null + elif [ "${ACCEPTANCE_HEADLESS}" -eq 0 ] && type "open" >/dev/null; then + open http://localhost:7900/?autoconnect=1 >/dev/null + fi + + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name ac-${DBMS}-composer ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${TESTPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" + SUITE_EXIT_CODE=$? + fi + ;; acceptanceInstall) SELENIUM_GRID="" if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ]; then @@ -595,11 +742,18 @@ case ${TEST_SUITE} in rm -rf "${CORE_ROOT}/typo3temp/var/tests/acceptance" "${CORE_ROOT}/typo3temp/var/tests/AcceptanceReports" mkdir -p "${CORE_ROOT}/typo3temp/var/tests/acceptance" APACHE_OPTIONS="-e APACHE_RUN_USER=#${HOST_UID} -e APACHE_RUN_SERVERNAME=web -e APACHE_RUN_GROUP=#${HOST_PID} -e APACHE_RUN_DOCROOT=${CORE_ROOT}/typo3temp/var/tests/acceptance -e PHPFPM_HOST=phpfpm -e PHPFPM_PORT=9000" - ${CONTAINER_BIN} run -d ${SELENIUM_GRID} --name ac-istall-chrome-${SUFFIX} --network ${NETWORK} --network-alias chrome --tmpfs /dev/shm:rw,nosuid,nodev,noexec,relatime ${IMAGE_SELENIUM} >/dev/null - ${CONTAINER_BIN} run -d --name ac-install-phpfpm-${SUFFIX} --network ${NETWORK} --network-alias phpfpm --add-host "host.docker.internal:host-gateway" $USERSET -e PHPFPM_USER=${HOST_UID} -e PHPFPM_GROUP=${HOST_PID} -v ${CORE_ROOT}:${CORE_ROOT} ${IMAGE_PHP} php-fpm ${PHP_FPM_OPTIONS} >/dev/null - ${CONTAINER_BIN} run -d --name ac-install-web-${SUFFIX} --network ${NETWORK} --network-alias web --add-host "host.docker.internal:host-gateway" -v ${CORE_ROOT}:${CORE_ROOT} ${APACHE_OPTIONS} ${IMAGE_APACHE} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d ${SELENIUM_GRID} --name ac-install-chrome-${SUFFIX} --network ${NETWORK} --network-alias chrome --tmpfs /dev/shm:rw,nosuid,nodev,noexec ${IMAGE_SELENIUM} >/dev/null + if [ ${CONTAINER_BIN} = "docker" ]; then + ${CONTAINER_BIN} run --rm -d --name ac-install-phpfpm-${SUFFIX} --network ${NETWORK} --network-alias phpfpm --add-host "${CONTAINER_HOST}:host-gateway" ${USERSET} -e PHPFPM_USER=${HOST_UID} -e PHPFPM_GROUP=${HOST_PID} -v ${CORE_ROOT}:${CORE_ROOT} ${IMAGE_PHP} php-fpm ${PHP_FPM_OPTIONS} >/dev/null + ${CONTAINER_BIN} run --rm -d --name ac-install-web-${SUFFIX} --network ${NETWORK} --network-alias web --add-host "${CONTAINER_HOST}:host-gateway" -v ${CORE_ROOT}:${CORE_ROOT} ${APACHE_OPTIONS} ${IMAGE_APACHE} >/dev/null + else + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d --name ac-install-phpfpm-${SUFFIX} --network ${NETWORK} --network-alias phpfpm ${USERSET} -e PHPFPM_USER=0 -e PHPFPM_GROUP=0 -v ${CORE_ROOT}:${CORE_ROOT} ${IMAGE_PHP} php-fpm -R ${PHP_FPM_OPTIONS} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} -d --name ac-install-web-${SUFFIX} --network ${NETWORK} --network-alias web -v ${CORE_ROOT}:${CORE_ROOT} ${APACHE_OPTIONS} ${IMAGE_APACHE} >/dev/null + fi waitFor chrome 4444 - waitFor chrome 7900 + if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ]; then + waitFor chrome 7900 + fi waitFor web 80 if [ "${ACCEPTANCE_HEADLESS}" -eq 0 ] && type "xdg-open" >/dev/null; then xdg-open http://localhost:7900/?autoconnect=1 >/dev/null @@ -608,11 +762,11 @@ case ${TEST_SUITE} in fi case ${DBMS} in mariadb) - CODECEPION_ENV="--env mysql" + CODECEPION_ENV="--env ci,mysql" if [ "${ACCEPTANCE_HEADLESS}" -eq 1 ]; then - CODECEPION_ENV="--env mysql,headless" + CODECEPION_ENV="--env ci,mysql,headless" fi - ${CONTAINER_BIN} run --name mariadb-ac-install-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mariadb-ac-install-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null waitFor mariadb-ac-install-${SUFFIX} 3306 CONTAINERPARAMS="-e typo3InstallMysqlDatabaseName=func_test -e typo3InstallMysqlDatabaseUsername=root -e typo3InstallMysqlDatabasePassword=funcp -e typo3InstallMysqlDatabaseHost=mariadb-ac-install-${SUFFIX}" COMMAND="bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} --html reports.html" @@ -620,11 +774,11 @@ case ${TEST_SUITE} in SUITE_EXIT_CODE=$? ;; mysql) - CODECEPION_ENV="--env mysql" + CODECEPION_ENV="--env ci,mysql" if [ "${ACCEPTANCE_HEADLESS}" -eq 1 ]; then - CODECEPION_ENV="--env mysql,headless" + CODECEPION_ENV="--env ci,mysql,headless" fi - ${CONTAINER_BIN} run --name mysql-ac-install-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mysql-ac-install-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null waitFor mysql-ac-install-${SUFFIX} 3306 CONTAINERPARAMS="-e typo3InstallMysqlDatabaseName=func_test -e typo3InstallMysqlDatabaseUsername=root -e typo3InstallMysqlDatabasePassword=funcp -e typo3InstallMysqlDatabaseHost=mysql-ac-install-${SUFFIX}" COMMAND="bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} --html reports.html" @@ -632,11 +786,11 @@ case ${TEST_SUITE} in SUITE_EXIT_CODE=$? ;; postgres) - CODECEPION_ENV="--env postgresql" + CODECEPION_ENV="--env ci,postgresql" if [ "${ACCEPTANCE_HEADLESS}" -eq 1 ]; then - CODECEPION_ENV="--env postgresql,headless" + CODECEPION_ENV="--env ci,postgresql,headless" fi - ${CONTAINER_BIN} run --name postgres-ac-install-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-ac-install-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null waitFor postgres-ac-install-${SUFFIX} 5432 CONTAINERPARAMS="-e typo3InstallPostgresqlDatabasePort=5432 -e typo3InstallPostgresqlDatabaseName=${USER} -e typo3InstallPostgresqlDatabaseHost=postgres-ac-install-${SUFFIX} -e typo3InstallPostgresqlDatabaseUsername=funcu -e typo3InstallPostgresqlDatabasePassword=funcp" COMMAND="bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} --html reports.html" @@ -646,9 +800,9 @@ case ${TEST_SUITE} in sqlite) rm -rf "${CORE_ROOT}/typo3temp/var/tests/acceptance-sqlite-dbs/" mkdir -p "${CORE_ROOT}/typo3temp/var/tests/acceptance-sqlite-dbs/" - CODECEPION_ENV="--env sqlite" + CODECEPION_ENV="--env ci,sqlite" if [ "${ACCEPTANCE_HEADLESS}" -eq 1 ]; then - CODECEPION_ENV="--env sqlite,headless" + CODECEPION_ENV="--env ci,sqlite,headless" fi CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite" COMMAND="bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml ${EXTRA_TEST_OPTIONS} ${CODECEPION_ENV} --html reports.html" @@ -770,6 +924,11 @@ case ${TEST_SUITE} in cleanTests) cleanTestFiles ;; + composer) + COMMAND=(composer "$@") + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} "${COMMAND[@]}" + SUITE_EXIT_CODE=$? + ;; composerInstall) ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-install-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} composer install --no-progress --no-interaction SUITE_EXIT_CODE=$? @@ -796,84 +955,84 @@ case ${TEST_SUITE} in functional) if [ "${CHUNKS}" -gt 0 ]; then ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name func-splitter-${SUFFIX} ${IMAGE_PHP} php -dxdebug.mode=off Build/Scripts/splitFunctionalTests.php -v ${CHUNKS} - COMMAND="bin/phpunit -c Build/phpunit/FunctionalTests-Job-${THISCHUNK}.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}" + COMMAND=(bin/phpunit -c Build/phpunit/FunctionalTests-Job-${THISCHUNK}.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} "$@") else - COMMAND="bin/phpunit -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}" + COMMAND=(bin/phpunit -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} "$@") fi - ${CONTAINER_BIN} run --name redis-func-${SUFFIX} --network ${NETWORK} -d ${IMAGE_REDIS} >/dev/null - ${CONTAINER_BIN} run --name memcached-func-${SUFFIX} --network ${NETWORK} -d ${IMAGE_MEMCACHED} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name redis-func-${SUFFIX} --network ${NETWORK} -d ${IMAGE_REDIS} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name memcached-func-${SUFFIX} --network ${NETWORK} -d ${IMAGE_MEMCACHED} >/dev/null waitFor redis-func-${SUFFIX} 6379 waitFor memcached-func-${SUFFIX} 11211 CONTAINER_COMMON_PARAMS="${CONTAINER_COMMON_PARAMS} -e typo3TestingRedisHost=redis-func-${SUFFIX} -e typo3TestingMemcachedHost=memcached-func-${SUFFIX}" case ${DBMS} in mariadb) echo "Using driver: ${DATABASE_DRIVER}" - ${CONTAINER_BIN} run --name mariadb-func-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mariadb-func-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null waitFor mariadb-func-${SUFFIX} 3306 CONTAINERPARAMS="-e typo3DatabaseDriver=${DATABASE_DRIVER} -e typo3DatabaseName=func_test -e typo3DatabaseUsername=root -e typo3DatabaseHost=mariadb-func-${SUFFIX} -e typo3DatabasePassword=funcp" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; mysql) echo "Using driver: ${DATABASE_DRIVER}" - ${CONTAINER_BIN} run --name mysql-func-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mysql-func-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null waitFor mysql-func-${SUFFIX} 3306 CONTAINERPARAMS="-e typo3DatabaseDriver=${DATABASE_DRIVER} -e typo3DatabaseName=func_test -e typo3DatabaseUsername=root -e typo3DatabaseHost=mysql-func-${SUFFIX} -e typo3DatabasePassword=funcp" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; postgres) - ${CONTAINER_BIN} run --name postgres-func-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-func-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null waitFor postgres-func-${SUFFIX} 5432 CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_pgsql -e typo3DatabaseName=bamboo -e typo3DatabaseUsername=funcu -e typo3DatabaseHost=postgres-func-${SUFFIX} -e typo3DatabasePassword=funcp" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; sqlite) # create sqlite tmpfs mount typo3temp/var/tests/functional-sqlite-dbs/ to avoid permission issues mkdir -p "${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/" - CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite --tmpfs ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid,uid=${HOST_UID}" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite --tmpfs ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid" + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; esac ;; functionalDeprecated) - COMMAND="bin/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}" - ${CONTAINER_BIN} run --name redis-func-dep-${SUFFIX} --network ${NETWORK} -d ${IMAGE_REDIS} >/dev/null - ${CONTAINER_BIN} run --name memcached-func-dep-${SUFFIX} --network ${NETWORK} -d ${IMAGE_MEMCACHED} >/dev/null + COMMAND=(bin/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} "$@") + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name redis-func-dep-${SUFFIX} --network ${NETWORK} -d ${IMAGE_REDIS} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name memcached-func-dep-${SUFFIX} --network ${NETWORK} -d ${IMAGE_MEMCACHED} >/dev/null waitFor redis-func-dep-${SUFFIX} 6379 waitFor memcached-func-dep-${SUFFIX} 11211 CONTAINER_COMMON_PARAMS="${CONTAINER_COMMON_PARAMS} -e typo3TestingRedisHost=redis-func-dep-${SUFFIX} -e typo3TestingMemcachedHost=memcached-func-dep-${SUFFIX}" case ${DBMS} in mariadb) echo "Using driver: ${DATABASE_DRIVER}" - ${CONTAINER_BIN} run --name mariadb-func-dep-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mariadb-func-dep-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MARIADB} >/dev/null waitFor mariadb-func-dep-${SUFFIX} 3306 CONTAINERPARAMS="-e typo3DatabaseDriver=${DATABASE_DRIVER} -e typo3DatabaseName=func_test -e typo3DatabaseUsername=root -e typo3DatabaseHost=mariadb-func-dep-${SUFFIX} -e typo3DatabasePassword=funcp" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; mysql) echo "Using driver: ${DATABASE_DRIVER}" - ${CONTAINER_BIN} run --name mysql-func-dep-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name mysql-func-dep-${SUFFIX} --network ${NETWORK} -d -e MYSQL_ROOT_PASSWORD=funcp --tmpfs /var/lib/mysql/:rw,noexec,nosuid ${IMAGE_MYSQL} >/dev/null waitFor mysql-func-dep-${SUFFIX} 3306 CONTAINERPARAMS="-e typo3DatabaseDriver=${DATABASE_DRIVER} -e typo3DatabaseName=func_test -e typo3DatabaseUsername=root -e typo3DatabaseHost=mysql-func-dep-${SUFFIX} -e typo3DatabasePassword=funcp" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; postgres) - ${CONTAINER_BIN} run --name postgres-func-dep-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null + ${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-func-dep-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null waitFor postgres-func-dep-${SUFFIX} 5432 CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_pgsql -e typo3DatabaseName=bamboo -e typo3DatabaseUsername=funcu -e typo3DatabaseHost=postgres-func-dep-${SUFFIX} -e typo3DatabasePassword=funcp" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; sqlite) # create sqlite tmpfs mount typo3temp/var/tests/functional-sqlite-dbs/ to avoid permission issues mkdir -p "${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/" - CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite --tmpfs ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid,uid=${HOST_UID}" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND} + CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite --tmpfs ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid" + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; esac @@ -902,22 +1061,27 @@ case ${TEST_SUITE} in ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name list-exception-codes-${SUFFIX} ${IMAGE_PHP} Build/Scripts/duplicateExceptionCodeCheck.sh -p SUITE_EXIT_CODE=$? ;; + npm) + COMMAND=(npm "$@") + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} -w ${CORE_ROOT}/Build -e HOME=${CORE_ROOT}/.cache --name npm-${SUFFIX} ${IMAGE_NODEJS} "${COMMAND[@]}" + SUITE_EXIT_CODE=$? + ;; phpstan) - COMMAND="php -dxdebug.mode=off bin/phpstan analyse -c Build/phpstan/${PHPSTAN_CONFIG_FILE} --no-progress --no-interaction --memory-limit 4G ${TEST_FILE}" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name phpstan-${SUFFIX} ${IMAGE_PHP} sh -c "${COMMAND}" + COMMAND=(php -dxdebug.mode=off bin/phpstan analyse -c Build/phpstan/${PHPSTAN_CONFIG_FILE} --no-progress --no-interaction --memory-limit 4G "$@") + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name phpstan-${SUFFIX} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;; phpstanGenerateBaseline) COMMAND="php -dxdebug.mode=off bin/phpstan analyse -c Build/phpstan/${PHPSTAN_CONFIG_FILE} --no-progress --no-interaction --memory-limit 4G --generate-baseline=Build/phpstan/phpstan-baseline.neon" - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name phpstan-baseline-${SUFFIX} ${IMAGE_PHP} sh -c "${COMMAND}" + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name phpstan-baseline-${SUFFIX} ${IMAGE_PHP} /bin/sh -c "${COMMAND}" SUITE_EXIT_CODE=$? ;; unit) - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} bin/phpunit -c Build/phpunit/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} bin/phpunit -c Build/phpunit/UnitTests.xml ${EXTRA_TEST_OPTIONS} "$@" SUITE_EXIT_CODE=$? ;; unitDeprecated) - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} bin/phpunit -c Build/phpunit/UnitTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-deprecated-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} bin/phpunit -c Build/phpunit/UnitTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} "$@" SUITE_EXIT_CODE=$? ;; unitJavascript) @@ -926,21 +1090,17 @@ case ${TEST_SUITE} in SUITE_EXIT_CODE=$? ;; unitRandom) - ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} bin/phpunit -c Build/phpunit/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE} + ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} bin/phpunit -c Build/phpunit/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} "$@" SUITE_EXIT_CODE=$? ;; update) - # prune unused, dangling local volumes - echo "> prune unused, dangling local volumes" - ${CONTAINER_BIN} volume ls -q -f driver=local -f dangling=true | awk '$0 ~ /^[0-9a-f]{64}$/ { print }' | xargs -I {} ${CONTAINER_BIN} volume rm {} - echo "" - # pull typo3/core-testing-*:latest versions of those ones that exist locally - echo "> pull ${TYPO3_IMAGE_PREFIX}typo3/core-testing-*:latest versions of those ones that exist locally" - ${CONTAINER_BIN} images ${TYPO3_IMAGE_PREFIX}typo3/core-testing-*:latest --format "{{.Repository}}:latest" | xargs -I {} ${CONTAINER_BIN} pull {} + # pull typo3/core-testing-* versions of those ones that exist locally + echo "> pull ghcr.io/typo3/core-testing-* versions of those ones that exist locally" + ${CONTAINER_BIN} images "ghcr.io/typo3/core-testing-*" --format "{{.Repository}}:{{.Tag}}" | xargs -I {} ${CONTAINER_BIN} pull {} echo "" # remove "dangling" typo3/core-testing-* images (those tagged as ) - echo "> remove \"dangling\" ${TYPO3_IMAGE_PREFIX}typo3/core-testing-* images (those tagged as )" - ${CONTAINER_BIN} images ${TYPO3_IMAGE_PREFIX}typo3/core-testing-* --filter "dangling=true" --format "{{.ID}}" | xargs -I {} ${CONTAINER_BIN} rmi -f {} + echo "> remove \"dangling\" ghcr.io/typo3/core-testing-* images (those tagged as )" + ${CONTAINER_BIN} images --filter "reference=ghcr.io/typo3/core-testing-*" --filter "dangling=true" --format "{{.ID}}" | xargs -I {} ${CONTAINER_BIN} rmi -f {} echo "" ;; *) @@ -958,13 +1118,9 @@ cleanUp echo "" >&2 echo "###########################################################################" >&2 echo "Result of ${TEST_SUITE}" >&2 -if [[ ${IS_CORE_CI} -eq 1 ]]; then - echo "Environment: CI" >&2 -else - echo "Environment: local" >&2 -fi +echo "Container runtime: ${CONTAINER_BIN}" >&2 echo "PHP: ${PHP_VERSION}" >&2 -if [[ ${TEST_SUITE} =~ ^(functional|functionalDeprecated|acceptance|acceptanceInstall)$ ]]; then +if [[ ${TEST_SUITE} =~ ^(functional|functionalDeprecated|acceptance|acceptanceComposer|acceptanceInstall)$ ]]; then case "${DBMS}" in mariadb|mysql|postgres) echo "DBMS: ${DBMS} version ${DBMS_VERSION} driver ${DATABASE_DRIVER}" >&2 @@ -974,6 +1130,11 @@ if [[ ${TEST_SUITE} =~ ^(functional|functionalDeprecated|acceptance|acceptanceIn ;; esac fi +if [[ -n ${EXTRA_TEST_OPTIONS} ]]; then + echo " Note: Using -e is deprecated. Simply add the options at the end of the command." + echo " Instead of: Build/Scripts/runTests.sh -s ${TEST_SUITE} -e '${EXTRA_TEST_OPTIONS}' $@" + echo " use: Build/Scripts/runTests.sh -s ${TEST_SUITE} -- ${EXTRA_TEST_OPTIONS} $@" +fi if [[ ${SUITE_EXIT_CODE} -eq 0 ]]; then echo "SUCCESS" >&2 else diff --git a/Build/Scripts/test.sh b/Build/Scripts/test.sh index 392dcfc..89d1ea8 100755 --- a/Build/Scripts/test.sh +++ b/Build/Scripts/test.sh @@ -72,11 +72,6 @@ runFunctionalTests () { -s lintPhp || exit 1 ; \ EXIT_CODE_LINT=$? - ./runTests.sh \ - -p ${PHP_VERSION} \ - -s composerInstall || exit 1 ; \ - EXIT_CODE_LINT=$? - ./additionalTests.sh \ -p ${PHP_VERSION} \ -s composerInstallPackage \ @@ -121,8 +116,9 @@ runFunctionalTests () { echo -e "${RED}FAILURE${NC}" >&2 exit 1 fi - echo "#################################################################" >&2 + echo "###########################################################################" >&2 echo "" >&2 + cleanup } ################################################# @@ -136,13 +132,30 @@ cleanup () { git checkout ../../composer.json } -checkResources +DEBUG_TESTS=false +if [[ $DEBUG_TESTS != true ]]; then + checkResources + + TCORE="^12.4" + TFRAMEWORK="^8.0.2" + TPATH="Tests/Functional" + LOWEST="--prefer-lowest" + runFunctionalTests "8.1" ${TCORE} ${TFRAMEWORK} ${TPATH} || exit 1 + runFunctionalTests "8.1" ${TCORE} ${TFRAMEWORK} ${TPATH} ${LOWEST} || exit 1 + runFunctionalTests "8.2" ${TCORE} ${TFRAMEWORK} ${TPATH} || exit 1 + runFunctionalTests "8.2" ${TCORE} ${TFRAMEWORK} ${TPATH} ${LOWEST} || exit 1 + + TCORE="^13.0" + TFRAMEWORK="dev-main" + runFunctionalTests "8.2" ${TCORE} ${TFRAMEWORK} ${TPATH} || exit 1 + runFunctionalTests "8.2" ${TCORE} ${TFRAMEWORK} ${TPATH} ${LOWEST} || exit 1 + runFunctionalTests "8.3" ${TCORE} ${TFRAMEWORK} ${TPATH} || exit 1 + runFunctionalTests "8.3" ${TCORE} ${TFRAMEWORK} ${TPATH} ${LOWEST} || exit 1 +else + cleanup + runFunctionalTests "8.2" "^13.0" "dev-main" "Tests/Functional" || exit 1 + cleanup + # ./runTests.sh -x -p 8.2 -d sqlite -s functional -e "--group selected" Tests/Functional + # ./runTests.sh -x -p 8.2 -d sqlite -s functional Tests/Functional +fi -runFunctionalTests "8.1" "^12.4" "^8.0.2" "Tests/Functional" || exit 1 -cleanup -runFunctionalTests "8.1" "^12.4" "^8.0.2" "Tests/Functional" "--prefer-lowest" || exit 1 -cleanup -runFunctionalTests "8.2" "^12.4" "^8.0.2" "Tests/Functional" || exit 1 -cleanup -runFunctionalTests "8.2" "^12.4" "^8.0.2" "Tests/Functional" "--prefer-lowest" || exit 1 -cleanup diff --git a/Classes/Controller/AbstractController.php b/Classes/Controller/AbstractController.php index abe89bf..ab990ef 100644 --- a/Classes/Controller/AbstractController.php +++ b/Classes/Controller/AbstractController.php @@ -138,7 +138,7 @@ protected function getPaginator(QueryResultInterface|array $result): PaginatorIn $paginatorClass = is_array($result) ? ArrayPaginator::class : QueryResultPaginator::class; - /** @var QueryResultPaginator $resultPaginator */ + /** @var PaginatorInterface $resultPaginator */ $resultPaginator = GeneralUtility::makeInstance( $paginatorClass, $result, diff --git a/Classes/Controller/CategoryController.php b/Classes/Controller/CategoryController.php index 1f61996..84b9e96 100644 --- a/Classes/Controller/CategoryController.php +++ b/Classes/Controller/CategoryController.php @@ -42,7 +42,10 @@ protected function listAction(): ResponseInterface { if ( count($this->settings['category']) == 0 - || (count($this->settings['category']) == 1 && reset($this->settings['category']) < 1) + || ( + count($this->settings['category']) == 1 + && reset($this->settings['category']) < 1 + ) ) { $categories = $this->categoryRepository->findAll(); } else { diff --git a/Classes/Domain/Repository/AuthorRepository.php b/Classes/Domain/Repository/AuthorRepository.php index b55ce06..42841f5 100644 --- a/Classes/Domain/Repository/AuthorRepository.php +++ b/Classes/Domain/Repository/AuthorRepository.php @@ -43,7 +43,7 @@ public function findAuthorGroupedByLetters(): array ->from('tx_sfbooks_domain_model_author'); $storagePageIds = $query->getQuerySettings()->getStoragePageIds(); - if ($query->getQuerySettings()->getRespectStoragePage() && count($storagePageIds)) { + if (count($storagePageIds) && $query->getQuerySettings()->getRespectStoragePage()) { $queryBuilder->where($queryBuilder->expr()->in('pid', $storagePageIds)); } diff --git a/Classes/Domain/Repository/SeriesRepository.php b/Classes/Domain/Repository/SeriesRepository.php index 33550d6..27c53ea 100644 --- a/Classes/Domain/Repository/SeriesRepository.php +++ b/Classes/Domain/Repository/SeriesRepository.php @@ -42,7 +42,7 @@ public function findSeriesGroupedByLetters(): array ->from('tx_sfbooks_domain_model_series'); $storagePageIds = $query->getQuerySettings()->getStoragePageIds(); - if ($query->getQuerySettings()->getRespectStoragePage() && count($storagePageIds)) { + if (count($storagePageIds) && $query->getQuerySettings()->getRespectStoragePage()) { $queryBuilder->where($queryBuilder->expr()->in('pid', $storagePageIds)); } diff --git a/Classes/Updates/AbstractPopulateSlugs.php b/Classes/Updates/AbstractPopulateSlugs.php index 1af4162..de83bd5 100644 --- a/Classes/Updates/AbstractPopulateSlugs.php +++ b/Classes/Updates/AbstractPopulateSlugs.php @@ -37,7 +37,8 @@ abstract class AbstractPopulateSlugs implements UpgradeWizardInterface protected string $fieldName = 'path_segment'; - public function __construct(protected ConnectionPool $connectionPool) { + public function __construct(protected ConnectionPool $connectionPool) + { } abstract public function getTitle(): string; diff --git a/Documentation/guides.xml b/Documentation/guides.xml index fa99e86..3b6ed80 100644 --- a/Documentation/guides.xml +++ b/Documentation/guides.xml @@ -16,8 +16,8 @@ interlink-shortcode="evoweb/sf-books" /> diff --git a/composer.json b/composer.json index bb0badc..4777a69 100644 --- a/composer.json +++ b/composer.json @@ -17,9 +17,6 @@ }, "config": { "bin-dir": "bin", - "platform": { - "php": "8.1.1" - }, "sort-packages": true, "allow-plugins": { "typo3/class-alias-loader": true, @@ -27,16 +24,15 @@ } }, "require": { - "typo3/cms-core": "^12.4 || 12.4.x-dev || dev-main", - "typo3/cms-extbase": "^12.4 || 12.4.x-dev || dev-main", - "typo3/cms-fluid": "^12.4 || 12.4.x-dev || dev-main", - "typo3/cms-install": "^12.4 || 12.4.x-dev || dev-main", + "typo3/cms-core": "^12.4 || 12.4.x-dev || ^13.0 || 13.0.x-dev || dev-main", + "typo3/cms-extbase": "^12.4 || 12.4.x-dev || ^13.0 || 13.0.x-dev || dev-main", + "typo3/cms-fluid": "^12.4 || 12.4.x-dev || ^13.0 || 13.0.x-dev || dev-main", + "typo3/cms-install": "^12.4 || 12.4.x-dev || ^13.0 || 13.0.x-dev || dev-main", "psr/http-message": "^1.1 || ^2.0", "doctrine/dbal": "^3.7.2 || ^4.0" }, "require-dev": { - "typo3/testing-framework": "^8.0.2 || dev-main", - "sbuerk/typo3-cmscomposerinstallers-testingframework-bridge": "dev-main" + "typo3/testing-framework": "^8.0.2 || dev-main" }, "extra": { "typo3/cms": { diff --git a/ext_emconf.php b/ext_emconf.php index c2ed5e9..3d9cb6b 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -10,10 +10,10 @@ 'author_email' => 'typo3@evoweb.de', 'author_company' => 'evoWeb', 'state' => 'stable', - 'version' => '8.0.0', + 'version' => '8.1.0', 'constraints' => [ 'depends' => [ - 'typo3' => '12.0.0-12.4.99', + 'typo3' => '12.0.0-13.4.99', ], 'conflicts' => [], 'suggests' => [],