From 98c4ca620d6b71fdcff4f22cbfe3b081faa6cb2d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 18:42:34 +0200 Subject: [PATCH] [Backport 12.4] [TASK] Add scripts and GitHub workflow to validate (and fix) PHP files (#777) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [TASK] Add scripts and GitHub workflow to validate (and fix) PHP files Releases: main, 12.4 Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> --- .github/workflows/tests.yml | 24 ++ .php-cs-fixer.dist.php | 8 + Build/.gitignore | 1 + Build/Scripts/runTests.sh | 193 ++++++++++++++++ Build/testing-docker/docker-compose.yml | 68 ++++++ .../Properties/_PasswordGenerator.php | 2 +- .../Type/User/_includes/_FieldMapElement.php | 1 - .../User/_includes/_SpecialFieldElement.php | 16 +- Documentation/codesnippets.php | 207 +++++++++--------- composer.json | 20 +- 10 files changed, 427 insertions(+), 113 deletions(-) create mode 100644 .github/workflows/tests.yml create mode 100644 .php-cs-fixer.dist.php create mode 100644 Build/.gitignore create mode 100755 Build/Scripts/runTests.sh create mode 100644 Build/testing-docker/docker-compose.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..abe065ef --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,24 @@ +name: tests + +on: + push: + pull_request: + +jobs: + testsuite: + name: all tests + runs-on: ubuntu-latest + env: + php: '8.1' + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install testing system + run: Build/Scripts/runTests.sh -p ${{ env.php }} -s composerUpdate + + - name: Lint PHP + run: Build/Scripts/runTests.sh -p ${{ env.php }} -s lint + + - name: CGL + run: Build/Scripts/runTests.sh -n -p ${{ env.php }} -s cgl -n diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 00000000..edf33f1f --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,8 @@ +getFinder()->in(__DIR__) +; + +return $config; diff --git a/Build/.gitignore b/Build/.gitignore new file mode 100644 index 00000000..cffb6ef0 --- /dev/null +++ b/Build/.gitignore @@ -0,0 +1 @@ +testing-docker/.env diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh new file mode 100755 index 00000000..cc02e1b9 --- /dev/null +++ b/Build/Scripts/runTests.sh @@ -0,0 +1,193 @@ +#!/usr/bin/env bash + +# +# TYPO3 core test runner based on docker and docker-compose. +# + +# Function to write a .env file in Build/testing-docker +# This is read by docker-compose and vars defined here are +# used in Build/testing-docker/docker-compose.yml +setUpDockerComposeDotEnv() { + # Delete possibly existing local .env file if exists + [ -e .env ] && rm .env + # Set up a new .env file for docker-compose + { + echo "COMPOSE_PROJECT_NAME=local" + # To prevent access rights of files created by the testing, the docker image later + # runs with the same user that is currently executing the script. docker-compose can't + # use $UID directly itself since it is a shell variable and not an env variable, so + # we have to set it explicitly here. + echo "HOST_UID=`id -u`" + # Your local user + echo "ROOT_DIR=${ROOT_DIR}" + echo "HOST_USER=${USER}" + echo "DOCKER_PHP_IMAGE=${DOCKER_PHP_IMAGE}" + echo "IMAGE_PREFIX=${IMAGE_PREFIX}" + echo "SCRIPT_VERBOSE=${SCRIPT_VERBOSE}" + echo "CGLCHECK_DRY_RUN=${CGLCHECK_DRY_RUN}" + } > .env +} + +# Load help text into $HELP +read -r -d '' HELP <=20.10 for xdebug break pointing to work reliably, and +a recent docker-compose (tested >=1.21.2) is needed. + +Usage: $0 [options] [file] + +No arguments: Run all checks with PHP 8.1 + +Options: + -s <...> + Specifies which test suite to run + - checkRst: test .rst files for integrity + - cgl: cgl test and fix all php files + - composerUpdate: "composer update", handy if host has no PHP + - lint: PHP linting + - rector: Apply Rector rules + + -p <8.1|8.2> + Specifies the PHP minor version to be used + - 8.1 (default): use PHP 8.1 + - 8.2: use PHP 8.2 + + -u + Update existing typo3/core-testing-*:latest docker images. Maintenance call to docker pull latest + versions of the main php images. The images are updated once in a while and only the youngest + ones are supported by core testing. Use this if weird test errors occur. Also removes obsolete + image versions of typo3/core-testing-*. + + -v + Enable verbose script output. Shows variables and docker commands. + + -h + Show this help. + +Examples: + # Run checks using PHP 8.1 + ./Build/Scripts/runTests.sh +EOF + +# Test if docker-compose exists, else exit out with error +if ! type "docker-compose" > /dev/null; then + echo "This script relies on docker and docker-compose. Please install" >&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. +THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +cd "$THIS_SCRIPT_DIR" || exit 1 + +# Go to directory that contains the local docker-compose.yml file +cd ../testing-docker || exit 1 + +# Option defaults +if ! command -v realpath &> /dev/null; then + echo "This script works best with realpath installed" >&2 + ROOT_DIR="${PWD}/../../" +else + ROOT_DIR=`realpath ${PWD}/../../` +fi +TEST_SUITE="cgl" +PHP_VERSION="8.1" +SCRIPT_VERBOSE=0 +CGLCHECK_DRY_RUN="" +IMAGE_PREFIX="ghcr.io/typo3/" + +# Option parsing +# Reset in case getopts has been used previously in the shell +OPTIND=1 +# Array for invalid options +INVALID_OPTIONS=(); +# Simple option parsing based on getopts (! not getopt) +while getopts ":s:p:nhuv" OPT; do + case ${OPT} in + s) + TEST_SUITE=${OPTARG} + ;; + p) + PHP_VERSION=${OPTARG} + ;; + h) + echo "${HELP}" + exit 0 + ;; + n) + CGLCHECK_DRY_RUN="-n" + ;; + u) + TEST_SUITE=update + ;; + v) + SCRIPT_VERBOSE=1 + ;; + \?) + INVALID_OPTIONS+=(${OPTARG}) + ;; + :) + INVALID_OPTIONS+=(${OPTARG}) + ;; + esac +done + +# Exit on invalid options +if [ ${#INVALID_OPTIONS[@]} -ne 0 ]; then + echo "Invalid option(s):" >&2 + for I in "${INVALID_OPTIONS[@]}"; do + echo "-"${I} >&2 + done + echo >&2 + echo "${HELP}" >&2 + exit 1 +fi + +# Move "8.1" to "php81", the latter is the docker container name +DOCKER_PHP_IMAGE=`echo "php${PHP_VERSION}" | sed -e 's/\.//'` + +# Suite execution +case ${TEST_SUITE} in + checkRst) + setUpDockerComposeDotEnv + docker-compose run check_rst + SUITE_EXIT_CODE=$? + docker-compose down + ;; + cgl) + # Active dry-run for cgl needs not "-n" but specific options + if [[ ! -z ${CGLCHECK_DRY_RUN} ]]; then + CGLCHECK_DRY_RUN="--dry-run --diff" + fi + setUpDockerComposeDotEnv + docker-compose run cgl + SUITE_EXIT_CODE=$? + docker-compose down + ;; + composerUpdate) + setUpDockerComposeDotEnv + docker-compose run composer_update + SUITE_EXIT_CODE=$? + docker-compose down + ;; + lint) + setUpDockerComposeDotEnv + docker-compose run lint + SUITE_EXIT_CODE=$? + docker-compose down + ;; + update) + # pull typo3/core-testing-*:latest versions of those ones that exist locally + docker images typo3/core-testing-*:latest --format "{{.Repository}}:latest" | xargs -I {} docker pull {} + # remove "dangling" typo3/core-testing-* images (those tagged as ) + docker images typo3/core-testing-* --filter "dangling=true" --format "{{.ID}}" | xargs -I {} docker rmi {} + ;; + *) + echo "Invalid -s option argument ${TEST_SUITE}" >&2 + echo >&2 + echo "${HELP}" >&2 + exit 1 +esac + +exit $SUITE_EXIT_CODE diff --git a/Build/testing-docker/docker-compose.yml b/Build/testing-docker/docker-compose.yml new file mode 100644 index 00000000..ae933e6d --- /dev/null +++ b/Build/testing-docker/docker-compose.yml @@ -0,0 +1,68 @@ +version: '2.3' +services: + check_rst: + image: ${IMAGE_PREFIX}core-testing-${DOCKER_PHP_IMAGE}:latest + user: "${HOST_UID}" + volumes: + - ${ROOT_DIR}:${ROOT_DIR} + working_dir: ${ROOT_DIR} + command: > + /bin/sh -c " + if [ ${SCRIPT_VERBOSE} -eq 1 ]; then + set -x + fi + php -dxdebug.mode=off Build/Scripts/validateRstFiles.php; + " + cgl: + image: ${IMAGE_PREFIX}core-testing-${DOCKER_PHP_IMAGE}:latest + user: "${HOST_UID}" + volumes: + - ${ROOT_DIR}:${ROOT_DIR} + working_dir: ${ROOT_DIR} + extra_hosts: + - "host.docker.internal:host-gateway" + command: > + /bin/sh -c " + if [ ${SCRIPT_VERBOSE} -eq 1 ]; then + set -x + fi + php -v | grep '^PHP'; + php -dxdebug.mode=off \ + .Build/bin/php-cs-fixer fix \ + -v \ + ${CGLCHECK_DRY_RUN} \ + --config=.php-cs-fixer.dist.php \ + --using-cache=no . + " + + lint: + image: ${IMAGE_PREFIX}core-testing-${DOCKER_PHP_IMAGE}:latest + user: "${HOST_UID}" + volumes: + - ${ROOT_DIR}:${ROOT_DIR} + working_dir: ${ROOT_DIR} + command: > + /bin/sh -c " + if [ ${SCRIPT_VERBOSE} -eq 1 ]; then + set -x + fi + php -v | grep '^PHP'; + find . -name \\*.php ! -path "./.Build/\\*" -print0 | xargs -0 -n1 -P4 php -dxdebug.mode=off -l >/dev/null + " + + composer_update: + image: ${IMAGE_PREFIX}core-testing-${DOCKER_PHP_IMAGE}:latest + user: "${HOST_UID}" + volumes: + - ${ROOT_DIR}:${ROOT_DIR} + working_dir: ${ROOT_DIR} + environment: + COMPOSER_CACHE_DIR: ".Build/.cache/composer" + command: > + /bin/sh -c " + if [ ${SCRIPT_VERBOSE} -eq 1 ]; then + set -x + fi + php -v | grep '^PHP'; + composer update --no-progress --no-interaction; + " diff --git a/Documentation/ColumnsConfig/Type/Password/Properties/_PasswordGenerator.php b/Documentation/ColumnsConfig/Type/Password/Properties/_PasswordGenerator.php index fd82e532..2c22775c 100644 --- a/Documentation/ColumnsConfig/Type/Password/Properties/_PasswordGenerator.php +++ b/Documentation/ColumnsConfig/Type/Password/Properties/_PasswordGenerator.php @@ -10,4 +10,4 @@ ], ], ], -]; \ No newline at end of file +]; diff --git a/Documentation/ColumnsConfig/Type/User/_includes/_FieldMapElement.php b/Documentation/ColumnsConfig/Type/User/_includes/_FieldMapElement.php index 4d015d64..c2806522 100644 --- a/Documentation/ColumnsConfig/Type/User/_includes/_FieldMapElement.php +++ b/Documentation/ColumnsConfig/Type/User/_includes/_FieldMapElement.php @@ -8,7 +8,6 @@ class FieldMapElement extends AbstractFormElement { - public function render(): array { $parameterArray = $this->data['parameterArray']; diff --git a/Documentation/ColumnsConfig/Type/User/_includes/_SpecialFieldElement.php b/Documentation/ColumnsConfig/Type/User/_includes/_SpecialFieldElement.php index cb5b4943..c638117f 100644 --- a/Documentation/ColumnsConfig/Type/User/_includes/_SpecialFieldElement.php +++ b/Documentation/ColumnsConfig/Type/User/_includes/_SpecialFieldElement.php @@ -1,5 +1,7 @@ data['databaseRow']; $parameterArray = $this->data['parameterArray']; @@ -25,11 +27,11 @@ public function render():array 'id' => $fieldId, 'name' => htmlspecialchars($parameterArray['itemFormElName']), 'size' => $size, - 'data-formengine-input-name' => htmlspecialchars($parameterArray['itemFormElName']) + 'data-formengine-input-name' => htmlspecialchars($parameterArray['itemFormElName']), ]; - $attributes['placeholder'] = 'Enter special value for user "'.htmlspecialchars(trim($row['username'])). - '" in size '. $size; + $attributes['placeholder'] = 'Enter special value for user "' . htmlspecialchars(trim($row['username'])) . + '" in size ' . $size; $classes = [ 'form-control', 't3js-formengine-textarea', @@ -45,8 +47,8 @@ public function render():array $html[] = '
'; $html[] = '
'; $html[] = '//github.com/TYPO3-Documentation/t3docs-codesnippets // ddev exec vendor/bin/typo3 restructured_api_tools:php_domain public/fileadmin/TYPO3CMS-Reference-TCA/Documentation/CodeSnippets/ @@ -13,705 +14,705 @@ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:frontend/Configuration/TCA/tt_content.php', 'fields' => ['columns/hidden'], - 'targetFileName' => 'CodeSnippets/TtContentHidden.rst.txt' + 'targetFileName' => 'CodeSnippets/TtContentHidden.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:frontend/Configuration/TCA/tt_content.php', 'fields' => ['ctrl'], - 'targetFileName' => 'CodeSnippets/TtContentCtrl.rst.txt' + 'targetFileName' => 'CodeSnippets/TtContentCtrl.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/sys_language_uid'], - 'targetFileName' => 'CodeSnippets/SysLanguageUid.rst.txt' + 'targetFileName' => 'CodeSnippets/SysLanguageUid.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/input_1'], - 'targetFileName' => 'CodeSnippets/Input1.rst.txt' + 'targetFileName' => 'CodeSnippets/Input1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/input_28'], - 'targetFileName' => 'CodeSnippets/Input28.rst.txt' + 'targetFileName' => 'CodeSnippets/Input28.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/input_33'], - 'targetFileName' => 'CodeSnippets/Input33.rst.txt' + 'targetFileName' => 'CodeSnippets/Input33.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/radio_1'], - 'targetFileName' => 'CodeSnippets/Radio1.rst.txt' + 'targetFileName' => 'CodeSnippets/Radio1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_2'], - 'targetFileName' => 'CodeSnippets/Checkbox2.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox2.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_3'], - 'targetFileName' => 'CodeSnippets/Checkbox3.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox3.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_7'], - 'targetFileName' => 'CodeSnippets/Checkbox7.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox7.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_8'], - 'targetFileName' => 'CodeSnippets/Checkbox8.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox8.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_12'], - 'targetFileName' => 'CodeSnippets/Checkbox12.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox12.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_16'], - 'targetFileName' => 'CodeSnippets/Checkbox16.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox16.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_17'], - 'targetFileName' => 'CodeSnippets/Checkbox17.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox17.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_18'], - 'targetFileName' => 'CodeSnippets/Checkbox18.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox18.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_19'], - 'targetFileName' => 'CodeSnippets/Checkbox19.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox19.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/checkbox_21'], - 'targetFileName' => 'CodeSnippets/Checkbox21.rst.txt' + 'targetFileName' => 'CodeSnippets/Checkbox21.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_4'], - 'targetFileName' => 'CodeSnippets/Text4.rst.txt' + 'targetFileName' => 'CodeSnippets/Text4.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_5'], - 'targetFileName' => 'CodeSnippets/Text5.rst.txt' + 'targetFileName' => 'CodeSnippets/Text5.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_6'], - 'targetFileName' => 'CodeSnippets/Text6.rst.txt' + 'targetFileName' => 'CodeSnippets/Text6.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_7'], - 'targetFileName' => 'CodeSnippets/Text7.rst.txt' + 'targetFileName' => 'CodeSnippets/Text7.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_9'], - 'targetFileName' => 'CodeSnippets/Text9.rst.txt' + 'targetFileName' => 'CodeSnippets/Text9.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_11'], - 'targetFileName' => 'CodeSnippets/Text11.rst.txt' + 'targetFileName' => 'CodeSnippets/Text11.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_14'], - 'targetFileName' => 'CodeSnippets/Text14.rst.txt' + 'targetFileName' => 'CodeSnippets/Text14.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_15'], - 'targetFileName' => 'CodeSnippets/Text15.rst.txt' + 'targetFileName' => 'CodeSnippets/Text15.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_17'], - 'targetFileName' => 'CodeSnippets/Text17.rst.txt' + 'targetFileName' => 'CodeSnippets/Text17.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_18'], - 'targetFileName' => 'CodeSnippets/Text18.rst.txt' + 'targetFileName' => 'CodeSnippets/Text18.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_19'], - 'targetFileName' => 'CodeSnippets/Text19.rst.txt' + 'targetFileName' => 'CodeSnippets/Text19.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_20'], - 'targetFileName' => 'CodeSnippets/Text20.rst.txt' + 'targetFileName' => 'CodeSnippets/Text20.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/text_2'], - 'targetFileName' => 'CodeSnippets/TranslatedText2.rst.txt' + 'targetFileName' => 'CodeSnippets/TranslatedText2.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_basic.php', 'fields' => ['columns/none_1'], - 'targetFileName' => 'CodeSnippets/None1.rst.txt' + 'targetFileName' => 'CodeSnippets/None1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_checkbox_1'], - 'targetFileName' => 'CodeSnippets/SelectCheckbox1.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectCheckbox1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_checkbox_2'], - 'targetFileName' => 'CodeSnippets/SelectCheckbox2.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectCheckbox2.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_checkbox_3'], - 'targetFileName' => 'CodeSnippets/SelectCheckbox3.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectCheckbox3.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_checkbox_5'], - 'targetFileName' => 'CodeSnippets/SelectCheckbox5.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectCheckbox5.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_checkbox_7'], - 'targetFileName' => 'CodeSnippets/SelectCheckbox7.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectCheckbox7.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_multiplesidebyside_1'], - 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside1.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_multiplesidebyside_2'], - 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside2.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside2.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_multiplesidebyside_5'], - 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside5.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside5.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_multiplesidebyside_6'], - 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside6.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside6.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_multiplesidebyside_8'], - 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside8.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside8.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_multiplesidebyside_10'], - 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside10.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectMultiplesidebyside10.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_1'], - 'targetFileName' => 'CodeSnippets/SelectSingle1.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_3'], - 'targetFileName' => 'CodeSnippets/SelectSingle3.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle3.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_4'], - 'targetFileName' => 'CodeSnippets/SelectSingle4.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle4.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_7'], - 'targetFileName' => 'CodeSnippets/SelectSingle7.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle7.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_8'], - 'targetFileName' => 'CodeSnippets/SelectSingle8.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle8.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_10'], - 'targetFileName' => 'CodeSnippets/SelectSingle10.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle10.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_12'], - 'targetFileName' => 'CodeSnippets/SelectSingle12.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle12.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_13'], - 'targetFileName' => 'CodeSnippets/SelectSingle13.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle13.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_15'], - 'targetFileName' => 'CodeSnippets/SelectSingle15.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle15.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_16'], - 'targetFileName' => 'CodeSnippets/SelectSingle16.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle16.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_17'], - 'targetFileName' => 'CodeSnippets/SelectSingle17.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle17.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_18'], - 'targetFileName' => 'CodeSnippets/SelectSingle18.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle18.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_19'], - 'targetFileName' => 'CodeSnippets/SelectSingle19.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle19.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_single_20'], - 'targetFileName' => 'CodeSnippets/SelectSingle20.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSingle20.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_singlebox_1'], - 'targetFileName' => 'CodeSnippets/SelectSinglebox1.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSinglebox1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_singlebox_3'], - 'targetFileName' => 'CodeSnippets/SelectSinglebox3.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectSinglebox3.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_tree_1'], - 'targetFileName' => 'CodeSnippets/SelectTree1.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectTree1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_tree_2'], - 'targetFileName' => 'CodeSnippets/SelectTree2.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectTree2.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_tree_6'], - 'targetFileName' => 'CodeSnippets/SelectTree6.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectTree6.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php', 'fields' => ['columns/select_requestUpdate_1'], - 'targetFileName' => 'CodeSnippets/SelectRequestupdate1.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectRequestupdate1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_rte.php', 'fields' => ['columns/rte_1'], - 'targetFileName' => 'CodeSnippets/Rte1.rst.txt' + 'targetFileName' => 'CodeSnippets/Rte1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_rte.php', 'fields' => ['columns/rte_2'], - 'targetFileName' => 'CodeSnippets/Rte2.rst.txt' + 'targetFileName' => 'CodeSnippets/Rte2.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_rte.php', 'fields' => ['columns/rte_3'], - 'targetFileName' => 'CodeSnippets/Rte3.rst.txt' + 'targetFileName' => 'CodeSnippets/Rte3.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_rte.php', 'fields' => ['columns/rte_4'], - 'targetFileName' => 'CodeSnippets/Rte4.rst.txt' + 'targetFileName' => 'CodeSnippets/Rte4.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_rte.php', 'fields' => ['columns/rte_5'], - 'targetFileName' => 'CodeSnippets/Rte5.rst.txt' + 'targetFileName' => 'CodeSnippets/Rte5.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_t3editor.php', 'fields' => ['columns/t3editor_1'], - 'targetFileName' => 'CodeSnippets/T3editor1.rst.txt' + 'targetFileName' => 'CodeSnippets/T3editor1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_flex.php', 'fields' => ['columns/flex_1'], - 'targetFileName' => 'CodeSnippets/Flex1.rst.txt' + 'targetFileName' => 'CodeSnippets/Flex1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_flex.php', 'fields' => ['columns/flex_2'], - 'targetFileName' => 'CodeSnippets/Flex2.rst.txt' + 'targetFileName' => 'CodeSnippets/Flex2.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_flex.php', 'fields' => ['columns/flex_file_1'], - 'targetFileName' => 'CodeSnippets/FlexFile1.rst.txt' + 'targetFileName' => 'CodeSnippets/FlexFile1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_slugs.php', 'fields' => ['columns/slug_1'], - 'targetFileName' => 'CodeSnippets/Slug1.rst.txt' + 'targetFileName' => 'CodeSnippets/Slug1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_slugs.php', 'fields' => ['columns/slug_2'], - 'targetFileName' => 'CodeSnippets/Slug2.rst.txt' + 'targetFileName' => 'CodeSnippets/Slug2.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_slugs.php', 'fields' => ['columns/slug_3'], - 'targetFileName' => 'CodeSnippets/Slug3.rst.txt' + 'targetFileName' => 'CodeSnippets/Slug3.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_slugs.php', 'fields' => ['columns/slug_4'], - 'targetFileName' => 'CodeSnippets/Slug4.rst.txt' + 'targetFileName' => 'CodeSnippets/Slug4.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_slugs.php', 'fields' => ['columns/slug_5'], - 'targetFileName' => 'CodeSnippets/Slug5.rst.txt' + 'targetFileName' => 'CodeSnippets/Slug5.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_group.php', 'fields' => ['columns/group_db_1'], - 'targetFileName' => 'CodeSnippets/GroupDb1.rst.txt' + 'targetFileName' => 'CodeSnippets/GroupDb1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_group.php', 'fields' => ['columns/group_db_3'], - 'targetFileName' => 'CodeSnippets/GroupDb3.rst.txt' + 'targetFileName' => 'CodeSnippets/GroupDb3.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_group.php', 'fields' => ['columns/group_db_8'], - 'targetFileName' => 'CodeSnippets/GroupDb8.rst.txt' + 'targetFileName' => 'CodeSnippets/GroupDb8.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_group.php', 'fields' => ['columns/group_db_10'], - 'targetFileName' => 'CodeSnippets/GroupDb10.rst.txt' + 'targetFileName' => 'CodeSnippets/GroupDb10.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_elements_group.php', 'fields' => ['columns/group_db_11'], - 'targetFileName' => 'CodeSnippets/GroupDb11.rst.txt' + 'targetFileName' => 'CodeSnippets/GroupDb11.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_inline_1n.php', 'fields' => ['columns/inline_1'], - 'targetFileName' => 'CodeSnippets/Inline1nInline1.rst.txt' + 'targetFileName' => 'CodeSnippets/Inline1nInline1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_inline_1n1n.php', 'fields' => ['columns/inline_1'], - 'targetFileName' => 'CodeSnippets/Inline1n1nInline1.rst.txt' + 'targetFileName' => 'CodeSnippets/Inline1n1nInline1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_inline_mm.php', 'fields' => ['columns/inline_1'], - 'targetFileName' => 'CodeSnippets/InlineMmInline1.rst.txt' + 'targetFileName' => 'CodeSnippets/InlineMmInline1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_inline_mm_child.php', 'fields' => ['columns/parents'], - 'targetFileName' => 'CodeSnippets/InlineMmChildParents.rst.txt' + 'targetFileName' => 'CodeSnippets/InlineMmChildParents.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_inline_mn.php', 'fields' => ['columns/inline_1'], - 'targetFileName' => 'CodeSnippets/InlineMnInline1.rst.txt' + 'targetFileName' => 'CodeSnippets/InlineMnInline1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_inline_mn_child.php', 'fields' => ['columns/parents'], - 'targetFileName' => 'CodeSnippets/InlineMnChildParents.rst.txt' + 'targetFileName' => 'CodeSnippets/InlineMnChildParents.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_inline_mnsymmetric.php', 'fields' => ['columns/branches'], - 'targetFileName' => 'CodeSnippets/InlineMnSymmetricBranches.rst.txt' + 'targetFileName' => 'CodeSnippets/InlineMnSymmetricBranches.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_inline_usecombination.php', 'fields' => ['columns/inline_1'], - 'targetFileName' => 'CodeSnippets/InlineUsecombinationcInline1.rst.txt' + 'targetFileName' => 'CodeSnippets/InlineUsecombinationcInline1.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_type.php', 'fields' => ['columns/record_type'], - 'targetFileName' => 'CodeSnippets/RecordType.rst.txt' + 'targetFileName' => 'CodeSnippets/RecordType.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_type.php', 'fields' => ['ctrl'], - 'targetFileName' => 'CodeSnippets/CtrlTypeCtrl.rst.txt' + 'targetFileName' => 'CodeSnippets/CtrlTypeCtrl.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_type.php', 'fields' => ['types'], - 'targetFileName' => 'CodeSnippets/CtrlTypeTypes.rst.txt' + 'targetFileName' => 'CodeSnippets/CtrlTypeTypes.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_typeforeign.php', 'fields' => ['columns/foreign_table'], - 'targetFileName' => 'CodeSnippets/TypeForeignForeignTable.rst.txt' + 'targetFileName' => 'CodeSnippets/TypeForeignForeignTable.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_typeforeign.php', 'fields' => ['ctrl'], - 'targetFileName' => 'CodeSnippets/TypeForeignTableCtrl.rst.txt' + 'targetFileName' => 'CodeSnippets/TypeForeignTableCtrl.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_ctrl_common.php', 'fields' => ['ctrl'], - 'targetFileName' => 'CodeSnippets/TxStyleguideCtrlCommon.rst.txt' + 'targetFileName' => 'CodeSnippets/TxStyleguideCtrlCommon.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_ctrl_minimal.php', 'fields' => ['types'], - 'targetFileName' => 'CodeSnippets/TypeMinimal.rst.txt' + 'targetFileName' => 'CodeSnippets/TypeMinimal.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_ctrl_minimal.php', - 'targetFileName' => 'CodeSnippets/TxStyleguideCtrlMinimal.rst.txt' + 'targetFileName' => 'CodeSnippets/TxStyleguideCtrlMinimal.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_palette.php', 'fields' => ['palettes'], - 'targetFileName' => 'CodeSnippets/Palettes.rst.txt' + 'targetFileName' => 'CodeSnippets/Palettes.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_palette.php', 'fields' => ['palettes/palette_1'], - 'targetFileName' => 'CodeSnippets/PaletteDescription.rst.txt' + 'targetFileName' => 'CodeSnippets/PaletteDescription.rst.txt', ], [ 'action' => 'createPhpArrayCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/TCA/tx_styleguide_palette.php', 'fields' => ['types'], - 'targetFileName' => 'CodeSnippets/PalettesTypes.rst.txt' + 'targetFileName' => 'CodeSnippets/PalettesTypes.rst.txt', ], [ 'action' => 'createCodeSnippet', 'sourceFile' => 'EXT:styleguide/Classes/UserFunctions/FormEngine/SelectItemSorter.php', - 'targetFileName' => 'CodeSnippets/SelectItemSorter.rst.txt' + 'targetFileName' => 'CodeSnippets/SelectItemSorter.rst.txt', ], [ 'action' => 'createCodeSnippet', 'sourceFile' => 'EXT:styleguide/Configuration/FlexForms/Simple.xml', - 'targetFileName' => 'CodeSnippets/FlexFormFile1.rst.txt' + 'targetFileName' => 'CodeSnippets/FlexFormFile1.rst.txt', ], [ 'action' => 'createCodeSnippet', 'sourceFile' => 'EXT:styleguide/Classes/UserFunctions/FormEngine/SlugPrefix.php', - 'targetFileName' => 'CodeSnippets/SlugPrefix.rst.txt' + 'targetFileName' => 'CodeSnippets/SlugPrefix.rst.txt', ], // TYPO3 12.0 and above [ diff --git a/composer.json b/composer.json index 6daa54cd..4efaa117 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,8 @@ "typo3/cms-t3editor": "dev-main as 12.4", "typo3/cms-tstemplate": "dev-main as 12.4", "typo3/cms-viewpage": "dev-main as 12.4", - "typo3/cms-workspaces": "dev-main as 12.4" + "typo3/cms-workspaces": "dev-main as 12.4", + "typo3/coding-standards": "^0.7.1" }, "minimum-stability": "dev", "prefer-stable": true, @@ -53,6 +54,7 @@ "typo3/cms-composer-installers": true, "typo3/class-alias-loader": true }, + "bin-dir": ".Build/bin", "vendor-dir": ".Build/vendor" }, "extra": { @@ -62,6 +64,22 @@ } }, "scripts": { + "check": [ + "@check:php" + ], + "check:php": [ + "@check:php:lint", + "@check:php:cs" + ], + "check:php:cs": "Build/Scripts/runTests.sh -n -s cgl", + "check:php:lint": "Build/Scripts/runTests.sh -s lint", + "fix": [ + "@fix:php" + ], + "fix:php": [ + "@fix:php:cs" + ], + "fix:php:cs": "Build/Scripts/runTests.sh -s cgl", "generate": [ "@generate:codesnippets" ],