Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 4 additions & 88 deletions .github/workflows/testcore12.yml
Original file line number Diff line number Diff line change
@@ -1,96 +1,12 @@
name: tests core 12

on:
pull_request:
workflow_dispatch:

jobs:
code-quality:
name: "code quality with core v12"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version: [ '8.1' ]
dummy:
name: "dummy v11 (disabled on main) to allow creation of badges for other branches"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Prepare dependencies for TYPO3 v12"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s composerUpdate

- name: "Validate CGL"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s cgl -n

- name: "Ensure tests methods do not start with \"test\""
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s checkTestMethodsPrefix

- name: "Ensure UTF-8 files do not contain BOM"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s checkBom

# - name: "Test .rst files for integrity"
# run: |
# Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s checkRst

- name: "Find duplicate exception codes"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s checkExceptionCodes

- name: "Run PHPStan"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s phpstan

testsuite:
name: all tests with core v12
runs-on: ubuntu-22.04
needs: code-quality
strategy:
fail-fast: false
matrix:
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Prepare dependencies for TYPO3 v12"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s composerUpdate

- name: "Run PHP lint"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s lintPhp

- name: "Unit"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s unit

- name: "Unit Random"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s unitRandom

- name: "Functional SQLite"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d sqlite

- name: "Functional MariaDB 10.5 mysqli"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli

- name: "Functional MariaDB 10.5 pdo_mysql"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql

- name: "Functional MySQL 8.0 mysqli"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli

- name: "Functional MySQL 8.0 pdo_mysql"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql

- name: "Functional PostgresSQL 10"
run: |
Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d postgres
16 changes: 8 additions & 8 deletions .github/workflows/testcore13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [ '8.2', '8.3', '8.4' ]
php-version: [ '8.2', '8.3', '8.4', '8.5' ]
steps:
- name: "Checkout"
uses: actions/checkout@v4
Expand All @@ -77,20 +77,20 @@ jobs:

- name: "Functional MariaDB 10.5 mysqli"
run: |
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli -i 10.5

- name: "Functional MariaDB 10.5 pdo_mysql"
- name: "Functional MariaDB 10.11 pdo_mysql"
run: |
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql -i 10.11

- name: "Functional MySQL 8.0 mysqli"
run: |
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mysql -a mysqli -i 8.0

- name: "Functional MySQL 8.0 pdo_mysql"
- name: "Functional MySQL 8.4 pdo_mysql"
run: |
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mysql -a pdo_mysql -i 8.4

- name: "Functional PostgresSQL 10"
run: |
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d postgres
Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d postgres -i 10
65 changes: 16 additions & 49 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,11 @@ copyJavaScriptSourcesToBuild() {
}

buildCoreJavaScriptFiles() {
if [[ "${CORE_VERSION}" -eq 13 ]]; then
"Build/buildsystem/core${CORE_VERSION}/Build/Scripts/runTests.sh" -b ${CONTAINER_BIN} -s buildJavascript
else
"Build/buildsystem/core${CORE_VERSION}/Build/Scripts/runTests.sh" -s buildJavascript
fi
"Build/buildsystem/core${CORE_VERSION}/Build/Scripts/runTests.sh" -b ${CONTAINER_BIN} -s buildJavascript
}

