mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-09-20 00:36:14 +02:00

Merge branch 'main' into feature/reuseController-893

This commit is contained in:
marko deutscher 2024-05-07 14:46:26 +02:00
commit 5349412184
126 changed files with 1108 additions and 96298 deletions

View file

@ -1,283 +0,0 @@
name: tea
type: php
docroot: ""
php_version: "8.1"
webserver_type: nginx-fpm
router_http_port: "8081"
router_https_port: "4434"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
database:
type: mariadb
version: "10.5"
hooks:
post-start:
- exec: composer install --no-progress
omit_containers: [dba, ddev-ssh-agent]
webimage_extra_packages: [parallel]
use_dns_when_possible: true
composer_version: "2"
web_environment:
- typo3DatabaseName=typo3
- typo3DatabaseHost=db
- typo3DatabaseUsername=root
- typo3DatabasePassword=root
nodejs_version: "16"
# Key features of DDEV's config.yaml:
# name: <projectname> # Name of the project, automatically provides
# http://projectname.ddev.site and https://projectname.ddev.site
# type: <projecttype> # drupal6/7/8, backdrop, typo3, wordpress, php
# docroot: <relative_path> # Relative path to the directory containing index.php.
# php_version: "8.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"
# You can explicitly specify the webimage but this
# is not recommended, as the images are often closely tied to DDEV's' behavior,
# so this can break upgrades.
# webimage: <docker_image> # nginx/php docker image.
# database:
# type: <dbtype> # mysql, mariadb, postgres
# version: <version> # database version, like "10.4" or "8.0"
# MariaDB versions can be 5.5-10.8 and 10.11, MySQL versions can be 5.5-8.0
# PostgreSQL versions can be 9-16.
# router_http_port: <port> # Port to be used for http (defaults to global configuration, usually 80)
# router_https_port: <port> # Port for https (defaults to global configuration, usually 443)
# xdebug_enabled: false # Set to true to enable Xdebug and "ddev start" or "ddev restart"
# Note that for most people the commands
# "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better,
# as leaving Xdebug enabled all the time is a big performance hit.
# xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart"
# Note that for most people the commands
# "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better,
# as leaving Xhprof enabled all the time is a big performance hit.
# webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn
# timezone: Europe/Berlin
# This is the timezone used in the containers and by PHP;
# it can be set to any valid timezone,
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# For example Europe/Dublin or MST7MDT
# composer_root: <relative_path>
# Relative path to the Composer root directory from the project root. This is
# the directory which contains the composer.json and where all Composer related
# commands are executed.
# composer_version: "2"
# You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1
# to use the latest major version available at the time your container is built.
# It is also possible to use each other Composer version channel. This includes:
# - 2.2 (latest Composer LTS version)
# - stable
# - preview
# - snapshot
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
# To reinstall Composer after the image was built, run "ddev debug refresh".
# nodejs_version: "18"
# change from the default system Node.js version to another supported version, like 16, 18, 20.
# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any
# Node.js version, including v6, etc.
# You only need to configure this if you are not using nvm and you want to use a major
# version that is not the default.
# additional_hostnames:
# - somename
# - someothername
# would provide http and https URLs for "somename.ddev.site"
# and "someothername.ddev.site".
# additional_fqdns:
# - example.com
# - sub1.example.com
# would provide http and https URLs for "example.com" and "sub1.example.com"
# Please take care with this because it can cause great confusion.
# upload_dirs: "custom/upload/dir"
#
# upload_dirs:
# - custom/upload/dir
# - ../private
#
# would set the destination paths for ddev import-files to <docroot>/custom/upload/dir
# When Mutagen is enabled this path is bind-mounted so that all the files
# in the upload_dirs don't have to be synced into Mutagen.
# disable_upload_dirs_warning: false
# If true, turns off the normal warning that says
# "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set"
# ddev_version_constraint: ""
# Example:
# ddev_version_constraint: ">= 1.22.4"
# This will enforce that the running ddev version is within this constraint.
# See https://github.com/Masterminds/semver#checking-version-constraints for
# supported constraint formats
# working_dir:
# web: /var/www/html
# db: /home
# would set the default working directory for the web and db services.
# These values specify the destination directory for ddev ssh and the
# directory in which commands passed into ddev exec are run.
# omit_containers: [db, ddev-ssh-agent]
# Currently only these containers are supported. Some containers can also be
# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
# the "db" container, several standard features of DDEV that access the
# database container will be unusable. In the global configuration it is also
# possible to omit ddev-router, but not here.
# performance_mode: "global"
# DDEV offers performance optimization strategies to improve the filesystem
# performance depending on your host system. Should be configured globally.
#
# If set, will override the global config. Possible values are:
# - "global": uses the value from the global config.
# - "none": disables performance optimization for this project.
# - "mutagen": enables Mutagen for this project.
# - "nfs": enables NFS for this project.
#
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#nfs
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#mutagen
# fail_on_hook_fail: False
# Decide whether 'ddev start' should be interrupted by a failing hook
# host_https_port: "59002"
# The host port binding for https can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.
# host_webserver_port: "59001"
# The host port binding for the ddev-webserver can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.
# host_db_port: "59002"
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
# unless explicitly specified.
# mailpit_http_port: "8025"
# mailpit_https_port: "8026"
# The Mailpit ports can be changed from the default 8025 and 8026
# host_mailpit_port: "8025"
# The mailpit port is not normally bound on the host at all, instead being routed
# through ddev-router, but it can be bound directly to localhost if specified here.
# webimage_extra_packages: [php7.4-tidy, php-bcmath]
# Extra Debian packages that are needed in the webimage can be added here
# dbimage_extra_packages: [telnet,netcat]
# Extra Debian packages that are needed in the dbimage can be added here
# use_dns_when_possible: true
# If the host has internet access and the domain configured can
# successfully be looked up, DNS will be used for hostname resolution
# instead of editing /etc/hosts
# Defaults to true
# project_tld: ddev.site
# The top-level domain used for project URLs
# The default "ddev.site" allows DNS lookup via a wildcard
# If you prefer you can change this to "ddev.local" to preserve
# pre-v1.9 behavior.
# ngrok_args: --basic-auth username:pass1234
# Provide extra flags to the "ngrok http" command, see
# https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h"
# disable_settings_management: false
# If true, DDEV will not create CMS-specific settings files like
# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
# In this case the user must provide all such settings.
# You can inject environment variables into the web container with:
# web_environment:
# - SOMEENV=somevalue
# - SOMEOTHERENV=someothervalue
# no_project_mount: false
# (Experimental) If true, DDEV will not mount the project into the web container;
# the user is responsible for mounting it manually or via a script.
# This is to enable experimentation with alternate file mounting strategies.
# For advanced users only!
# bind_all_interfaces: false
# If true, host ports will be bound on all network interfaces,
# not the localhost interface only. This means that ports
# will be available on the local network if the host firewall
# allows it.
# default_container_timeout: 120
# The default time that DDEV waits for all containers to become ready can be increased from
# the default 120. This helps in importing huge databases, for example.
#web_extra_exposed_ports:
#- name: nodejs
# container_port: 3000
# http_port: 2999
# https_port: 3000
#- name: something
# container_port: 4000
# https_port: 4000
# http_port: 3999
# Allows a set of extra ports to be exposed via ddev-router
# Fill in all three fields even if you dont intend to use the https_port!
# If you dont add https_port, then it defaults to 0 and ddev-router will fail to start.
#
# The port behavior on the ddev-webserver must be arranged separately, for example
# using web_extra_daemons.
# For example, with a web app on port 3000 inside the container, this config would
# expose that web app on https://<project>.ddev.site:9999 and http://<project>.ddev.site:9998
# web_extra_exposed_ports:
# - name: myapp
# container_port: 3000
# http_port: 9998
# https_port: 9999
#web_extra_daemons:
#- name: "http-1"
# command: "/var/www/html/node_modules/.bin/http-server -p 3000"
# directory: /var/www/html
#- name: "http-2"
# command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000"
# directory: /var/www/html
# override_config: false
# By default, config.*.yaml files are *merged* into the configuration
# But this means that some things can't be overridden
# For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge
# and you can't erase existing hooks or all environment variables.
# However, with "override_config: true" in a particular config.*.yaml file,
# 'use_dns_when_possible: false' can override the existing values, and
# hooks:
# post-start: []
# or
# web_environment: []
# or
# additional_hostnames: []
# can have their intended affect. 'override_config' affects only behavior of the
# config.*.yaml file it exists in.
# Many DDEV commands can be extended to run tasks before or after the
# DDEV command is executed, for example "post-start", "post-import-db",
# "pre-composer", "post-composer"
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them. Example:
#hooks:

View file

@ -1,2 +0,0 @@
[PHP]
xdebug.mode=coverage,debug

View file

@ -1 +0,0 @@
node_modules

View file

@ -1,20 +0,0 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"env": {
"browser": true,
"node": true,
"es6": true,
"amd": true,
"jquery": true
},
"globals": {
"TYPO3": "readonly"
},
"parserOptions": {
"ecmaVersion": 8
}
}

5
.gitattributes vendored
View file

@ -1,8 +1,7 @@
/.Build/ export-ignore
/.ddev/ export-ignore
/.editorconfig export-ignore
/.eslintignore export-ignore
/.eslintrc.json export-ignore
/eslint.config.json export-ignore
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
@ -11,6 +10,8 @@
/.phpstorm.meta.php export-ignore
/.prettierrc.js export-ignore
/Build/ export-ignore
/Configuration/FunctionalTests.xml export-ignore
/Configuration/UnitTests.xml export-ignore
/Tests/ export-ignore
/package.json export-ignore
/phive.xml export-ignore

View file

@ -6,7 +6,10 @@ updates:
directory: "/"
schedule:
interval: "daily"
milestone: 6
# adjust this number according to your own milestones if used.
milestone: 12
commit-message:
prefix: "[TASK] "
- package-ecosystem: "composer"
directory: "/"
@ -18,14 +21,22 @@ updates:
- dependency-name: "doctrine/dbal"
- dependency-name: "phpunit/phpunit"
versions: [ "^10.0" ]
- dependency-name: "symfony/console"
- dependency-name: "symfony/translation"
- dependency-name: "symfony/yaml"
- dependency-name: "typo3/cms-*"
versioning-strategy: "increase"
milestone: 6
# adjust this number according to your own milestones if used.
milestone: 12
commit-message:
prefix: "[TASK] "
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: "increase"
milestone: 6
# adjust this number according to your own milestones if used.
milestone: 12
commit-message:
prefix: "[TASK] "

View file

@ -18,7 +18,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

View file

@ -22,6 +22,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
ini-file: development
coverage: none
tools: composer:v2
- name: "Show the Composer configuration"
@ -47,6 +48,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
ini-file: development
coverage: none
tools: composer:v2
- name: "Show Composer version"
@ -54,13 +56,13 @@ jobs:
- name: "Show the Composer configuration"
run: "composer config --global --list"
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies"
run: "composer install --no-progress"
run: "composer update --no-progress"
- name: "Run command"
run: "composer ci:${{ matrix.command }}"
strategy:
@ -75,8 +77,9 @@ jobs:
- "php:stan"
- "ts:lint"
- "yaml:lint"
- "xliff:lint"
php-version:
- "8.1"
- "8.3"
code-quality-frontend:
name: "Code quality frontend checks"
runs-on: ubuntu-22.04
@ -93,14 +96,6 @@ jobs:
run: yarn
- name: "Run command"
run: "yarn lint:${{ matrix.command }}"
xliff-lint:
name: "Xliff linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run the xliff lint"
uses: TYPO3-Continuous-Integration/TYPO3-CI-Xliff-Lint@v1
unit-tests:
name: "Unit tests"
runs-on: ubuntu-22.04
@ -112,6 +107,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
ini-file: development
coverage: none
tools: composer:v2
- name: "Show Composer version"
@ -119,7 +115,7 @@ jobs:
- name: "Show the Composer configuration"
run: "composer config --global --list"
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
@ -210,6 +206,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
ini-file: development
tools: composer:v2
extensions: mysqli
coverage: none
@ -218,7 +215,7 @@ jobs:
- name: "Show the Composer configuration"
run: "composer config --global --list"
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
@ -300,3 +297,13 @@ jobs:
- typo3-version: "^12.4"
php-version: "8.3"
composer-dependencies: highest
documentation:
name: Documentation
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test if the documentation will render without warnings
run: |
docker run --rm --pull always -v $(pwd):/project \
ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log

