From b9231fee5b123c0cc791bfb82427bae1e33f4495 Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Sun, 21 May 2023 17:28:15 +0200 Subject: [PATCH] Introduce PHP linting and code styles (#361) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Introduce PHP linting and code styles With #360 PHP files that need code-styles applied have been introduce. releases: main, 12.4 * Use latest versions * Apply changes required by tests * Apply changes required by tests * Apply changes required by code-review * [TASK] Use the `${IMAGE_PREFIX}` prefix for image updates The `Build/Scripts/runTests.sh` transactor provides the flag `-u` to enforce updated used images. The provided core-testing images are now used from the `GitHub Container Registry` and therefore an `${IMAGE_PREFIX}` variable have been introduced to the `runTests.sh` script. It has been missed to use the same prefix variable for the updating and cleanup executed using `-u`. This change now also uses the image prefix variable for the update command. * [TASK] Ensure a unique docker-compose project name Previously the docker-compose project name have been set hardcoded to `local`. With raising use of `docker compose v2` this may interfere with other projects, extensions and repositories. To avoid a cross over interference we ensure to use a unique docker-compose project name in this repository. --------- Co-authored-by: Stefan Bürk (cherry picked from commit d76ad8300514b18ba0917885ea21fc1395b8d85d) --- .github/workflows/tests.yml | 31 +++ .gitignore | 1 + .php-cs-fixer.dist.php | 8 + Build/.gitignore | 1 + Build/Scripts/runTests.sh | 209 ++++++++++++++++++++ Build/Scripts/validateRstFiles.php | 182 +++++++++++++++++ Build/testing-docker/docker-compose.yml | 68 +++++++ Documentation/CodeSnippets/codesnippets.php | 5 +- Documentation/PageTsconfig/Index.rst | 3 +- Documentation/PageTsconfig/TceMain.rst | 2 +- Documentation/PageTsconfig/Templates.rst | 2 +- Documentation/UserTsconfig/Options.rst | 4 +- Documentation/UserTsconfig/TcaDefaults.rst | 2 +- Documentation/UsingSetting/UserTSconfig.rst | 4 +- composer.json | 91 +++++---- 15 files changed, 567 insertions(+), 46 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 100755 Build/Scripts/validateRstFiles.php 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..bfb770fc --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,31 @@ +name: tests + +on: + push: + pull_request: + +jobs: + testsuite: + name: all tests + runs-on: ubuntu-latest + strategy: + # This prevents cancellation of matrix job runs, if one or more already failed + # and let the remaining matrix jobs be executed anyway. + fail-fast: false + env: + php: '8.1' + steps: + - name: Checkout + uses: actions/checkout@v3 + + - 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 + + - name: Check Rst + run: Build/Scripts/runTests.sh -p ${{ env.php }} -s checkRst diff --git a/.gitignore b/.gitignore index c15bfbf1..2cdee5bd 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ composer.lock nbproject Thumbs.db var/ +.cache/ 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..a3d60b37 --- /dev/null +++ b/Build/Scripts/runTests.sh @@ -0,0 +1,209 @@ +#!/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=${PROJECT_NAME}" + # 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 + +RUNTESTS_FILE="${PWD}" +while [ -h "${RUNTESTS_FILE}" ]; do # resolve ${SCRIPT_FILE} until the file is no longer a symlink + TMPDIR="$( cd -P "$( dirname "${RUNTESTS_FILE}" 2>/dev/null )" && pwd )" + RUNTESTS_FILE="$(readlink "${RUNTESTS_FILE}" 2>/dev/null )" + [[ ${RUNTESTS_FILE} != /* ]] && SOURCE="${TMPDIR}/${RUNTESTS_FILE}" +done +PROJECT_DIR="$( cd -P "$( dirname "${RUNTESTS_FILE}" 2>/dev/null )/.." && pwd )" +# get project folder name, lowercased and spaces replaced with dashes +PROJECT_PARENT_NAME="$( basename $( dirname ${PROJECT_DIR} 2>/dev/null ) 2>/dev/null | tr 'A-Z' 'a-z' | tr ' ' '-' )" +[[ -z "${PROJECT_PARENT_NAME}" ]] && PROJECT_PARENT_NAME="no-parent-folder" +PROJECT_NAME="$( echo \"runTests-${PROJECT_PARENT_NAME}-$( basename ${PROJECT_DIR} 2>/dev/null | tr 'A-Z' 'a-z' | tr ' ' '-' )\" | tr '[:upper:]' '[:lower:]')" +# using $$ would add the process id to the string. May be breaking, until proper traps have been implemented to +# ensure docker services are correctly cleaned on errors/exit +#PROJECT_NAME="${PROJECT_NAME//[[:blank:]]/}-$$" +PROJECT_NAME="${PROJECT_NAME//[[:blank:]]/}" + +# 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 ${IMAGE_PREFIX}core-testing-*:latest --format "{{.Repository}}:latest" | xargs -I {} docker pull {} + # remove "dangling" typo3/core-testing-* images (those tagged as ) + docker images ${IMAGE_PREFIX}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/Scripts/validateRstFiles.php b/Build/Scripts/validateRstFiles.php new file mode 100755 index 00000000..92564613 --- /dev/null +++ b/Build/Scripts/validateRstFiles.php @@ -0,0 +1,182 @@ +#!/usr/bin/env php + + * + * By default, the standard path is used. You can override this for + * testing purposes. + */ +class validateRstFiles +{ + /** + * @var array + */ + protected $messages; + + /** + * @var bool + */ + protected $isError; + + /** + * @var string + */ + protected $baseDir = 'Documentation'; + + public function __construct(string $dir = '') + { + if ($dir) { + $this->baseDir = $dir; + } + } + + public function validate() + { + printf('Searching for rst snippets in ' . $this->baseDir . chr(10)); + + $count = 0; + $finder = $this->findFiles(); + foreach ($finder as $file) { + $filename = (string)$file; + $this->clearMessages(); + $fileContent = $file->getContents(); + $this->validateContent($fileContent); + + if ($this->isError) { + $shortPath = substr($filename, strlen($this->baseDir)); + $shortPath = ltrim($shortPath, '/\\'); + $count++; + printf( + '%-10s | %-12s | %-17s | %s ' . chr(10), + $this->messages['include']['title'], + $this->messages['reference']['title'], + $this->messages['index']['title'], + $shortPath + ); + if ($this->messages['include']['message']) { + printf($this->messages['include']['message'] . chr(10)); + } + if ($this->messages['reference']['message']) { + printf($this->messages['reference']['message'] . chr(10)); + } + if ($this->messages['index']['message']) { + printf($this->messages['index']['message'] . chr(10)); + } + } + } + + if ($count > 0) { + fwrite(STDERR, 'Found ' . $count . ' rst files with errors, check full log for details.' . chr(10)); + exit(1); + } + exit(0); + } + + public function findFiles(): Finder + { + $finder = new Finder(); + $finder + ->files() + ->in($this->baseDir) + ->name('/\.rst$/'); + + return $finder; + } + + protected function clearMessages() + { + $this->messages = [ + 'include' => [ + 'title' => '', + 'message' => '', + ], + 'reference' => [ + 'title' => '', + 'message' => '', + ], + 'index' => [ + 'title' => '', + 'message' => '', + ], + ]; + + $this->isError = false; + } + + protected function validateContent(string $fileContent) + { + $checkForRequired = [ + [ + 'type' => 'include', + 'regex' => '#^\\.\\.\s+include::\s+\/Includes.rst.txt|\:orphan\:#m', + 'title' => 'no include', + 'message' => 'insert \'.. include:: /Includes.rst.txt\' in first line of the file', + ], + [ + 'type' => 'include', + 'regex' => '#\={2,}\n.*\n\={2,}#m', + 'title' => 'no title', + 'message' => 'Each document must have a title with multiple === above and below', + ], + ]; + + foreach ($checkForRequired as $values) { + if (preg_match($values['regex'], $fileContent) !== 1) { + $this->messages[$values['type']]['title'] = $values['title']; + $this->messages[$values['type']]['message'] = $values['message']; + $this->isError = true; + } + } + + $checkForForbidden = [ + [ + 'type' => 'include', + 'regex' => '#\.\. *important::#m', + 'title' => 'admonition warning forbidden', + 'message' => 'use ".. attention" instead of ".. important"', + ], + ]; + + foreach ($checkForForbidden as $values) { + if (preg_match($values['regex'], $fileContent) > 0) { + $this->messages[$values['type']]['title'] = $values['title']; + $this->messages[$values['type']]['message'] = $values['message']; + $this->isError = true; + } + } + } +} + +$dir = ''; +$args = getopt('d:'); +if (isset($args['d'])) { + $dir = $args['d']; +} +$validator = new validateRstFiles($dir); +$validator->validate(); 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/CodeSnippets/codesnippets.php b/Documentation/CodeSnippets/codesnippets.php index 662da73b..75dc1235 100644 --- a/Documentation/CodeSnippets/codesnippets.php +++ b/Documentation/CodeSnippets/codesnippets.php @@ -1,4 +1,5 @@ //github.com/TYPO3-Documentation/t3docs-codesnippets // ddev exec vendor/bin/typo3 restructured_api_tools:php_domain public/fileadmin/TYPO3CMS-Reference-TSconfig/Documentation/CodeSnippets/ @@ -16,5 +17,5 @@ 'targetFileName' => 'PageTSconfig/Mod/noExportRecordsLinks.rst.txt', 'caption' => 'EXT:examples/Configuration/TsConfig/Page/Mod/noExportRecordsLinks.tsconfig', 'language' => 'typoscript', - ] -]; \ No newline at end of file + ], +]; diff --git a/Documentation/PageTsconfig/Index.rst b/Documentation/PageTsconfig/Index.rst index 37028c88..f3e0270e 100644 --- a/Documentation/PageTsconfig/Index.rst +++ b/Documentation/PageTsconfig/Index.rst @@ -3,8 +3,9 @@ .. _pagetsconfig: .. _pagetoplevelobjects: +======================= Page TSconfig Reference ------------------------ +======================= The page TSconfig primarily concerns configuration of the modules in the TYPO3 backend, the most important section is :ref:`mod `. diff --git a/Documentation/PageTsconfig/TceMain.rst b/Documentation/PageTsconfig/TceMain.rst index a3996e39..5e1d94d6 100644 --- a/Documentation/PageTsconfig/TceMain.rst +++ b/Documentation/PageTsconfig/TceMain.rst @@ -538,7 +538,7 @@ preview Make sure not to set :typoscript:`options.saveDocView. = 0`, otherwise the save+view button will not be displayed when editing records of your table. - .. important:: + .. attention:: The configuration has to be defined for the page containing the records and :typoscript:`previewPageId` (for example sysfolder holding the records is located outside of your root) diff --git a/Documentation/PageTsconfig/Templates.rst b/Documentation/PageTsconfig/Templates.rst index e99c2b47..ec566053 100644 --- a/Documentation/PageTsconfig/Templates.rst +++ b/Documentation/PageTsconfig/Templates.rst @@ -90,7 +90,7 @@ the default is used. This can become impractical for large template files. In such cases it might be an option to request a split of a large template file into smaller partial files so an extension can override a specific partial only. -.. important:: +.. attention:: When multiple override paths are defined and more than one of them contains overrides for a specific template, the override definition with the highest diff --git a/Documentation/UserTsconfig/Options.rst b/Documentation/UserTsconfig/Options.rst index 31d44941..c357fcf8 100644 --- a/Documentation/UserTsconfig/Options.rst +++ b/Documentation/UserTsconfig/Options.rst @@ -625,7 +625,7 @@ hideModules :aspect:`Description` Configure which module groups or modules should be hidden from the main menu. - .. important:: + .. attention:: It is not an access restriction but makes defined modules invisible. This means that in principle these modules can still be accessed if the rights allow this. @@ -1091,5 +1091,3 @@ showHistory Note it is possible to set this for single tables using :typoscript:`options.showHistory.[tableName]`. Any value set for a single table will override the default value set for :typoscript:`showHistory`. - - diff --git a/Documentation/UserTsconfig/TcaDefaults.rst b/Documentation/UserTsconfig/TcaDefaults.rst index 426f1f2d..5a8b1e10 100644 --- a/Documentation/UserTsconfig/TcaDefaults.rst +++ b/Documentation/UserTsconfig/TcaDefaults.rst @@ -42,7 +42,7 @@ Example: # Show newly created pages by default TCAdefaults.pages.hidden = 0 -.. important:: +.. attention:: This example will not work when creating the page from the context menu since this is triggered by the values listed in the `ctrl` section of diff --git a/Documentation/UsingSetting/UserTSconfig.rst b/Documentation/UsingSetting/UserTSconfig.rst index 0e77e075..2f63936e 100644 --- a/Documentation/UsingSetting/UserTSconfig.rst +++ b/Documentation/UsingSetting/UserTSconfig.rst @@ -1,4 +1,4 @@ - +.. include:: /Includes.rst.txt .. index:: User TSconfig .. _setting-user-tsconfig: @@ -187,7 +187,7 @@ overrides the same value set in the Page TSconfig, just prefixed with `page.`: TYPO3\CMS\Info\Controller\TranslationStatusController = 1 } -.. important:: +.. attention:: It is **not** possible to *reference* the value of a property from page TSconfig and to *modify* this value in user TSconfig! If you set a property diff --git a/composer.json b/composer.json index dd683230..1b2df737 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "Page TSconfig and User TSconfig reference.", "license": "OPL-1.0", "require": { - "typo3/cms-core": "dev-main as 12.0" + "typo3/cms-core": "dev-main" }, "minimum-stability": "dev", "prefer-stable": true, @@ -19,46 +19,67 @@ "typo3/cms-composer-installers": true, "typo3/class-alias-loader": true }, + "bin-dir": ".Build/bin", + "sort-packages": true, "vendor-dir": ".Build/vendor" }, "require-dev": { "t3docs/codesnippet": "dev-main", - "typo3/cms-adminpanel": "dev-main as 12.0", - "typo3/cms-backend": "dev-main as 12.0", - "typo3/cms-belog": "dev-main as 12.0", - "typo3/cms-beuser": "dev-main as 12.0", - "typo3/cms-dashboard": "dev-main as 12.0", - "typo3/cms-extbase": "dev-main as 12.0", - "typo3/cms-extensionmanager": "dev-main as 12.0", - "typo3/cms-felogin": "dev-main as 12.0", - "typo3/cms-filelist": "dev-main as 12.0", - "typo3/cms-filemetadata": "dev-main as 12.0", - "typo3/cms-fluid": "dev-main as 12.0", - "typo3/cms-fluid-styled-content": "dev-main as 12.0", - "typo3/cms-form": "dev-main as 12.0", - "typo3/cms-frontend": "dev-main as 12.0", - "typo3/cms-impexp": "dev-main as 12.0", - "typo3/cms-indexed-search": "dev-main as 12.0", - "typo3/cms-info": "dev-main as 12.0", - "typo3/cms-install": "dev-main as 12.0", - "typo3/cms-linkvalidator": "dev-main as 12.0", - "typo3/cms-lowlevel": "dev-main as 12.0", - "typo3/cms-opendocs": "dev-main as 12.0", - "typo3/cms-recycler": "dev-main as 12.0", - "typo3/cms-redirects": "dev-main as 12.0", - "typo3/cms-reports": "dev-main as 12.0", - "typo3/cms-rte-ckeditor": "dev-main as 12.0", - "typo3/cms-scheduler": "dev-main as 12.0", - "typo3/cms-seo": "dev-main as 12.0", - "typo3/cms-setup": "dev-main as 12.0", - "typo3/cms-sys-note": "dev-main as 12.0", - "typo3/cms-t3editor": "dev-main as 12.0", - "typo3/cms-tstemplate": "dev-main as 12.0", - "typo3/cms-viewpage": "dev-main as 12.0", - "typo3/cms-workspaces": "dev-main as 12.0", - "t3docs/examples": "dev-main" + "typo3/cms-adminpanel": "dev-main", + "typo3/cms-backend": "dev-main", + "typo3/cms-belog": "dev-main", + "typo3/cms-beuser": "dev-main", + "typo3/cms-dashboard": "dev-main", + "typo3/cms-extbase": "dev-main", + "typo3/cms-extensionmanager": "dev-main", + "typo3/cms-felogin": "dev-main", + "typo3/cms-filelist": "dev-main", + "typo3/cms-filemetadata": "dev-main", + "typo3/cms-fluid": "dev-main", + "typo3/cms-fluid-styled-content": "dev-main", + "typo3/cms-form": "dev-main", + "typo3/cms-frontend": "dev-main", + "typo3/cms-impexp": "dev-main", + "typo3/cms-indexed-search": "dev-main", + "typo3/cms-info": "dev-main", + "typo3/cms-install": "dev-main", + "typo3/cms-linkvalidator": "dev-main", + "typo3/cms-lowlevel": "dev-main", + "typo3/cms-opendocs": "dev-main", + "typo3/cms-recycler": "dev-main", + "typo3/cms-redirects": "dev-main", + "typo3/cms-reports": "dev-main", + "typo3/cms-rte-ckeditor": "dev-main", + "typo3/cms-scheduler": "dev-main", + "typo3/cms-seo": "dev-main", + "typo3/cms-setup": "dev-main", + "typo3/cms-sys-note": "dev-main", + "typo3/cms-t3editor": "dev-main", + "typo3/cms-tstemplate": "dev-main", + "typo3/cms-viewpage": "dev-main", + "typo3/cms-workspaces": "dev-main", + "t3docs/examples": "dev-main", + "typo3/coding-standards": "^0.7.1" }, "scripts": { + "check": [ + "@check:php", + "@check:rst" + ], + "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", + "check:rst": "Build/Scripts/runTests.sh -s checkRst", + "fix": [ + "@fix:php" + ], + "fix:php": [ + "@fix:php:cs" + ], + "fix:php:cs": "Build/Scripts/runTests.sh -s cgl", "generate:codesnippets": [ ".Build/vendor/bin/typo3 codesnippet:create Documentation/CodeSnippets/" ],