buildApplyCompiledFilesToResources() {
echo ">> Copy compiled override JavaScripts back to resources folder ..."
if [[ "${CORE_VERSION}" -eq 12 ]]; then
# ensure folder exists
# mkdir -p "Resources/Public/JavaScript/Core${CORE_VERSION}/localization"
# copy files
cp -vf \
"./Build/buildsystem/core${CORE_VERSION}/typo3/sysext/backend/Resources/Public/JavaScript/localization.js" \
"Resources/Public/JavaScript/Core${CORE_VERSION}/localization.js"
# cp -vf \
# "./Build/buildsystem/core${CORE_VERSION}/typo3/sysext/backend/Resources/Public/JavaScript/localization/provider-list.js" \
# "Resources/Public/JavaScript/Core${CORE_VERSION}/localization/provider-list.js"
fi
if [[ "${CORE_VERSION}" -eq 13 ]]; then
# ensure folder exists
mkdir -p "Resources/Public/JavaScript/Core${CORE_VERSION}/localization"
Expand Down Expand Up @@ -274,18 +259,17 @@ Options:
- 15 maintained until 2027-11-11
- 16 maintained until 2028-11-09

-t <12|13>
-t <13>
Only with -s composerInstall|composerInstallMin|composerInstallMax
Specifies the TYPO3 CORE Version to be used
- 12: use TYPO3 v12 (default)
- 13: use TYPO3 v13
- 13: use TYPO3 v13 (default)

-p <8.1|8.2|8.3|8.4>
-p <8.2|8.3|8.4|8.5>
Specifies the PHP minor version to be used
- 8.1: use PHP 8.1 (default)
- 8.2: use PHP 8.2
- 8.2: use PHP 8.2 (default)
- 8.3: use PHP 8.3
- 8.4: use PHP 8.4
- 8.5: use PHP 8.5

-x
Only with -s functional|unit|unitRandom
Expand Down Expand Up @@ -316,31 +300,18 @@ Options:
Show this help.

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 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 unit -x

# 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
./Build/Scripts/runTests.sh -x -p 8.1 -s functional -d postgres Tests/Functional/LocalizationControllerTest.php

# Run functional tests on postgres 11
./Build/Scripts/runTests.sh -s functional -d postgres -k 11

# Run restricted set of application acceptance tests
./Build/Scripts/runTests.sh -s acceptance typo3/sysext/core/Tests/Acceptance/Application/Login/BackendLoginCest.php:loginButtonMouseOver

# Run installer tests of a new instance on sqlite
./Build/Scripts/runTests.sh -s acceptanceInstall -d sqlite
EOF
}

Expand All @@ -352,10 +323,10 @@ fi

# Option defaults
TEST_SUITE="unit"
CORE_VERSION="12"
CORE_JAVASCRIPT_CHECKOUT="12.4.0"
CORE_VERSION="13"
CORE_JAVASCRIPT_CHECKOUT="13.4.0"
DBMS="sqlite"
PHP_VERSION="8.1"
PHP_VERSION="8.2"
PHP_XDEBUG_ON=0
PHP_XDEBUG_PORT=9003
PHPUNIT_RANDOM=""
Expand Down Expand Up @@ -393,20 +364,16 @@ while getopts "a:b:s:d:i:p:t:xy:o:nhu" OPT; do
;;
p)
PHP_VERSION=${OPTARG}
if ! [[ ${PHP_VERSION} =~ ^(8.1|8.2|8.3|8.4)$ ]]; then
if ! [[ ${PHP_VERSION} =~ ^(8.2|8.3|8.4|8.5)$ ]]; then
INVALID_OPTIONS+=("p ${OPTARG}")
fi
;;
t)
CORE_VERSION=${OPTARG}
if ! [[ ${CORE_VERSION} =~ ^(12|13)$ ]]; then
if ! [[ ${CORE_VERSION} =~ ^(13)$ ]]; then
INVALID_OPTIONS+=("t ${OPTARG}")
fi
if [[ "${CORE_VERSION}" == "12" ]]; then
CORE_JAVASCRIPT_CHECKOUT="v12.4.0"
else
CORE_JAVASCRIPT_CHECKOUT="v13.4.0"
fi
CORE_JAVASCRIPT_CHECKOUT="v13.4.0"
;;
x)
PHP_XDEBUG_ON=1
Expand Down Expand Up @@ -450,7 +417,7 @@ fi

handleDbmsOptions

COMPOSER_ROOT_VERSION="1.0.x-dev"
COMPOSER_ROOT_VERSION="2.0.x-dev"
CONTAINER_INTERACTIVE="-it --init"
HOST_UID=$(id -u)
USERSET=""
Expand Down
2 changes: 0 additions & 2 deletions Build/phpstan/Core12/phpstan-baseline.neon