View file

@ -26,14 +26,19 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
ini-file: development
tools: composer:v2, phive
extensions: mysqli
coverage: pcov
ini-values: pcov.directory=Classes
- name: "Install development tools"
run: phive --no-progress install --trust-gpg-keys D8406D0D82947747293778314AA394086372C20A
- name: "Show Composer version"
run: composer --version
- name: "Show the Composer configuration"
run: composer config --global --list
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
@ -58,6 +63,8 @@ jobs:
run: "sudo /etc/init.d/mysql start"
- name: "Run unit tests with coverage"
run: composer ci:coverage:unit
- name: "Show generated coverage files"
run: "ls -lahR .Build/coverage/"
- name: "Run functional tests with coverage"
run: |
export typo3DatabaseName="$DB_DATABASE";
@ -65,8 +72,12 @@ jobs:
export typo3DatabaseUsername="$DB_USER";
export typo3DatabasePassword="$DB_PASSWORD";
composer ci:coverage:functional
- name: "Show generated coverage files"
run: "ls -lahR .Build/coverage/"
- name: "Merge coverage results"
run: composer ci:coverage:merge
- name: "Show merged coverage files"
run: "ls -lahR ./.Build/logs/"
- name: "Upload coverage results to Coveralls"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -75,6 +86,6 @@ jobs:
fail-fast: false
matrix:
include:
- typo3-version: "^11.5"
php-version: "7.4"
- typo3-version: "^12.4"
php-version: "8.3"
composer-dependencies: highest

View file

@ -1,315 +0,0 @@
# This workflow does not use the Composer actions for calling the tools.
# Use this workflow if you do not intend to call the code quality checks locally,
# but only in the CI builds.
#
# Note that, to keep things fast, pull requests and pushes do not trigger this workflow.
# If you are going to use this workflow, please copy the corresponding trigger settings from the `ci.yml` workflow.
---
name: CI with predefined GitHub actions
on:
workflow_dispatch:
permissions:
contents: read
jobs:
php-lint:
name: "PHP linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
- name: "Run PHP lint"
run: "composer ci:php:lint"
strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
typoscript-lint:
name: "TypoScript linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run TypoScript lint"
uses: TYPO3-Continuous-Integration/TYPO3-CI-Typoscript-Lint@v1
php-codesniffer:
name: "PHP Codesniffer"
runs-on: ubuntu-22.04
needs: php-lint
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run PHP Codesniffer"
uses: TYPO3-Continuous-Integration/TYPO3-CI-PHP-Codesniffer@v1
yaml-lint:
name: "YAML linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run YAML lint"
uses: TYPO3-Continuous-Integration/TYPO3-CI-YAML-Lint@v1
json-lint:
name: "JSON linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run JSON lint"
uses: TYPO3-Continuous-Integration/TYPO3-CI-JSON-Lint@v1
php-cs-fixer:
name: "PHP CS Fixer"
runs-on: ubuntu-22.04
needs: php-lint
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run PHP CS Fixer"
uses: TYPO3-Continuous-Integration/TYPO3-CI-PHP-CS-Fixer@v1
phpstan-check:
name: "PHPStan check"
runs-on: ubuntu-22.04
needs: php-lint
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run PHPStan"
uses: TYPO3-Continuous-Integration/TYPO3-CI-PHPStan@v1
with:
config_file: './phpstan.neon'
code-quality:
name: "Code quality checks"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
- name: "Show Composer version"
run: composer --version
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies"
run: "composer install --no-progress"
- name: "Run command"
run: "composer ci:${{ matrix.command }}"
strategy:
fail-fast: false
matrix:
command:
- "composer:normalize"
- "php:sniff"
php-version:
- "8.1"
code-quality-frontend:
name: "Code quality frontend checks"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
command:
- "style"
- "js"
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install modules"
run: yarn
- name: "Run command"
run: "yarn lint:${{ matrix.command }}"
xliff-lint:
name: "Xliff linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run the xliff lint"
uses: TYPO3-Continuous-Integration/TYPO3-CI-Xliff-Lint@v1
unit-tests:
name: "Unit tests"
runs-on: ubuntu-22.04
needs: php-lint
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
- name: "Show Composer version"
run: composer --version
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
with:
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-\n"
- name: "Install TYPO3 Core"
env:
TYPO3: "${{ matrix.typo3-version }}"
run: |
composer require --no-progress typo3/cms-core:"$TYPO3"
composer show
- name: "Install lowest dependencies with composer"
if: "matrix.composer-dependencies == 'lowest'"
run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
composer show
- name: "Install highest dependencies with composer"
if: "matrix.composer-dependencies == 'highest'"
run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies
composer show
- name: "Run unit tests"
run: "composer ci:tests:unit"
strategy:
fail-fast: false
matrix:
include:
- typo3-version: "^11.5"
php-version: "7.4"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "7.4"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.0"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.0"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.1"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.1"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.2"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.2"
composer-dependencies: highest
- typo3-version: "^12.4"
php-version: "8.1"
composer-dependencies: lowest
- typo3-version: "^12.4"
php-version: "8.1"
composer-dependencies: highest
- typo3-version: "^12.4"
php-version: "8.2"
composer-dependencies: lowest
- typo3-version: "^12.4"
php-version: "8.2"
composer-dependencies: highest
functional-tests:
name: "Functional tests"
runs-on: ubuntu-22.04
needs: php-lint
env:
DB_DATABASE: typo3
DB_USER: root
DB_PASSWORD: root
DB_HOST: localhost
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2
extensions: mysqli
coverage: none
- name: "Show Composer version"
run: composer --version
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
with:
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-\n"
- name: "Install TYPO3 Core"
env:
TYPO3: "${{ matrix.typo3-version }}"
run: |
composer require --no-progress typo3/cms-core:"$TYPO3"
composer show
- name: "Install lowest dependencies with composer"
if: "matrix.composer-dependencies == 'lowest'"
run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
composer show
- name: "Install highest dependencies with composer"
if: "matrix.composer-dependencies == 'highest'"
run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies
composer show
- name: "Start MySQL"
run: "sudo /etc/init.d/mysql start"
- name: "Run functional tests"
run: |
export typo3DatabaseName="$DB_DATABASE";
export typo3DatabaseHost="$DB_HOST";
export typo3DatabaseUsername="$DB_USER";
export typo3DatabasePassword="$DB_PASSWORD";
composer ci:tests:functional
strategy:
fail-fast: false
matrix:
include:
- typo3-version: "^11.5"
php-version: "7.4"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "7.4"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.0"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.0"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.1"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.1"
composer-dependencies: highest
- typo3-version: "^11.5"
php-version: "8.2"
composer-dependencies: lowest
- typo3-version: "^11.5"
php-version: "8.2"
composer-dependencies: highest
- typo3-version: "^12.4"
php-version: "8.1"
composer-dependencies: lowest
- typo3-version: "^12.4"
php-version: "8.1"
composer-dependencies: highest
- typo3-version: "^12.4"
php-version: "8.2"
composer-dependencies: lowest
- typo3-version: "^12.4"
php-version: "8.2"
composer-dependencies: highest

View file

@ -4,10 +4,4 @@
set -xe
apt-get update -yqq
apt-get install git libzip-dev unzip parallel libxml2-utils wget wait-for-it libicu-dev -yqq
php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/local/bin/ --filename=composer
chmod +x /usr/local/bin/composer
docker-php-ext-install pdo_mysql zip mysqli intl
apk add parallel

View file

@ -31,7 +31,9 @@ include:
- '/.gitlab/pipeline/jobs/php-lint-php8.0.yml'
- '/.gitlab/pipeline/jobs/php-lint-php8.1.yml'
- '/.gitlab/pipeline/jobs/php-lint-php8.2.yml'
- '/.gitlab/pipeline/jobs/php-lint-php8.3.yml'
- '/.gitlab/pipeline/jobs/phpcs.yml'
- '/.gitlab/pipeline/jobs/php-cs-fixer.yml'
- '/.gitlab/pipeline/jobs/ts-lint.yml'
- '/.gitlab/pipeline/jobs/unit-php7.4-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php7.4-v11-lowest.yml'
@ -41,10 +43,14 @@ include:
- '/.gitlab/pipeline/jobs/unit-php8.1-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v11-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v11-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.1-v12-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.1-v12-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v12-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.2-v12-lowest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v12-highest.yml'
- '/.gitlab/pipeline/jobs/unit-php8.3-v12-lowest.yml'
- '/.gitlab/pipeline/jobs/xliff-lint.yml'
- '/.gitlab/pipeline/jobs/yaml-lint.yml'
- template: Security/Secret-Detection.gitlab-ci.yml

View file

@ -1,4 +1,4 @@
.default:
image: php:7.4
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
before_script:
- bash .gitlab/build/docker_install.sh > /dev/null

View file

@ -7,7 +7,7 @@ build-composer-dependencies:
script:
- composer --version
- COMPOSER_CACHE_DIR=.composer
composer install --prefer-dist --no-progress --optimize-autoloader
composer update --prefer-dist --no-progress --optimize-autoloader
artifacts:
when: on_success
expire_in: 2 weeks

View file

@ -1,6 +1,6 @@
func-php7.4-v11-highest:
extends: .default
image: php:7.4
image: ghcr.io/sbuerk/demo-core-testing-php74:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php7.4-v11-highest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php7.4-v11-lowest:
extends: .default
image: php:7.4
image: ghcr.io/sbuerk/demo-core-testing-php74:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php7.4-v11-lowest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.0-v11-highest:
extends: .default
image: php:8.0
image: ghcr.io/sbuerk/demo-core-testing-php80:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.0-v11-highest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.0-v11-lowest:
extends: .default
image: php:8.0
image: ghcr.io/sbuerk/demo-core-testing-php80:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.0-v11-lowest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.1-v11-highest:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.1-v11-highest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.1-v11-lowest:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.1-v11-lowest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.1-v11-highest:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.1-v11-highest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.1-v11-lowest:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.1-v11-lowest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.2-v11-highest:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.2-v11-highest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.2-v11-lowest:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.2-v11-lowest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.2-v11-highest:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.2-v11-highest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -1,6 +1,6 @@
func-php8.2-v12-lowest:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
services:
- mariadb:10
stage: test
@ -11,4 +11,4 @@ func-php8.2-v12-lowest:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- wait-for-it mariadb:3306 -t 60 --strict -- composer ci:tests:functional
- composer ci:tests:functional

View file

@ -0,0 +1,14 @@
func-php8.3-v11-highest:
extends: .default
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
services:
- mariadb:10
stage: test
needs:
- build-composer-dependencies
- php-lint-php8.3
script:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- composer ci:tests:functional

View file

@ -0,0 +1,14 @@
func-php8.3-v11-lowest:
extends: .default
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
services:
- mariadb:10
stage: test
needs:
- build-composer-dependencies
- php-lint-php8.3
script:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- composer ci:tests:functional

View file

@ -0,0 +1,14 @@
func-php8.3-v11-highest:
extends: .default
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
services:
- mariadb:10
stage: test
needs:
- build-composer-dependencies
- php-lint-php8.3
script:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- composer ci:tests:functional

View file

@ -0,0 +1,14 @@
func-php8.3-v12-lowest:
extends: .default
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
services:
- mariadb:10
stage: test
needs:
- build-composer-dependencies
- php-lint-php8.3
script:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- composer ci:tests:functional

View file

@ -0,0 +1,11 @@
php-cs-fixer:
extends: .default
stage: codestyle
needs:
- build-composer-dependencies
- php-lint-php7.4
- php-lint-php8.0
- php-lint-php8.1
- php-lint-php8.2
script:
- composer ci:php:cs-fixer

View file

@ -1,6 +1,5 @@
php-lint-php7.4:
extends: .default
image: php:7.4
image: ghcr.io/sbuerk/demo-core-testing-php74:latest
stage: lint
needs: [ ]
script:

View file

@ -1,6 +1,5 @@
php-lint-php8.0:
extends: .default
image: php:8.0
image: ghcr.io/sbuerk/demo-core-testing-php80:latest
stage: lint
needs: [ ]
script:

View file

@ -1,6 +1,5 @@
php-lint-php8.1:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
stage: lint
needs: [ ]
script:

View file

@ -1,6 +1,5 @@
php-lint-php8.2:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
stage: lint
needs: [ ]
script:

View file

@ -0,0 +1,6 @@
php-lint-php8.3:
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
stage: lint
needs: [ ]
script:
- composer ci:php:lint

View file

@ -1,6 +1,6 @@
unit-php7.4-v11-highest:
extends: .default
image: php:7.4
image: ghcr.io/sbuerk/demo-core-testing-php74:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php7.4-v11-lowest:
extends: .default
image: php:7.4
image: ghcr.io/sbuerk/demo-core-testing-php74:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.0-v11-highest:
extends: .default
image: php:8.0
image: ghcr.io/sbuerk/demo-core-testing-php80:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.0-v11-lowest:
extends: .default
image: php:8.0
image: ghcr.io/sbuerk/demo-core-testing-php80:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.1-v11-highest:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.1-v11-lowest:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.1-v12-highest:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.1-v12-lowest:
extends: .default
image: php:8.1
image: ghcr.io/sbuerk/demo-core-testing-php81:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.2-v11-highest:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.2-v11-lowest:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.2-v12-highest:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -1,6 +1,6 @@
unit-php8.2-v12-lowest:
extends: .default
image: php:8.2
image: ghcr.io/sbuerk/demo-core-testing-php82:latest
stage: test
needs:
- build-composer-dependencies

View file

@ -0,0 +1,12 @@
unit-php8.3-v11-highest:
extends: .default
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
stage: test
needs:
- build-composer-dependencies
- php-lint-php8.3
script:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies
- composer ci:tests:unit

View file

@ -0,0 +1,12 @@
unit-php8.3-v11-lowest:
extends: .default
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
stage: test
needs:
- build-composer-dependencies
- php-lint-php8.3
script:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^11.5"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- composer ci:tests:unit

View file

@ -0,0 +1,11 @@
unit-php8.3-v12-highest:
extends: .default
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
stage: test
needs:
- build-composer-dependencies
- php-lint-php8.3
script:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-progress typo3/cms-core:"^12.4"
- composer ci:tests:unit

View file

@ -0,0 +1,12 @@
unit-php8.3-v12-lowest:
extends: .default
image: ghcr.io/sbuerk/demo-core-testing-php83:latest
stage: test
needs:
- build-composer-dependencies
- php-lint-php8.3
script:
- echo "Job ${CI_JOB_NAME}"
- composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"^12.4"
- composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
- composer ci:tests:unit

View file

@ -4,6 +4,4 @@ xliff-lint:
needs:
- build-composer-dependencies
script:
- wget https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd
- xmllint --schema ./xliff-core-1.2-strict.xsd
--noout $(find Resources -name '*.xlf')
- composer ci:xliff:lint

View file