This file was deleted.

18 changes: 0 additions & 18 deletions Build/phpstan/Core12/phpstan.neon

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ shared base extension as common ground.

## Compatibility

| Branch | Version | TYPO3 | PHP |
|--------|-----------|-----------|-----------------------------------------|
| main | 1.0.x-dev | v12 + v13 | 8.1, 8.2, 8.3, 8.4 (depending on TYPO3) |
| 1 | ^1 | v12 + v13 | 8.1, 8.2, 8.3, 8.4 (depending on TYPO3) |
| Branch | Version | TYPO3 | PHP |
|--------|---------------|-----------|-----------------------------------------|
| main | 2.0.x-dev | v13 | 8.2, 8.3, 8.4, 8.5 (depending on TYPO3) |
| 1 | ^1, 1.0.x-dev | v12 + v13 | 8.1, 8.2, 8.3, 8.4 (depending on TYPO3) |

## Installation

Expand Down
38 changes: 19 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@
"app-dir": ".Build"
},
"branch-alias": {
"dev-main": "1.x.x-dev"
"dev-main": "2.0.x-dev"
}
},
"require": {
"php": "^8.1 || ^8.2 || ^8.3 || ^8.4",
"php": "^8.2 || ^8.3 || ^8.4 || ^8.5",
"ext-curl": "*",
"ext-json": "*",
"ext-pdo": "*",
"typo3/cms-backend": "^12.4.2 || ^13.4",
"typo3/cms-core": "^12.4.2 || ^13.4",
"typo3/cms-fluid": "^12.4.2 || ^13.4"
"typo3/cms-backend": "^13.4",
"typo3/cms-core": "^13.4",
"typo3/cms-fluid": "^13.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.41",
Expand All @@ -83,20 +83,20 @@
"saschaegerer/phpstan-typo3": "^1.9",
"sbuerk/typo3-site-based-test-trait": "^1.0.2 || ^2.0.1",
"sbuerk/typo3-styleguide-selector": "^12.0.5 || ^13.4",
"typo3/cms-belog": "^12.4.2 || ^13.4",
"typo3/cms-dashboard": "^12.4.2 || ^13.4",
"typo3/cms-extbase": "^12.4.2 || ^13.4",
"typo3/cms-extensionmanager": "^12.4.2 || ^13.4",
"typo3/cms-filelist": "^12.4.2 || ^13.4",
"typo3/cms-fluid-styled-content": "^12.4.2 || ^13.4",
"typo3/cms-frontend": "^12.4.2 || ^13.4",
"typo3/cms-info": "^12.4.2 || ^13.4",
"typo3/cms-install": "^12.4.2 || ^13.4",
"typo3/cms-lowlevel": "^12.4.2 || ^13.4",
"typo3/cms-rte-ckeditor": "^12.4.2 || ^13.4",
"typo3/cms-styleguide": "^12.0.5 || ^13.4",
"typo3/cms-tstemplate": "^12.4.2 || ^13.4",
"typo3/cms-workspaces": "^12.4.2 || ^13.4",
"typo3/cms-belog": "^13.4",
"typo3/cms-dashboard": "^13.4",
"typo3/cms-extbase": "^13.4",
"typo3/cms-extensionmanager": "^13.4",
"typo3/cms-filelist": "^13.4",
"typo3/cms-fluid-styled-content": "^13.4",
"typo3/cms-frontend": "^13.4",
"typo3/cms-info": "^13.4",
"typo3/cms-install": "^13.4",
"typo3/cms-lowlevel": "^13.4",
"typo3/cms-rte-ckeditor": "^13.4",
"typo3/cms-styleguide": "^13.4",
"typo3/cms-tstemplate": "^13.4",
"typo3/cms-workspaces": "^13.4",
"typo3/testing-framework": "^8.2.7"
},
"autoload": {
Expand Down