@ -4,13 +4,15 @@
# TYPO3 core test runner based on docker.
#
trap 'cleanUp;exit 2' SIGINT
waitFor() {
local HOST=${1}
local PORT=${2}
local TESTCOMMAND="
COUNT=0;
while ! nc -z ${HOST} ${PORT}; do
if [ \"\${COUNT}\" -gt 10 ]; then
if [ \"\${COUNT}\" -gt 20 ]; then
echo \"Can not connect to ${HOST} port ${PORT}. Aborting.\";
exit 1;
fi;
@ -19,58 +21,87 @@ 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
}
# Options -a and -d depend on each other. The function
# validates input combinations and sets defaults.
handleDbmsAndDriverOptions() {
handleDbmsOptions() {
# -a, -d, -i depend on each other. Validate input combinations and set defaults.
case ${DBMS} in
mariadb)
[ -z "${DATABASE_DRIVER}" ] && DATABASE_DRIVER="mysqli"
if [ "${DATABASE_DRIVER}" != "mysqli" ] && [ "${DATABASE_DRIVER}" != "pdo_mysql" ]; then
echo "Invalid option -a ${DATABASE_DRIVER} with -d ${DBMS}" >&2
echo "Invalid combination -d ${DBMS} -a ${DATABASE_DRIVER}" >&2
echo >&2
echo "call \".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
[ -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
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
exit 1
fi
;;
mysql)
[ -z "${DATABASE_DRIVER}" ] && DATABASE_DRIVER="mysqli"
if [ "${DATABASE_DRIVER}" != "mysqli" ] && [ "${DATABASE_DRIVER}" != "pdo_mysql" ]; then
echo "Invalid option -a ${DATABASE_DRIVER} with -d ${DBMS}" >&2
echo "Invalid combination -d ${DBMS} -a ${DATABASE_DRIVER}" >&2
echo >&2
echo "call \".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
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="8.0"
if ! [[ ${DBMS_VERSION} =~ ^(5.5|5.6|5.7|8.0)$ ]]; 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
exit 1
fi
;;
postgres)
if [ -n "${DATABASE_DRIVER}" ]; then
echo "Invalid option -a ${DATABASE_DRIVER} with -d ${DBMS}" >&2
echo "Invalid combination -d ${DBMS} -a ${DATABASE_DRIVER}" >&2
echo >&2
echo "call \".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
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10"
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
exit 1
fi
;;
sqlite)
if [ -n "${DATABASE_DRIVER}" ]; then
echo "Invalid option -a ${DATABASE_DRIVER} with -d ${DBMS}" >&2
echo "Invalid combination -d ${DBMS} -a ${DATABASE_DRIVER}" >&2
echo >&2
echo "call \".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
if [ -n "${DBMS_VERSION}" ]; then
echo "Invalid combination -d ${DBMS} -i ${DATABASE_DRIVER}" >&2
echo >&2
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
exit 1
fi
;;
*)
echo "Invalid option -d ${DBMS}" >&2
echo >&2
echo "call \".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
;;
esac
@ -88,7 +119,7 @@ cleanTestFiles() {
# test related
echo -n "Clean test related files ... "
rm -rf \
.Build/Web/typo3temp/var/tests/
.Build/public/typo3temp/var/tests/
echo "done"
}
@ -102,9 +133,9 @@ cleanRenderedDocumentationFiles() {
loadHelp() {
# Load help text into $HELP
read -r -d '' HELP <<EOF
TYPO3 core test runner. Execute acceptance, unit, functional and other test suites in
a container based test environment. Handles execution of single test files, sending
xdebug information to a local IDE and more.
TYPO3 core test runner. Execute unit, functional and other test suites in
a container based test environment. Handles execution of single test files,
sending xdebug information to a local IDE and more.
Usage: $0 [options] [file]
@ -141,17 +172,22 @@ Options:
- mysqli (default)
- pdo_mysql
-b <docker|podman>
Container environment:
- docker (default)
- podman
-d <sqlite|mariadb|mysql|postgres>
Only with -s functional|functionalDeprecated|acceptance|acceptanceInstall
Only with -s functional|functionalDeprecated
Specifies on which DBMS tests are performed
- sqlite: (default): use sqlite
- mariadb: use mariadb
- mysql: use MySQL
- postgres: use postgres
-i <10.3|10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1>
Only with -d mariadb
Specifies on which version of mariadb tests are performed
-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.5 short-term, maintained until 2025-06-24
@ -163,48 +199,43 @@ Options:
- 10.11 long-term, maintained until 2028-02
- 11.0 development series
- 11.1 short-term development series
-j <5.5|5.6|5.7|8.0>
Only with -d mysql
Specifies on which version of mysql tests are performed
With "-d mysql":
- 5.5 unmaintained since 2018-12
- 5.6 unmaintained since 2021-02
- 5.7 maintained until 2023-10
- 8.0 maintained until 2026-04 (default)
-k <10|11|12|13|14|15>
Only with -d postgres
Specifies on which version of postgres tests are performed
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
-t <11.5|12.4>
Only with -s composerInstall|composerInstallMin|composerInstallMax
Specifies the TYPO3 CORE Version to be used
- 11: (default) use TYPO3 v11 with typo3/cms-composer-installers ^3
- 12: use TYPO3 v12 with typo3/cms-composer-installers ^5
- 11.5: use TYPO3 v11 with typo3/cms-composer-installers ^3
- 12.4: (default) use TYPO3 v12 with typo3/cms-composer-installers ^5
-p <7.4|8.0|8.1|8.2|8.3>
Specifies the PHP minor version to be used
- 7.4: use PHP 7.4
- 8.0: use PHP 8.0
- 8.1: (default) use PHP 8.1
- 8.1: use PHP 8.1
- 8.2: use PHP 8.2
- 8.3: use PHP 8.3
- 8.3: (default) use PHP 8.3
-e "<phpunit options>"
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 "-".
Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom
Additional options to send to phpunit (unit & functional 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
named "canRetrieveValueWithGP"
-x
Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom|acceptance|acceptanceInstall
Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom
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
@ -232,7 +263,7 @@ Options:
Show this help.
Examples:
# Run all core unit tests using PHP 8.1
# Run all core unit tests using PHP 8.3
./Build/Scripts/runTests.sh
./Build/Scripts/runTests.sh -s unit
@ -250,37 +281,47 @@ Examples:
./Build/Scripts/runTests.sh -x -p 8.1 -s functional -d postgres typo3/sysext/core/Tests/Functional/Authentication
# 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
./Build/Scripts/runTests.sh -s functional -d postgres -i 11
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
# Test if at least one of the supported container binaries exists, else exit out with error
if ! type "docker" >/dev/null 2>&1 && ! type "podman" >/dev/null 2>&1; then
echo "This script relies on docker or podman. Please install at least one of them" >&2
exit 1
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
ROOT_DIR="${PWD}"
# Option defaults
TEST_SUITE="unit"
CORE_VERSION="11.5"
CORE_VERSION="12.4"
DBMS="sqlite"
PHP_VERSION="8.1"
DBMS_VERSION=""
PHP_VERSION="8.3"
PHP_XDEBUG_ON=0
PHP_XDEBUG_PORT=9003
EXTRA_TEST_OPTIONS=""
PHPUNIT_RANDOM=""
CGLCHECK_DRY_RUN=0
DATABASE_DRIVER=""
MARIADB_VERSION="10.3"
MYSQL_VERSION="8.0"
POSTGRES_VERSION="10"
CONTAINER_BIN="docker"
CONTAINER_BIN=""
COMPOSER_ROOT_VERSION="3.0.x-dev"
CONTAINER_INTERACTIVE="-it --init"
HOST_UID=$(id -u)
HOST_PID=$(id -g)
USERSET=""
SUFFIX=$(echo $RANDOM)
NETWORK="friendsoftypo3-tea-${SUFFIX}"
CI_PARAMS="${CI_PARAMS:-}"
CONTAINER_HOST="host.docker.internal"
PHPSTAN_CONFIG_FILE="phpstan.neon"
IS_CORE_CI=0
# Option parsing updates above default vars
# Reset in case getopts has been used previously in the shell
@ -288,7 +329,7 @@ OPTIND=1
# Array for invalid options
INVALID_OPTIONS=()
# Simple option parsing based on getopts (! not getopt)
while getopts "a:s:d:i:j:k:p:e:t:xy:o:nhu" OPT; do
while getopts "a:b:s:d:i:p:e:t:xy:o:nhu" OPT; do
case ${OPT} in
s)
TEST_SUITE=${OPTARG}
@ -296,31 +337,22 @@ while getopts "a:s:d:i:j:k:p:e:t:xy:o:nhu" OPT; do
a)
DATABASE_DRIVER=${OPTARG}
;;
b)
if ! [[ ${OPTARG} =~ ^(docker|podman)$ ]]; then
INVALID_OPTIONS+=("-b ${OPTARG}")
fi
CONTAINER_BIN=${OPTARG}
;;
d)
DBMS=${OPTARG}
;;
i)
MARIADB_VERSION=${OPTARG}
if ! [[ ${MARIADB_VERSION} =~ ^(10.3|10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1)$ ]]; then
INVALID_OPTIONS+=("i ${OPTARG}")
fi
;;
j)
MYSQL_VERSION=${OPTARG}
if ! [[ ${MYSQL_VERSION} =~ ^(5.5|5.6|5.7|8.0)$ ]]; then
INVALID_OPTIONS+=("j ${OPTARG}")
fi
;;
k)
POSTGRES_VERSION=${OPTARG}
if ! [[ ${POSTGRES_VERSION} =~ ^(10|11|12|13|14|15)$ ]]; then
INVALID_OPTIONS+=("${OPTARG}")
fi
DBMS_VERSION=${OPTARG}
;;
p)
PHP_VERSION=${OPTARG}
if ! [[ ${PHP_VERSION} =~ ^(7.4|8.0|8.1|8.2|8.3)$ ]]; then
INVALID_OPTIONS+=("p ${OPTARG}")
INVALID_OPTIONS+=("-p ${OPTARG}")
fi
;;
e)
@ -329,7 +361,7 @@ while getopts "a:s:d:i:j:k:p:e:t:xy:o:nhu" OPT; do
t)
CORE_VERSION=${OPTARG}
if ! [[ ${CORE_VERSION} =~ ^(11.5|12.4)$ ]]; then
INVALID_OPTIONS+=("t ${OPTARG}")
INVALID_OPTIONS+=("-t ${OPTARG}")
fi
;;
x)
@ -353,10 +385,10 @@ while getopts "a:s:d:i:j:k:p:e:t:xy:o:nhu" OPT; do
TEST_SUITE=update
;;
\?)
INVALID_OPTIONS+=("${OPTARG}")
INVALID_OPTIONS+=("-${OPTARG}")
;;
:)
INVALID_OPTIONS+=("${OPTARG}")
INVALID_OPTIONS+=("-${OPTARG}")
;;
esac
done
@ -365,74 +397,64 @@ done
if [ ${#INVALID_OPTIONS[@]} -ne 0 ]; then
echo "Invalid option(s):" >&2
for I in "${INVALID_OPTIONS[@]}"; do
echo "-"${I} >&2
echo ${I} >&2
done
echo >&2
echo "call \".Build/Scripts/runTests.sh -h\" to display help and valid options"
exit 1
fi
COMPOSER_ROOT_VERSION="3.0.x-dev"
HOST_UID=$(id -u)
USERSET=""
if [ $(uname) != "Darwin" ]; then
USERSET="--user $HOST_UID"
fi
handleDbmsOptions
# 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
ROOT_DIR="${PWD}"
# Create .cache dir: composer need this.
mkdir -p .cache
mkdir -p .Build/Web/typo3temp/var/tests
PHPSTAN_CONFIG_FILE="phpstan.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"
IS_CORE_CI=0
# ENV var "CI" is set by gitlab-ci. We use it here to distinct 'local' and 'CI' environment.
# ENV var "CI" is set by gitlab-ci. Use it to force some CI details.
if [ "${CI}" == "true" ]; then
IS_CORE_CI=1
# 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=""
fi
IMAGE_PHP="${TYPO3_IMAGE_PREFIX}typo3/core-testing-$(echo "php${PHP_VERSION}" | sed -e 's/\.//'):latest"
IMAGE_ALPINE="${IMAGE_PREFIX}alpine:3.8"
IMAGE_DOCS="ghcr.io/t3docs/render-documentation:latest"
IMAGE_SELENIUM="${IMAGE_PREFIX}selenium/standalone-chrome:4.0.0-20211102"
IMAGE_MARIADB="${IMAGE_PREFIX}mariadb:${MARIADB_VERSION}"
IMAGE_MYSQL="${IMAGE_PREFIX}mysql:${MYSQL_VERSION}"
IMAGE_POSTGRES="${IMAGE_PREFIX}postgres:${POSTGRES_VERSION}-alpine"
# Detect arm64 and use a seleniarm image.
# In a perfect world selenium would have a arm64 integrated, but that is not on the horizon.
# So for the time being we have 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."
# 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
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
if ! type ${CONTAINER_BIN} >/dev/null 2>&1; then
echo "Selected container environment \"${CONTAINER_BIN}\" not found. Please install \"${CONTAINER_BIN}\" or use -b option to select one." >&2
exit 1
fi
# Create .cache dir: composer need this.
mkdir -p .cache
mkdir -p .Build/public/typo3temp/var/tests
IMAGE_PHP="ghcr.io/sbuerk/demo-core-testing-$(echo "php${PHP_VERSION}" | sed -e 's/\.//'):latest"
IMAGE_ALPINE="docker.io/alpine:3.8"
IMAGE_DOCS="ghcr.io/typo3-documentation/render-guides:latest"
IMAGE_MARIADB="docker.io/mariadb:${DBMS_VERSION}"
IMAGE_MYSQL="docker.io/mysql:${DBMS_VERSION}"
IMAGE_POSTGRES="docker.io/postgres:${DBMS_VERSION}-alpine"
# Set $1 to first mass argument, this is the optional test file or test directory to execute
shift $((OPTIND - 1))
TEST_FILE=${1}
SUFFIX=$(echo $RANDOM)
NETWORK="friendsoftypo3-tea-${SUFFIX}"
${CONTAINER_BIN} network create ${NETWORK} >/dev/null
CONTAINER_COMMON_PARAMS="${CONTAINER_INTERACTIVE} --rm --network $NETWORK --add-host "host.docker.internal:host-gateway" $USERSET -v ${ROOT_DIR}:${ROOT_DIR} -w ${ROOT_DIR}"
CONTAINER_DOCS_PARAMS="${CONTAINER_INTERACTIVE} --rm $USERSET -v ${ROOT_DIR}:/PROJECT -v ${ROOT_DIR}/Documentation-GENERATED-temp:/RESULT -w ${ROOT_DIR}"
if [ "${CONTAINER_BIN}" == "docker" ]; then
CONTAINER_COMMON_PARAMS="${CONTAINER_INTERACTIVE} --rm --network ${NETWORK} --add-host "${CONTAINER_HOST}:host-gateway" ${USERSET} -v ${ROOT_DIR}:${ROOT_DIR} -w ${ROOT_DIR}"
else
# podman
CONTAINER_HOST="host.containers.internal"
CONTAINER_COMMON_PARAMS="${CONTAINER_INTERACTIVE} ${CI_PARAMS} --rm --network ${NETWORK} -v ${ROOT_DIR}:${ROOT_DIR} -w ${ROOT_DIR}"
fi
if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
XDEBUG_MODE="-e XDEBUG_MODE=off"
@ -468,7 +490,7 @@ case ${TEST_SUITE} in
cleanTestFiles
;;
composer)
COMMAND="composer \"$@\""
COMMAND="composer $@"
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-command-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} /bin/sh -c "${COMMAND}"
SUITE_EXIT_CODE=$?
;;
@ -498,21 +520,16 @@ case ${TEST_SUITE} in
SUITE_EXIT_CODE=$?
;;
docsGenerate)
# @todo contact the documentation team for a future rootles podman version
${CONTAINER_BIN} run --rm ${IMAGE_DOCS} show-shell-commands > generate-documentation.sh
echo 'dockrun_t3rd makehtml' >> generate-documentation.sh
bash generate-documentation.sh
rm -Rf generate-documentation.sh
${CONTAINER_BIN} run --rm --pull always -v "$(pwd)":/project -it ${IMAGE_DOCS} --config=Documentation --fail-on-log
SUITE_EXIT_CODE=$?
;;
functional)
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Functional"
handleDbmsAndDriverOptions
COMMAND=".Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}"
COMMAND=".Build/bin/phpunit -c Configuration/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}"
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}
@ -520,14 +537,14 @@ case ${TEST_SUITE} in
;;
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}
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}
@ -536,7 +553,7 @@ case ${TEST_SUITE} in
sqlite)
# create sqlite tmpfs mount typo3temp/var/tests/functional-sqlite-dbs/ to avoid permission issues
mkdir -p "${ROOT_DIR}/typo3temp/var/tests/functional-sqlite-dbs/"
CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite --tmpfs ${ROOT_DIR}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid,uid=${HOST_UID}"
CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite --tmpfs ${ROOT_DIR}/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=$?
;;
@ -574,26 +591,22 @@ case ${TEST_SUITE} in
;;
unit)
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Unit"
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/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} .Build/bin/phpunit -c Configuration/UnitTests.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}
SUITE_EXIT_CODE=$?
;;
unitRandom)
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Unit"
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name unit-random-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${IMAGE_PHP} .Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/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} .Build/bin/phpunit -c Configuration/UnitTests.xml --order-by=random ${EXTRA_TEST_OPTIONS} ${PHPUNIT_RANDOM} ${TEST_FILE}
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}core-testing-*:latest versions of those ones that exist locally"
${CONTAINER_BIN} images ${TYPO3_IMAGE_PREFIX}core-testing-*:latest --format "{{.Repository}}:latest" | xargs -I {} ${CONTAINER_BIN} pull {}
echo "> pull ghcr.io/sbuerk/demo-core-testing-*:latest versions of those ones that exist locally"
${CONTAINER_BIN} images ghcr.io/sbuerk/demo-core-testing-*:latest --format "{{.Repository}}:latest" | xargs -I {} ${CONTAINER_BIN} pull {}
echo ""
# remove "dangling" typo3/core-testing-* images (those tagged as <none>)
echo "> remove \"dangling\" ${TYPO3_IMAGE_PREFIX}core-testing-* images (those tagged as <none>)"
${CONTAINER_BIN} images ${TYPO3_IMAGE_PREFIX}core-testing-* --filter "dangling=true" --format "{{.ID}}" | xargs -I {} ${CONTAINER_BIN} rmi {}
echo "> remove \"dangling\" ghcr.io/sbuerk/demo-core-testing-* images (those tagged as <none>)"
${CONTAINER_BIN} images --filter "reference=ghcr.io/sbuerk/demo-core-testing-*" --filter "dangling=true" --format "{{.ID}}" | xargs -I {} ${CONTAINER_BIN} rmi {}
echo ""
;;
*)
@ -618,19 +631,17 @@ else
fi
echo "PHP: ${PHP_VERSION}" >&2
echo "TYPO3: ${CORE_VERSION}" >&2
echo "CONTAINER_BIN: ${CONTAINER_BIN}"
if [[ ${TEST_SUITE} =~ ^functional$ ]]; then
case "${DBMS}" in
mariadb)
echo "DBMS: ${DBMS} version ${MARIADB_VERSION} driver ${DATABASE_DRIVER}" >&2
;;
mysql)
echo "DBMS: ${DBMS} version ${MYSQL_VERSION} driver ${DATABASE_DRIVER}" >&2
mariadb|mysql)
echo "DBMS: ${DBMS} version ${DBMS_VERSION} driver ${DATABASE_DRIVER}" >&2
;;
postgres)
echo "DBMS: ${DBMS} version ${POSTGRES_VERSION}" >&2
echo "DBMS: ${DBMS} version ${DBMS_VERSION} driver pdo_pgsql" >&2
;;
sqlite)
echo "DBMS: ${DBMS}" >&2
echo "DBMS: ${DBMS} driver pdo_sqlite" >&2
;;
esac
fi

14
Build/bin/console Normal file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env php
<?php
include_once __DIR__ . '/../../.Build/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Symfony\Component\Translation\Command\XliffLintCommand;
use Symfony\Component\Yaml\Command\LintCommand;
$application = new Application();
$application->add(new XliffLintCommand(null, null, null, false));
$application->add(new LintCommand());
exit($application->run());

View file

@ -6,6 +6,28 @@ This project adheres to [Semantic Versioning](https://semver.org/).
## x.y.z
### Added
- Add support for PostgreSQL 16 (#1271)
### Changed
- Stop storing development tool PHARs in the repository (#1277)
- !!! Require a storage PID for the tea list (#1223)
- Drop additional namespace segment for the Tea model (#1025)
### Deprecated
### Removed
- Drop DDEV configuration in favor of `runTests.sh` (#1063)
- Stop using the predefined GitHub Actions (#1211)
### Fixed
- Add `resname` to all language labels (#1221)
- Raise the minimal TYPO3 V12 version (#1212)
## 3.1.0
### Added
- Add Composer script for XLIFF linting (#1071)
- Add polish translation for tea (#1020)
- Make records timeable and hideable (#989)
- Add support for PHP 8.3 (#965)
- Add an FE editor (#864, #872, #874, #876)
@ -16,8 +38,6 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Rename TsConfig directory to `TSconfig` (#923)
- Set the minimal 12LTS version to 12.1 (#702)
### Deprecated
### Removed
- Stop using Prophecy (#676)

35
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,35 @@
# How to contribute
## Code of Conduct
This project uses the
[TYPO3 Code of Conduct](https://typo3.org/community/values/code-of-conduct).
When you contribute to this project or interact with community members,
you agree to adhere to this code of conduct.
## Open an issue
Feel free to open an issue - no matter whether you found a bug, would like to request a feature or have questions.
1. Please check existing open and closed issues first and feel free to comment and re-open them.
Existing issues are available at https://github.com/FriendsOfTYPO3/tea/issues .
2. Create a new issue at https://github.com/FriendsOfTYPO3/tea/issues/new .
3. Use a meaningful title.
4. Provide enough context, a concrete use case and steps to reproduce bugs.
## Contributing code and documentation
1. Create a fork of the repository.
You need a [GitHub account](https://github.com/join).
2. Create a new branch holding your changes.
3. Apply your changes.
4. Commit your changes following the [TYPO3 git commit conventions](https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/Appendix/CommitMessage.html#commitmessage).
The only relevant difference is that we do not use the `Releases` or `Change-Id` metadata.
5. Push your changes.
6. Open a pull request.
Some pull requests can not be merged quickly.
In cases where the changes cannot be merged quickly, we consider the original author responsible for keeping their PR branches up to by rebasing.
Please also have a look at the documented [contribution workflow for GitHub](https://docs.github.com/en/get-started/quickstart/contributing-to-projects).

View file

@ -5,8 +5,8 @@ declare(strict_types=1);
namespace TTN\Tea\Controller;
use Psr\Http\Message\ResponseInterface;
use TTN\Tea\Domain\Model\Product\Tea;
use TTN\Tea\Domain\Repository\Product\TeaRepository;
use TTN\Tea\Domain\Model\Tea;
use TTN\Tea\Domain\Repository\TeaRepository;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Annotation as Extbase;
@ -42,7 +42,10 @@ class FrontEndEditorController extends ActionController
*/
private function getUidOfLoggedInUser(): int
{
return $this->context->getPropertyFromAspect('frontend.user', 'id');
$userUid = $this->context->getPropertyFromAspect('frontend.user', 'id');
\assert(\is_int($userUid) && $userUid >= 0);
return $userUid;
}
/**

View file

@ -5,8 +5,8 @@ declare(strict_types=1);
namespace TTN\Tea\Controller;
use Psr\Http\Message\ResponseInterface;
use TTN\Tea\Domain\Model\Product\Tea;
use TTN\Tea\Domain\Repository\Product\TeaRepository;
use TTN\Tea\Domain\Model\Tea;
use TTN\Tea\Domain\Repository\TeaRepository;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
/**

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace TTN\Tea\Domain\Model\Product;
namespace TTN\Tea\Domain\Model;
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Extbase\Domain\Model\FileReference;

View file

@ -2,10 +2,9 @@
declare(strict_types=1);
namespace TTN\Tea\Domain\Repository\Product;
namespace TTN\Tea\Domain\Repository;
use TTN\Tea\Domain\Model\Product\Tea;
use TTN\Tea\Domain\Repository\Traits\StoragePageAgnosticTrait;
use TTN\Tea\Domain\Model\Tea;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use TYPO3\CMS\Extbase\Persistence\Repository;
@ -15,16 +14,17 @@ use TYPO3\CMS\Extbase\Persistence\Repository;
*/
class TeaRepository extends Repository
{
use StoragePageAgnosticTrait;
protected $defaultOrderings = ['title' => QueryInterface::ORDER_ASCENDING];
/**
* @param positive-int $ownerUid
*
* @return QueryResultInterface<Tea>
*/
public function findByOwnerUid(int $ownerUid): QueryResultInterface
{
$query = $this->createQuery();
$query->setQuerySettings($query->getQuerySettings()->setRespectStoragePage(false));
$query->matching($query->equals('ownerUid', $ownerUid));
return $query->execute();

View file

@ -1,21 +0,0 @@
<?php
declare(strict_types=1);
namespace TTN\Tea\Domain\Repository\Traits;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
/**
* This trait for repositories makes the repository ignore the storage page setting when fetching models.
*/
trait StoragePageAgnosticTrait
{
public function initializeObject(): void
{
$querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
$querySettings->setRespectStoragePage(false);
$this->setDefaultQuerySettings($querySettings);
}
}

View file

@ -3,7 +3,7 @@
declare(strict_types=1);
return [
\TTN\Tea\Domain\Model\Product\Tea::class => [
\TTN\Tea\Domain\Model\Tea::class => [
'properties' => [
'ownerUid' => ['fieldName' => 'owner'],
],

View file

@ -3,23 +3,24 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
backupGlobals="true"
bootstrap="../../.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="../.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
cacheResult="false"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
forceCoversAnnotation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
beStrictAboutTestsThatDoNotTestAnything="false"
failOnWarning="true"
failOnRisky="true"
>
<coverage/>
<testsuites>
<testsuite name="Functional tests">
<!--
@ -31,15 +32,15 @@
</testsuites>
<php>
<!-- @deprecated: will be removed with next major version, constant TYPO3_MODE is deprecated -->
<const name="TYPO3_MODE" value="BE" />
<const name="TYPO3_MODE" value="BE"/>
<!--
@deprecated: Set this to not suppress warnings, notices and deprecations in functional tests
with TYPO3 core v11 and up.
Will always be done with next major version.
To still suppress warnings, notices and deprecations, do NOT define the constant at all.
-->
<const name="TYPO3_TESTING_FUNCTIONAL_REMOVE_ERROR_HANDLER" value="true" />
<ini name="display_errors" value="1" />
<env name="TYPO3_CONTEXT" value="Testing" />
<const name="TYPO3_TESTING_FUNCTIONAL_REMOVE_ERROR_HANDLER" value="true"/>
<ini name="display_errors" value="1"/>
<env name="TYPO3_CONTEXT" value="Testing"/>
</php>
</phpunit>

View file

@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
return static function (ContainerConfigurator $containerConfigurator) {
$services = $containerConfigurator->services()
->defaults()
->autowire()
->autoconfigure();
$services->load('TTN\\Tea\\', '../Classes/*')
->exclude('../Classes/Domain/Model/*');
};

View file

@ -1,9 +0,0 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false
TTN\Tea\:
resource: '../Classes/*'
exclude: '../Classes/Domain/Model/*'

View file

@ -31,7 +31,7 @@ call_user_func(
);
// This removes the default controls from the plugin.
$controlsToRemove = 'recursive,select_key,pages';
$controlsToRemove = 'recursive,pages';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teaindex'] = $controlsToRemove;
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teashow'] = $controlsToRemove;
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['tea_teafrontendeditor'] = $controlsToRemove;

View file

@ -2,7 +2,7 @@
$tca = [
'ctrl' => [
'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea',
'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
@ -20,6 +20,7 @@ $tca = [
'transOrigDiffSourceField' => 'l18n_diffsource',
'languageField' => 'sys_language_uid',
'translationSource' => 'l10n_source',
'versioningWS' => true,
],
'types' => [
'1' => [
@ -34,11 +35,11 @@ $tca = [
'palettes' => [
'hidden' => [
'showitem' => '
hidden;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden
hidden;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.hidden
',
],
'access' => [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.palettes.access',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.palettes.access',
'showitem' => '
starttime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel,
endtime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel,
@ -50,7 +51,7 @@ $tca = [
'columns' => [
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.hidden',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
@ -107,10 +108,10 @@ $tca = [
'value' => 0,
],
],
'foreign_table' => 'tx_tea_domain_model_product_tea',
'foreign_table' => 'tx_tea_domain_model_tea',
'foreign_table_where' =>
'AND {#tx_tea_domain_model_product_tea}.{#pid}=###CURRENT_PID###
AND {#tx_tea_domain_model_product_tea}.{#sys_language_uid} IN (-1,0)',
'AND {#tx_tea_domain_model_tea}.{#pid}=###CURRENT_PID###
AND {#tx_tea_domain_model_tea}.{#sys_language_uid} IN (-1,0)',
'default' => 0,
],
],
@ -126,7 +127,7 @@ $tca = [
],
],
'title' => [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.title',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.title',
'config' => [
'type' => 'input',
'size' => 40,
@ -136,7 +137,7 @@ $tca = [
],
],
'description' => [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.description',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.description',
'config' => [
'type' => 'text',
'enableRichtext' => true,
@ -147,7 +148,7 @@ $tca = [
],
],
'image' => [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.image',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.image',
'config' => [
'type' => 'file',
'maxitems' => 1,
@ -164,7 +165,7 @@ $tca = [
'fe_group' => [
'exclude' => true,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.fe_group',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.fe_group',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
@ -191,7 +192,7 @@ $tca = [
'owner' => [
'exclude' => true,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.owner',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.owner',
'config' => [
'type' => 'group',
'allowed' => 'fe_users',
@ -241,7 +242,7 @@ if ($typo3Version->getMajorVersion() < 12) {
],
];
$tca['columns']['image'] = [
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.image',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'image',
[
@ -258,7 +259,7 @@ if ($typo3Version->getMajorVersion() < 12) {
];
$tca['columns']['hidden']['config'] = [
'type' => 'check',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden',
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.hidden',
'items' => [
[
0 => '',

View file

@ -3,13 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
backupGlobals="true"
bootstrap="../../.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="../.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
cacheResult="false"
colors="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
@ -17,10 +20,8 @@
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
beStrictAboutTestsThatDoNotTestAnything="false"
failOnWarning="true"
failOnRisky="true"
>
<coverage/>
<testsuites>
<testsuite name="Unit tests">
<!--
@ -30,18 +31,10 @@
<directory suffix="Test.php">./</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<!--
This path needs an adaption in extensions, when coverage statistics are wanted.
-->
<directory>../../../../../../typo3/sysext/*/Classes/</directory>
</include>
</coverage>
<php>
<!-- @deprecated: will be removed with next major version, constant TYPO3_MODE is deprecated -->
<const name="TYPO3_MODE" value="BE" />
<ini name="display_errors" value="1" />
<env name="TYPO3_CONTEXT" value="Testing" />
<const name="TYPO3_MODE" value="BE"/>
<ini name="display_errors" value="1"/>
<env name="TYPO3_CONTEXT" value="Testing"/>
</php>
</phpunit>

View file

@ -22,19 +22,12 @@ platform you want to use.
GitHub Actions
==============
This extension has two code-checking workflows for
`GitHub Actions <https://github.com/FriendsOfTYPO3/tea/actions>`__:
- `one that uses the local tools <https://github.com/FriendsOfTYPO3/tea/blob/main/.github/workflows/ci.yml>`__:
This is the workflow you most probably would want to use:
This workflow uses the development tools installed via Composer and PHIVE and
calls them using the provided Composer scripts. Use this workflow if you want
to run the code quality checks locally as well as in GitHub Actions.
- `one that completely relies on predefined actions <https://github.com/FriendsOfTYPO3/tea/blob/main/.github/workflows/predefined.yml>`__:
This workflow does not need the development tools to be installed locally.
Use this workflow if you only want to run the code quality checks in GitHub
Actions, but not locally.
This extension has a code-checking workflow for
`GitHub Actions <https://github.com/FriendsOfTYPO3/tea/actions>`__ using
`local tools <https://github.com/FriendsOfTYPO3/tea/blob/main/.github/workflows/ci.yml>`__:
This workflow uses the development tools installed via Composer and PHIVE and
calls them using the provided Composer scripts. This allows running the code
quality checks locally as well as in GitHub Actions.
.. _gitlab-ci:

View file

@ -0,0 +1,14 @@
.. include:: /Includes.rst.txt
.. _divergencesToTypo3Core:
=========================
Divergences to TYPO3 Core
=========================
A list of all divergences to the TYPO3 core and why we decided to diverge.
.. toctree::
:glob:
DivergencesToTypo3Core/*

View file

@ -0,0 +1,11 @@
.. include:: /Includes.rst.txt
.. _attributes:
Attributes
==========
TYPO3 also extends the availability of registering services via attributes.
We will prefer the attributes over Services files.
But we won't use both at once and still need Services files as long as PHP 7.4 is supported.
Attributes will be used in favor of Services files once we drop unsupported PHP versions.

View file

@ -0,0 +1,28 @@
.. include:: /Includes.rst.txt
.. _servicesFiles:
Services Files
==============
We choose to use :file:`Services.php` instead of :file:`Services.yaml`.
It still is completely fine to use YAML files over PHP files or even mix both.
Some things are way shorter to write with the YAML syntax.
We prefer the PHP file over YAML for the following reasons:
- Static Code Analysis
Static code analysis tools, like PHPStan, can analyse the PHP source code base.
They typically don't support other files like YAML.
Those tools report issues for not found classes, e.g. due to typos.
- Auto completion
Modern tooling like IDEs and Language Servers provide auto completion for PHP source files out of the box.
That way programmers can discover APIs and write more robust code faster.
- Automatic code migration
PHP Code can be auto migrated via tools like rector.
E.g. renaming a class can be applied to PHP code, but no current tool for yaml exists.

View file

@ -19,4 +19,4 @@ automatically.
.. seealso::
For further details read the :doc:`TYPO3 Documentation Rendering Guide <h2document:RenderingDocs/Quickstart>`.
For further details read the :ref:`TYPO3 Documentation Rendering Guide <h2document:docs-contribute-git-docker>`.

View file

@ -6,6 +6,5 @@
Development environment
=======================
You can either run the code quality checks and automated tests locally (using a
local PHP, Composer, and database), or you can use
`ddev <https://github.com/drud/ddev>`__ for a Docker-based setup.
You can run the code quality checks and automated tests locally (using a
local PHP, Composer, and database) or using runTests.sh.

View file

@ -1,34 +1 @@
.. More information about this file:
https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/FileStructure.html#includes-rst-txt
.. ----------
.. text roles
.. ----------
.. role:: aspect(emphasis)
.. role:: bash(code)
.. role:: html(code)
.. role:: js(code)
.. role:: php(code)
.. role:: rst(code)
.. role:: sep(strong)
.. role:: sql(code)
.. role:: tsconfig(code)
:class: typoscript
.. role:: typoscript(code)
.. role:: xml(code)
:class: html
.. role:: yaml(code)
.. default-role:: code
.. ---------
.. highlight
.. ---------
.. By default, code blocks use automatically detected syntax highlighting
.. highlight:: guess
.. You can put central messages to display on all pages here

View file

@ -51,6 +51,7 @@ continuous integration.
ContinuousIntegration
Documentation
Security
DivergencesToTypo3Core
.. Meta Menu
@ -58,4 +59,3 @@ continuous integration.
:hidden:
Sitemap
genindex

View file

@ -21,127 +21,116 @@ Composer scripts
For most development-related tasks, this extension provides Composer scripts.
If you are working locally, you can run them using :bash:`composer <scriptname>`.
If you are working with ddev, you can run them with :bash:`ddev composer <scriptname>`.
You do not need to start or build the containers for this as this happens
automatically.
The code-quality-related Composer scripts make use of the PHIVE-installed tools.
This means that for non-ddev-based development, you need to run :bash:`phive install`
before you can use the Composer scripts.
You can run :bash:`composer` (or :bash:`ddev composer`) to display a list of all available
Composer commands and scripts. For all custom Composer scripts there are descriptions
in the `script-description` section of the `composer.json`.
You can run :bash:`composer` or :bash:`./Build/Scripts/runTests.sh composer` to
display a list of all available Composer commands and scripts. For all custom
Composer scripts there are descriptions in the `script-description` section of
the `composer.json`.
.. _running-code-checks:
Running code checks
===================
You can currently run these code checks on the command line (if working locally without ddev, omit the :bash:`ddev` part):
.. index:: Commands; composer ci
.. code-block:: bash
ddev composer ci
Runs all dynamic and static code checks.
You can currently run these code checks on the command line:
.. index:: Commands; composer ci:composer:normalize
.. code-block:: bash
ddev composer ci:composer:normalize
composer ci:composer:normalize
Checks the composer.json.
.. index:: Commands; composer ci:json:lint
.. code-block:: bash
ddev composer ci:json:lint
composer ci:json:lint
Lints the JSON files.
.. index:: Commands; composer ci:php
.. code-block:: bash
ddev composer ci:php
composer ci:php
Runs all static checks for the PHP files.
.. index:: Commands; composer ci:php:cs-fixer
.. code-block:: bash
ddev composer ci:php:cs-fixer
composer ci:php:cs-fixer
Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer).
.. index:: Commands; composer ci:php:lint
.. code-block:: bash
ddev composer ci:php:lint
composer ci:php:lint
Lints the PHP files for syntax errors.
.. index:: Commands; composer ci:php:sniff
.. code-block:: bash
ddev composer ci:php:sniff
composer ci:php:sniff
Checks the code style with PHP_CodeSniffer (PHPCS).
.. index:: Commands; composer ci:php:stan
.. code-block:: bash
ddev composer ci:php:stan
composer ci:php:stan
Checks the PHP types using PHPStan.
.. index:: Commands; composer ci:static
.. code-block:: bash
ddev composer ci:static
composer ci:static
Runs all static code checks (syntax, style, types).
.. index:: Commands; composer ci:ts:lint
.. code-block:: bash
ddev composer ci:ts:lint
composer ci:ts:lint
Lints the TypoScript files.
.. index:: Commands; composer ci:yaml:lint
.. code-block:: bash
ddev composer ci:yaml:lint
composer ci:yaml:lint
Lints the YAML files.
.. index:: Commands; composer fix:php
.. code-block:: bash
ddev composer fix:php
composer fix:php
Runs all fixers for the PHP code.
.. index:: Commands; composer fix:php:cs
.. code-block:: bash
ddev composer fix:php:cs
composer fix:php:cs
Fixes the code style with PHP-CS-Fixer.
.. index:: Commands; composer fix:php:sniff
.. code-block:: bash
ddev composer fix:php:sniff
composer fix:php:sniff
Fixes the code style with PHP_CodeSniffer.
.. index:: Commands; composer phpstan:baseline
.. code-block:: bash
ddev composer phpstan:baseline
composer phpstan:baseline
Updates the PHPStan baseline file to match the code.
@ -150,61 +139,47 @@ Updates the PHPStan baseline file to match the code.
Running unit and functional tests
=================================
You can currently run these tests and coverages on the command line (if working locally without ddev, omit the :bash:`ddev` part):
You can currently run these tests and coverages on the command line:
.. index:: Commands; composer ci:coverage
.. code-block:: bash
ddev composer ci:coverage
composer ci:coverage
Runs the ci:coverage script as defined in composer.json.
.. index:: Commands; composer ci:coverage:functional
.. code-block:: bash
ddev composer ci:coverage:functional
composer ci:coverage:functional
Generates the code coverage report for functional tests.
.. index:: Commands; composer ci:coverage:merge
.. code-block:: bash
ddev composer ci:coverage:merge
composer ci:coverage:merge
Merges the code coverage reports for unit and functional tests.
.. index:: Commands; composer ci:coverage:unit
.. code-block:: bash
ddev composer ci:coverage:unit
composer ci:coverage:unit
Generates the code coverage report for unit tests.
.. index:: Commands; composer ci:dynamic
.. code-block:: bash
ddev composer ci:dynamic
Runs all PHPUnit tests (unit and functional).
.. index:: Commands; composer ci:tests
.. code-block:: bash
ddev composer ci:tests
Runs all PHPUnit tests (unit and functional).
.. index:: Commands; composer ci:tests:functional
.. code-block:: bash
ddev composer ci:tests:functional
composer ci:tests:functional
Runs the functional tests.
.. index:: Commands; composer ci:tests:unit
.. code-block:: bash
ddev composer ci:tests:unit
composer ci:tests:unit
Runs the unit tests.

View file

@ -1,62 +0,0 @@
# More information about this file:
# https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/FileStructure.html#settings-cfg
[general]
project = TYPO3 EXT:tea
version = 3.0
release = 3.0.0
copyright = since 2013 by the TYPO3 contributors
[html_theme_options]
# "Edit on GitHub" button
github_repository = TYPO3-Documentation/tea
github_branch = main
# Footer links
project_home = https://extensions.typo3.org/extension/tea
project_contact = mailto:typo3-coding@oliverklee.de
project_repository = https://github.com/FriendsOfTYPO3/tea
project_issues = https://github.com/FriendsOfTYPO3/tea/issues
project_discussions =
use_opensearch =
[intersphinx_mapping]
# Official TYPO3 manuals
h2document = https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/
# t3cheatsheets = https://docs.typo3.org/m/typo3/docs-cheatsheets/main/en-us/
# t3contribute = https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/
# t3coreapi = https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/
# t3docteam = https://docs.typo3.org/m/typo3/team-t3docteam/main/en-us/
# t3editors = https://docs.typo3.org/m/typo3/tutorial-editors/main/en-us/
# t3extbasebook = https://docs.typo3.org/m/typo3/book-extbasefluid/main/en-us/
# t3extexample = https://docs.typo3.org/m/typo3/guide-example-extension-manual/main/en-us/
# t3home = https://docs.typo3.org/
# t3install = https://docs.typo3.org/m/typo3/guide-installation/main/en-us/
# t3l10n = https://docs.typo3.org/m/typo3/guide-frontendlocalization/main/en-us/
# t3sitepackage = https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/
# t3start = https://docs.typo3.org/m/typo3/tutorial-getting-started/main/en-us/
# t3tca = https://docs.typo3.org/m/typo3/reference-tca/main/en-us/
# t3templating = https://docs.typo3.org/m/typo3/tutorial-templating/main/en-us/
# t3translate = https://docs.typo3.org/m/typo3/guide-frontendlocalization/main/en-us/
# t3tsconfig = https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/
# t3tsref = https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/
# t3ts45 = https://docs.typo3.org/m/typo3/tutorial-typoscript-in-45-minutes/main/en-us/
# t3viewhelper = https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/
# t3upgrade = https://docs.typo3.org/m/typo3/guide-installation/main/en-us/
# TYPO3 system extensions
# ext_adminpanel = https://docs.typo3.org/c/typo3/cms-adminpanel/main/en-us/
# ext_core = https://docs.typo3.org/c/typo3/cms-core/main/en-us/
# ext_dashboard = https://docs.typo3.org/c/typo3/cms-dashboard/main/en-us/
# ext_felogin = https://docs.typo3.org/c/typo3/cms-felogin/main/en-us/
# ext_form = https://docs.typo3.org/c/typo3/cms-form/main/en-us/
# ext_fsc = https://docs.typo3.org/c/typo3/cms-fluid-styled-content/main/en-us/
# ext_indexed_search = https://docs.typo3.org/c/typo3/cms-indexed-search/main/en-us/
# ext_rte_ckeditor = https://docs.typo3.org/c/typo3/cms-rte-ckeditor/main/en-us/
# ext_scheduler = https://docs.typo3.org/c/typo3/cms-scheduler/main/en-us/
# ext_seo = https://docs.typo3.org/c/typo3/cms-seo/main/en-us/
# ext_workspaces = https://docs.typo3.org/c/typo3/cms-workspaces/main/en-us/

View file

@ -1,7 +0,0 @@
.. include:: /Includes.rst.txt
=====
Index
=====
.. Sphinx will insert here the general index automatically.

23
Documentation/guides.xml Normal file
View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<guides
xmlns="https://www.phpdoc.org/guides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.phpdoc.org/guides ../vendor/phpdocumentor/guides-cli/resources/schema/guides.xsd"
links-are-relative="true"
>
<extension
class="\T3Docs\Typo3DocsTheme\DependencyInjection\Typo3DocsThemeExtension"
project-home="https://extensions.typo3.org/extension/tea"
project-contact="mailto:typo3-coding@oliverklee.de"
project-repository="https://github.com/FriendsOfTYPO3/tea"
project-issues="https://github.com/FriendsOfTYPO3/tea/issues"
edit-on-github-branch="main"
edit-on-github="FriendsOfTYPO3/tea"
typo3-core-preferred="stable"
/>
<project
title="TYPO3 EXT:tea"
release="3.1.0"
version="3.1"
copyright="since 2013 by the TYPO3 contributors"
/>
</guides>

View file

@ -21,6 +21,17 @@ You can also use this extension to manage your collection of delicious teas.
| **TER:** | https://extensions.typo3.org/extension/tea/ |
| **Slack:** | https://typo3.slack.com/channels/qa-best-practices |
## Philosophies
The following is a list of our code and technical philosophies only.
https://typo3.org/community/teams/best-practices provides an overview on how we work in general.
### Align with TYPO3 core
We align all decisions with the TYPO3 core, whenever applicable.
TYPO3 itself is a mono repository and sometimes needs to make different decisions.
We document all divergences within Documentation/DivergencesToTypo3Core/.
## Presentation at the TYPO3 Online Days 2021
At the TYPO3 Online Days 2021, [Oliver Klee](https://www.oliverklee.de/) held a

View file

@ -3,27 +3,27 @@
<file source-language="en" target-language="de" datatype="plaintext" original="messages">
<header/>
<body>
<trans-unit id="plugin.tea_index">
<trans-unit id="plugin.tea_index" resname="plugin.tea_index" approved="yes">
<source>Tea list</source>
<target>Teeliste</target>
</trans-unit>
<trans-unit id="plugin.tea_show">
<trans-unit id="plugin.tea_show" resname="plugin.tea_show" approved="yes">
<source>Tea single view</source>
<target>Tee-Einzelansicht</target>
</trans-unit>
<trans-unit id="plugin.tea_frontend_editor">
<trans-unit id="plugin.tea_frontend_editor" resname="plugin.tea_frontend_editor" approved="yes">
<source>Tea front-end editor</source>
<target>Frontend-Editor für Tee</target>
</trans-unit>
<trans-unit id="plugin.tea.heading">
<trans-unit id="plugin.tea.heading" resname="plugin.tea.heading" approved="yes">
<source>Our selection of assorted teas</source>
<target>Unsere Auswahl an erlesenen Tees</target>
</trans-unit>
<trans-unit id="plugin.tea.property.uid">
<trans-unit id="plugin.tea.property.uid" resname="plugin.tea.property.uid" approved="yes">
<source>UID</source>
<target>UID</target>
</trans-unit>
<trans-unit id="plugin.tea.property.title">
<trans-unit id="plugin.tea.property.title" resname="plugin.tea.property.title" approved="yes">
<source>Title</source>
<target>Titel</target>
</trans-unit>
@ -31,31 +31,31 @@
<source>Stars</source>
<target>Sterne</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.index.heading">
<trans-unit id="plugin.frontEndEditor.index.heading" resname="plugin.frontEndEditor.index.heading" approved="yes">
<source>My teas</source>
<target>Meine Tees</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.message.noTeas">
<trans-unit id="plugin.frontEndEditor.message.noTeas" resname="plugin.frontEndEditor.message.noTeas" approved="yes">
<source>You have not created any teas yet.</source>
<target>Du hast noch keine Tees angelegt.</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.uid">
<trans-unit id="plugin.frontEndEditor.property.uid" resname="plugin.frontEndEditor.property.uid" approved="yes">
<source>UID</source>
<target>UID</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.title">
<trans-unit id="plugin.frontEndEditor.property.title" resname="plugin.frontEndEditor.property.title" approved="yes">
<source>Title</source>
<target>Titel</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.description">
<trans-unit id="plugin.frontEndEditor.property.description" resname="plugin.frontEndEditor.property.description" approved="yes">
<source>Description</source>
<target>Beschreibung</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.edit.heading">
<trans-unit id="plugin.frontEndEditor.edit.heading" resname="plugin.frontEndEditor.edit.heading" approved="yes">
<source>Edit tea</source>
<target>Tee bearbeiten</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.actions">
<trans-unit id="plugin.frontEndEditor.action.actions" resname="plugin.frontEndEditor.action.actions" approved="yes">
<source>Actions</source>
<target>Aktionen</target>
</trans-unit>
@ -63,27 +63,27 @@
<source>Rating</source>
<target>Bewertung</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.edit">
<trans-unit id="plugin.frontEndEditor.action.edit" resname="plugin.frontEndEditor.action.edit" approved="yes">
<source>Edit</source>
<target>Bearbeiten</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.cancel">
<trans-unit id="plugin.frontEndEditor.action.cancel" resname="plugin.frontEndEditor.action.cancel" approved="yes">
<source>Cancel</source>
<target>Abbrechen</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.save">
<trans-unit id="plugin.frontEndEditor.action.save" resname="plugin.frontEndEditor.action.save" approved="yes">
<source>Save</source>
<target>Speichern</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.new">
<trans-unit id="plugin.frontEndEditor.action.new" resname="plugin.frontEndEditor.action.new" approved="yes">
<source>Create new tea</source>
<target>Neuen Tee anlegen</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.delete">
<trans-unit id="plugin.frontEndEditor.action.delete" resname="plugin.frontEndEditor.action.delete" approved="yes">
<source>Delete</source>
<target>Löschen</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.new.heading">
<trans-unit id="plugin.frontEndEditor.new.heading" resname="plugin.frontEndEditor.new.heading" approved="yes">
<source>Create new tea</source>
<target>Neuen Tee anlegen</target>
</trans-unit>

View file

@ -3,35 +3,35 @@
<file source-language="en" target-language="de" datatype="plaintext" original="messages">
<header/>
<body>
<trans-unit id="tx_tea_domain_model_product_tea">
<trans-unit id="tx_tea_domain_model_tea" resname="tx_tea_domain_model_tea" approved="yes">
<source>Tea</source>
<target>Tee</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.tabs.access">
<trans-unit id="tx_tea_domain_model_tea.tabs.access" resname="tx_tea_domain_model_tea.tabs.access" approved="yes">
<source>Access</source>
<target>Zugriff</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.title">
<trans-unit id="tx_tea_domain_model_tea.title" resname="tx_tea_domain_model_tea.title" approved="yes">
<source>Title</source>
<target>Titel</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.description">
<trans-unit id="tx_tea_domain_model_tea.description" resname="tx_tea_domain_model_tea.description" approved="yes">
<source>Description</source>
<target>Beschreibung</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.image">
<trans-unit id="tx_tea_domain_model_tea.image" resname="tx_tea_domain_model_tea.image" approved="yes">
<source>Image</source>
<target>Bild</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.owner">
<trans-unit id="tx_tea_domain_model_tea.owner" resname="tx_tea_domain_model_tea.owner" approved="yes">
<source>Website user who created this record</source>
<target>Website-Benutzer, der diesen Datensatz erstellt hat</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.fe_group">
<trans-unit id="tx_tea_domain_model_tea.fe_group" resname="tx_tea_domain_model_tea.fe_group" approved="yes">
<source>Usergroup Access Rights</source>
<target>Zugriffsrechte für Benutzergruppen</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.hidden">
<trans-unit id="tx_tea_domain_model_tea.hidden" resname="tx_tea_domain_model_tea.hidden" approved="yes">
<source>Visible</source>
<target>Sichtbar</target>
</trans-unit>

View file

@ -3,67 +3,67 @@
<file source-language="en" datatype="plaintext" original="messages">
<header/>
<body>
<trans-unit id="plugin.tea_index">
<trans-unit id="plugin.tea_index" resname="plugin.tea_index">
<source>Tea list</source>
</trans-unit>
<trans-unit id="plugin.tea_show">
<trans-unit id="plugin.tea_show" resname="plugin.tea_show">
<source>Tea single view</source>
</trans-unit>
<trans-unit id="plugin.tea_frontend_editor">
<trans-unit id="plugin.tea_frontend_editor" resname="plugin.tea_frontend_editor">
<source>Tea front-end editor</source>
</trans-unit>
<trans-unit id="plugin.tea.heading">
<trans-unit id="plugin.tea.heading" resname="plugin.tea.heading">
<source>Our selection of assorted teas</source>
</trans-unit>
<trans-unit id="plugin.tea.property.uid">
<trans-unit id="plugin.tea.property.uid" resname="plugin.tea.property.uid">
<source>UID</source>
</trans-unit>
<trans-unit id="plugin.tea.property.title">
<trans-unit id="plugin.tea.property.title" resname="plugin.tea.property.title">
<source>Title</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.description">
<trans-unit id="plugin.frontEndEditor.property.description" resname="plugin.frontEndEditor.property.description">
<source>Description</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.index.heading">
<trans-unit id="plugin.frontEndEditor.index.heading" resname="plugin.frontEndEditor.index.heading">
<source>My teas</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.message.noTeas">
<trans-unit id="plugin.frontEndEditor.message.noTeas" resname="plugin.frontEndEditor.message.noTeas">
<source>You have not created any teas yet.</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.uid">
<trans-unit id="plugin.frontEndEditor.property.uid" resname="plugin.frontEndEditor.property.uid">
<source>UID</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.title">
<trans-unit id="plugin.frontEndEditor.property.title" resname="plugin.frontEndEditor.property.title">
<source>Title</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.stars">
<source>Stars</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.edit.heading">
<trans-unit id="plugin.frontEndEditor.edit.heading" resname="plugin.frontEndEditor.edit.heading">
<source>Edit tea</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.actions">
<trans-unit id="plugin.frontEndEditor.action.actions" resname="plugin.frontEndEditor.action.actions">
<source>Actions</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.rating">
<source>Rating</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.edit">
<trans-unit id="plugin.frontEndEditor.action.edit" resname="plugin.frontEndEditor.action.edit">
<source>Edit</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.cancel">
<trans-unit id="plugin.frontEndEditor.action.cancel" resname="plugin.frontEndEditor.action.cancel">
<source>Cancel</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.save">
<trans-unit id="plugin.frontEndEditor.action.save" resname="plugin.frontEndEditor.action.save">
<source>Save</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.new">
<trans-unit id="plugin.frontEndEditor.action.new" resname="plugin.frontEndEditor.action.new">
<source>Create new tea</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.delete">
<trans-unit id="plugin.frontEndEditor.action.delete" resname="plugin.frontEndEditor.action.delete">
<source>Delete</source>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.new.heading">
<trans-unit id="plugin.frontEndEditor.new.heading" resname="plugin.frontEndEditor.new.heading">
<source>Create new tea</source>
</trans-unit>
</body>

View file

@ -3,28 +3,28 @@
<file source-language="en" datatype="plaintext" original="messages">
<header/>
<body>
<trans-unit id="tx_tea_domain_model_product_tea">
<trans-unit id="tx_tea_domain_model_tea" resname="tx_tea_domain_model_tea">
<source>Tea</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.tabs.access">
<trans-unit id="tx_tea_domain_model_tea.tabs.access" resname="tx_tea_domain_model_tea.tabs.access">
<source>Access</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.title">
<trans-unit id="tx_tea_domain_model_tea.title" resname="tx_tea_domain_model_tea.title">
<source>Title</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.description">
<trans-unit id="tx_tea_domain_model_tea.description" resname="tx_tea_domain_model_tea.description">
<source>Description</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.image">
<trans-unit id="tx_tea_domain_model_tea.image" resname="tx_tea_domain_model_tea.image">
<source>Image</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.owner">
<trans-unit id="tx_tea_domain_model_tea.owner" resname="tx_tea_domain_model_tea.owner">
<source>Website user who created this record</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.fe_group">
<trans-unit id="tx_tea_domain_model_tea.fe_group" resname="tx_tea_domain_model_tea.fe_group">
<source>Usergroup Access Rights</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.hidden">
<trans-unit id="tx_tea_domain_model_tea.hidden" resname="tx_tea_domain_model_tea.hidden">
<source>Visible</source>
</trans-unit>
<trans-unit id="tx_tea_domain_model_product_tea.stars">

View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" target-language="pl" datatype="plaintext" original="messages">
<header/>
<body>
<trans-unit id="plugin.tea_index" resname="plugin.tea_index" approved="yes">
<source>Tea list</source>
<target>Lista herbat</target>
</trans-unit>
<trans-unit id="plugin.tea_show" resname="plugin.tea_show" approved="yes">
<source>Tea single view</source>
<target>Widok pojedynczej herbaty</target>
</trans-unit>
<trans-unit id="plugin.tea_frontend_editor" resname="plugin.tea_frontend_editor" approved="yes">
<source>Tea front-end editor</source>
<target>Front-endowy edytor dla herbat</target>
</trans-unit>
<trans-unit id="plugin.tea.heading" resname="plugin.tea.heading" approved="yes">
<source>Our selection of assorted teas</source>
<target>Nasz wybór różnorodnych herbat</target>
</trans-unit>
<trans-unit id="plugin.tea.property.uid" resname="plugin.tea.property.uid" approved="yes">
<source>UID</source>
<target>UID</target>
</trans-unit>
<trans-unit id="plugin.tea.property.title" resname="plugin.tea.property.title" approved="yes">
<source>Title</source>
<target>Tytuł</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.index.heading" resname="plugin.frontEndEditor.index.heading" approved="yes">
<source>My teas</source>
<target>Moje herbaty</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.message.noTeas" resname="plugin.frontEndEditor.message.noTeas" approved="yes">
<source>You have not created any teas yet.</source>
<target>Nie utworzyłeś jeszcze żadnych herbat.</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.uid" resname="plugin.frontEndEditor.property.uid" approved="yes">
<source>UID</source>
<target>UID</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.title" resname="plugin.frontEndEditor.property.title" approved="yes">
<source>Title</source>
<target>Tytuł</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.property.description" resname="plugin.frontEndEditor.property.description" approved="yes">
<source>Description</source>
<target>Opis</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.edit.heading" resname="plugin.frontEndEditor.edit.heading" approved="yes">
<source>Edit tea</source>
<target>Edytuj herbatę.</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.actions" resname="plugin.frontEndEditor.action.actions" approved="yes">
<source>Actions</source>
<target>Akcje</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.edit" resname="plugin.frontEndEditor.action.edit" approved="yes">
<source>Edit</source>
<target>Edytuj</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.cancel" resname="plugin.frontEndEditor.action.cancel" approved="yes">
<source>Cancel</source>
<target>Anuluj</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.save" resname="plugin.frontEndEditor.action.save" approved="yes">
<source>Save</source>
<target>Zapisz</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.new" resname="plugin.frontEndEditor.action.new" approved="yes">
<source>Create new tea</source>
<target>Utwórz nową herbatę</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.action.delete" resname="plugin.frontEndEditor.action.delete" approved="yes">
<source>Delete</source>
<target>Usuń</target>
</trans-unit>
<trans-unit id="plugin.frontEndEditor.new.heading" resname="plugin.frontEndEditor.new.heading" approved="yes">
<source>Create new tea</source>
<target>Utwórz nową herbatę.</target>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" target-language="pl" datatype="plaintext" original="messages">
<header/>
<body>
<trans-unit id="tx_tea_domain_model_tea" resname="tx_tea_domain_model_tea" approved="yes">
<source>Tea</source>
<target>Herbata</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_tea.tabs.access" resname="tx_tea_domain_model_tea.tabs.access" approved="yes">
<source>Access</source>
<target>Dostęp</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_tea.title" resname="tx_tea_domain_model_tea.title" approved="yes">
<source>Title</source>
<target>Tytuł</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_tea.description" resname="tx_tea_domain_model_tea.description" approved="yes">
<source>Description</source>
<target>Opis</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_tea.image" resname="tx_tea_domain_model_tea.image" approved="yes">
<source>Image</source>
<target>Obraz</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_tea.owner" resname="tx_tea_domain_model_tea.owner" approved="yes">
<source>Website user who created this record</source>
<target>Użytkownik strony, który utworzył ten rekord</target>
</trans-unit>
<trans-unit id="tx_tea_domain_model_tea.fe_group" resname="tx_tea_domain_model_tea.fe_group" approved="yes">
<source>Usergroup Access Rights</source>
<target>Prawa dostępu grupy użytkowników</target>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,3 @@
"tt_content"
,"uid","pid","CType","header","list_type"
,1,1,"list","Teas Index","tea_teaindex"
Can't render this file because it has a wrong number of fields in line 2.

View file

@ -0,0 +1,4 @@
"pages"
,"uid","pid","title","slug"
,1,0,"Rootpage","/"
,2,1,"Storage","/storage"
Can't render this file because it has a wrong number of fields in line 2.

View file

@ -0,0 +1,4 @@
"tx_tea_domain_model_tea"
,"uid","pid","title"
,1,2,"Godesberger Burgtee"
,2,2,"Oolong"
Can't render this file because it has a wrong number of fields in line 2.

View file

@ -0,0 +1,16 @@
base: '/'
languages:
-
title: English
enabled: true
languageId: '0'
base: /
typo3Language: default
locale: en_US.utf8
iso-639-1: en
navigationTitle: English
hreflang: en-us
direction: ltr
flag: us
websiteTitle: ''
rootPageId: 1

View file

@ -0,0 +1,5 @@
plugin.tx_tea {
persistence {
storagePid = 2
}
}

View file

@ -0,0 +1,4 @@
page = PAGE
page {
10 < styles.content.get
}

View file

@ -0,0 +1,58 @@
<?php
declare(strict_types=1);
namespace TTN\Tea\Tests\Functional\Controller;
use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
/**
* @covers \TTN\Tea\Controller\TeaController
*/
final class TeaControllerTest extends FunctionalTestCase
{
protected array $testExtensionsToLoad = ['ttn/tea'];
protected array $coreExtensionsToLoad = ['typo3/cms-fluid-styled-content'];
protected array $pathsToLinkInTestInstance = [
'typo3conf/ext/tea/Tests/Functional/Controller/Fixtures/Sites/' => 'typo3conf/sites',
];
protected function setUp(): void
{
parent::setUp();
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/SiteStructure.csv');
$this->setUpFrontendRootPage(1, [
'constants' => [
'EXT:fluid_styled_content/Configuration/TypoScript/constants.typoscript',
'EXT:tea/Configuration/TypoScript/constants.typoscript',
'EXT:tea/Tests/Functional/Controller/Fixtures/TypoScript/Constants/PluginConfiguration.typoscript',
],
'setup' => [
'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript',
'EXT:tea/Configuration/TypoScript/setup.typoscript',
'EXT:tea/Tests/Functional/Controller/Fixtures/TypoScript/Setup/Rendering.typoscript',
],
]);
}
/**
* @test
*/
public function indexActionRendersAllAvailableTeas(): void
{
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/ContentElementTeaIndex.csv');
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/Teas.csv');
$request = new InternalRequest();
$request = $request->withPageId(1);
$html = (string)$this->executeFrontendSubRequest($request)->getBody();
self::assertStringContainsString('Godesberger Burgtee', $html);
self::assertStringContainsString('Oolong', $html);
}
}

View file

@ -1,3 +1,3 @@
"tx_tea_domain_model_product_tea"
"tx_tea_domain_model_tea"
,"uid","title"
,1,"Godesberger Burgtee"
Can't render this file because it has a wrong number of fields in line 2.

View file

@ -1,3 +0,0 @@
"tx_tea_domain_model_product_tea"
,"uid","pid","title"
,1,1,"Earl Grey"
Can't render this file because it has a wrong number of fields in line 2.

View file

@ -1,3 +0,0 @@
"tx_tea_domain_model_product_tea"
,"uid","pid","title","description","owner"
,1,1,"Earl Grey","Fresh and hot.",2
Can't render this file because it has a wrong number of fields in line 2.

View file

@ -1,7 +0,0 @@
"tx_tea_domain_model_product_tea"
,"uid","pid","title","image",
,1,1,"Gunpowder",1
"sys_file_reference"
,"uid","uid_foreign","tablenames","fieldname"
,1,1,"tx_tea_domain_model_product_tea","image"
Can't render this file because it contains an unexpected character in line 2 and column 2.

View file

@ -1,3 +0,0 @@
"tx_tea_domain_model_product_tea"
,"uid","pid","title","owner"
,"1","1","Earl Grey",1
Can't render this file because it has a wrong number of fields in line 2.

Some files were not shown because too many files have changed in this diff Show more