2017-04-24 17:46:03 +02:00
|
|
|
{
|
2020-12-01 23:12:34 +01:00
|
|
|
"name": "ttn/tea",
|
2021-02-03 19:52:21 +01:00
|
|
|
"description": "TYPO3 example extension for unit testing and best practices",
|
2021-12-26 02:48:55 +01:00
|
|
|
"license": "GPL-2.0-or-later",
|
|
|
|
"type": "typo3-cms-extension",
|
2020-12-01 23:12:34 +01:00
|
|
|
"keywords": [
|
|
|
|
"typo3",
|
|
|
|
"example",
|
|
|
|
"extension",
|
|
|
|
"tdd",
|
|
|
|
"phpunit",
|
|
|
|
"unit testing",
|
|
|
|
"best practices"
|
|
|
|
],
|
|
|
|
"authors": [
|
|
|
|
{
|
|
|
|
"name": "Oliver Klee",
|
|
|
|
"email": "typo3-coding@oliverklee.de",
|
|
|
|
"homepage": "https://www.oliverklee.de",
|
2023-11-01 23:33:14 +01:00
|
|
|
"role": "maintainer"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Daniel Siepmann",
|
|
|
|
"email": "coding@daniel-siepmann.de",
|
|
|
|
"homepage": "https://daniel-siepmann.de/",
|
|
|
|
"role": "maintainer"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Łukasz Uznański",
|
|
|
|
"email": "lukaszuznanski94@gmail.com",
|
|
|
|
"homepage": "https://uznanski.pl/",
|
|
|
|
"role": "maintainer"
|
2020-12-01 23:12:34 +01:00
|
|
|
}
|
|
|
|
],
|
2022-04-12 19:00:11 +02:00
|
|
|
"homepage": "https://extensions.typo3.org/extension/tea/",
|
2021-12-26 02:48:55 +01:00
|
|
|
"support": {
|
2023-10-08 21:53:41 +02:00
|
|
|
"issues": "https://github.com/FriendsOfTYPO3/tea/issues",
|
|
|
|
"source": "https://github.com/FriendsOfTYPO3/tea",
|
2022-04-12 19:00:11 +02:00
|
|
|
"docs": "https://docs.typo3.org/p/ttn/tea/main/en-us/"
|
2021-12-26 02:48:55 +01:00
|
|
|
},
|
2020-12-01 23:12:34 +01:00
|
|
|
"require": {
|
2023-11-01 21:20:27 +01:00
|
|
|
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
|
2022-10-06 17:55:14 +02:00
|
|
|
"psr/http-message": "^1.0.1",
|
2024-04-03 16:38:42 +02:00
|
|
|
"typo3/cms-core": "^11.5.4 || ^12.4.2",
|
|
|
|
"typo3/cms-extbase": "^11.5.4 || ^12.4.2",
|
|
|
|
"typo3/cms-fluid": "^11.5.4 || ^12.4.2",
|
|
|
|
"typo3/cms-frontend": "^11.5.4 || ^12.4.2"
|
2020-12-01 23:12:34 +01:00
|
|
|
},
|
|
|
|
"require-dev": {
|
2024-09-17 14:35:01 +02:00
|
|
|
"brianium/paratest": "^6.11.1",
|
2024-06-17 07:26:25 +02:00
|
|
|
"ergebnis/composer-normalize": "^2.43.0",
|
2024-09-02 07:46:15 +02:00
|
|
|
"friendsofphp/php-cs-fixer": "^3.64.0",
|
2024-02-26 16:55:23 +01:00
|
|
|
"helmich/typo3-typoscript-lint": "^3.1.1",
|
2024-07-29 19:20:24 +02:00
|
|
|
"icanhazstring/composer-unused": "^0.8.11",
|
2024-07-30 20:17:05 +02:00
|
|
|
"php-parallel-lint/php-parallel-lint": "^1.4",
|
2024-07-31 12:54:03 +02:00
|
|
|
"phpmd/phpmd": "^2.15.0",
|
2024-09-05 07:26:41 +02:00
|
|
|
"phpstan/extension-installer": "^1.4.3",
|
2024-09-19 10:30:37 +02:00
|
|
|
"phpstan/phpstan": "^1.12.4",
|
2024-05-13 09:51:23 +02:00
|
|
|
"phpstan/phpstan-phpunit": "^1.4.0",
|
2024-09-20 16:18:02 +02:00
|
|
|
"phpstan/phpstan-strict-rules": "^1.6.1",
|
2024-07-11 07:48:09 +02:00
|
|
|
"phpunit/phpunit": "^9.6.20",
|
2024-08-27 08:07:56 +02:00
|
|
|
"saschaegerer/phpstan-typo3": "^1.10.2",
|
2024-07-12 07:24:25 +02:00
|
|
|
"seld/jsonlint": "^1.11.0",
|
2024-05-15 07:39:49 +02:00
|
|
|
"spaze/phpstan-disallowed-calls": "^3.4",
|
2024-09-18 13:23:46 +02:00
|
|
|
"squizlabs/php_codesniffer": "^3.10.3",
|
2024-08-30 07:15:39 +02:00
|
|
|
"ssch/typo3-rector": "^2.6.5",
|
2024-05-07 16:49:48 +02:00
|
|
|
"ssch/typo3-rector-testing-framework": "^2.0.1",
|
2024-01-16 14:38:32 +01:00
|
|
|
"symfony/console": "^5.4 || ^6.4 || ^7.0",
|
|
|
|
"symfony/translation": "^5.4 || ^6.4 || ^7.0",
|
|
|
|
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
|
2024-02-06 13:52:03 +01:00
|
|
|
"tomasvotruba/cognitive-complexity": "^0.2.3",
|
2024-06-15 12:49:55 +02:00
|
|
|
"tomasvotruba/type-coverage": "^0.3.1",
|
2024-04-03 16:38:42 +02:00
|
|
|
"typo3/cms-fluid-styled-content": "^11.5.4 || ^12.4.2",
|
2024-07-29 18:41:48 +02:00
|
|
|
"typo3/coding-standards": "^0.6.1 || ^0.8.0",
|
2024-09-07 14:33:57 +02:00
|
|
|
"typo3/testing-framework": "^7.1.0",
|
2024-04-02 07:19:18 +02:00
|
|
|
"webmozart/assert": "^1.11.0"
|
2020-12-01 23:12:34 +01:00
|
|
|
},
|
2021-12-26 02:48:55 +01:00
|
|
|
"replace": {
|
|
|
|
"typo3-ter/tea": "self.version"
|
|
|
|
},
|
|
|
|
"conflict": {
|
|
|
|
"typo3/class-alias-loader": "< 1.1.0"
|
|
|
|
},
|
|
|
|
"prefer-stable": true,
|
|
|
|
"autoload": {
|
|
|
|
"psr-4": {
|
|
|
|
"TTN\\Tea\\": "Classes/"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"autoload-dev": {
|
|
|
|
"psr-4": {
|
|
|
|
"TTN\\Tea\\Tests\\": "Tests/"
|
|
|
|
}
|
|
|
|
},
|
2021-02-03 19:52:21 +01:00
|
|
|
"config": {
|
2021-12-28 02:10:09 +01:00
|
|
|
"allow-plugins": {
|
2021-12-29 02:50:08 +01:00
|
|
|
"ergebnis/composer-normalize": true,
|
|
|
|
"phpstan/extension-installer": true,
|
2022-10-15 20:53:15 +02:00
|
|
|
"sbuerk/typo3-cmscomposerinstallers-testingframework-bridge": true,
|
2021-12-29 02:50:08 +01:00
|
|
|
"typo3/class-alias-loader": true,
|
|
|
|
"typo3/cms-composer-installers": true
|
2021-12-28 02:10:09 +01:00
|
|
|
},
|
2023-04-11 10:24:24 +02:00
|
|
|
"bin-dir": ".Build/bin",
|
2024-02-07 09:54:59 +01:00
|
|
|
"lock": false,
|
2021-02-03 19:52:21 +01:00
|
|
|
"preferred-install": {
|
|
|
|
"*": "dist"
|
|
|
|
},
|
|
|
|
"sort-packages": true,
|
|
|
|
"vendor-dir": ".Build/vendor"
|
2020-12-01 23:12:34 +01:00
|
|
|
},
|
2021-02-03 19:52:21 +01:00
|
|
|
"extra": {
|
|
|
|
"branch-alias": {
|
2024-01-08 19:47:37 +01:00
|
|
|
"dev-main": "4.0.x-dev"
|
2021-02-03 19:52:21 +01:00
|
|
|
},
|
|
|
|
"typo3/cms": {
|
|
|
|
"extension-key": "tea",
|
2024-01-31 10:14:57 +01:00
|
|
|
"web-dir": ".Build/public"
|
2021-02-03 19:52:21 +01:00
|
|
|
}
|
2020-12-01 23:12:34 +01:00
|
|
|
},
|
|
|
|
"scripts": {
|
2022-10-16 17:50:33 +02:00
|
|
|
"ci:composer:normalize": "@composer normalize --no-check-lock --dry-run",
|
2023-11-03 11:35:49 +01:00
|
|
|
"ci:composer:psr-verify": "@composer dumpautoload --optimize --strict-psr --no-plugins",
|
2024-07-29 19:20:24 +02:00
|
|
|
"ci:composer:unused": "composer-unused",
|
2021-10-06 16:23:35 +02:00
|
|
|
"ci:coverage": [
|
|
|
|
"@ci:coverage:unit",
|
|
|
|
"@ci:coverage:functional"
|
|
|
|
],
|
2022-04-13 16:14:25 +02:00
|
|
|
"ci:coverage:functional": [
|
2023-12-12 15:09:32 +01:00
|
|
|
"@ci:tests:create-directories",
|
2022-04-13 16:14:25 +02:00
|
|
|
"@coverage:create-directories",
|
2024-09-06 07:23:29 +02:00
|
|
|
"phpunit -c Build/phpunit/FunctionalTests.xml --whitelist Classes --coverage-php=build/coverage/functional.cov Tests/Functional"
|
2022-04-13 16:14:25 +02:00
|
|
|
],
|
|
|
|
"ci:coverage:merge": [
|
|
|
|
"@coverage:create-directories",
|
2024-09-06 07:23:29 +02:00
|
|
|
"@php tools/phpcov merge --clover=build/logs/clover.xml build/coverage/"
|
2022-04-13 16:14:25 +02:00
|
|
|
],
|
|
|
|
"ci:coverage:unit": [
|
|
|
|
"@coverage:create-directories",
|
2024-09-06 07:23:29 +02:00
|
|
|
"phpunit -c Build/phpunit/UnitTests.xml --whitelist Classes --coverage-php=build/coverage/unit.cov Tests/Unit"
|
2022-04-13 16:14:25 +02:00
|
|
|
],
|
2023-12-16 23:55:34 +01:00
|
|
|
"ci:json:lint": "find . ! -path '*/.cache/*' ! -path '*/.Build/*' ! -path '*/node_modules/*' -name '*.json' | xargs -r php .Build/bin/jsonlint -q",
|
2020-12-01 23:12:34 +01:00
|
|
|
"ci:php": [
|
2021-03-30 00:55:20 +02:00
|
|
|
"@ci:php:cs-fixer",
|
2021-04-05 17:26:00 +02:00
|
|
|
"@ci:php:lint",
|
|
|
|
"@ci:php:sniff",
|
|
|
|
"@ci:php:stan"
|
2020-12-01 23:12:34 +01:00
|
|
|
],
|
2023-11-27 16:09:08 +01:00
|
|
|
"ci:php:cs-fixer": "php-cs-fixer fix --config .php-cs-fixer.php -v --dry-run --diff",
|
2024-07-30 20:17:05 +02:00
|
|
|
"ci:php:lint": "parallel-lint .*.php *.php Classes Configuration Tests",
|
2024-07-31 12:54:03 +02:00
|
|
|
"ci:php:mess": "phpmd Classes text Build/phpmd/phpmd.xml",
|
2024-09-17 11:41:40 +02:00
|
|
|
"ci:php:sniff": "phpcs --standard=Build/phpcs/phpcs.xml Classes Configuration Tests",
|
2024-07-31 18:24:07 +02:00
|
|
|
"ci:php:stan": "phpstan --no-progress -v",
|
2020-12-01 23:12:34 +01:00
|
|
|
"ci:static": [
|
2021-04-05 17:26:00 +02:00
|
|
|
"@ci:composer:normalize",
|
2024-08-30 08:58:33 +02:00
|
|
|
"@ci:composer:unused",
|
2021-04-05 17:26:00 +02:00
|
|
|
"@ci:json:lint",
|
|
|
|
"@ci:php:cs-fixer",
|
2020-12-01 23:12:34 +01:00
|
|
|
"@ci:php:lint",
|
|
|
|
"@ci:php:sniff",
|
2021-04-05 17:26:00 +02:00
|
|
|
"@ci:php:stan",
|
2024-07-29 19:49:37 +02:00
|
|
|
"@ci:typoscript:lint",
|
2024-05-07 11:25:29 +02:00
|
|
|
"@ci:xliff:lint",
|
2021-04-05 17:26:00 +02:00
|
|
|
"@ci:yaml:lint"
|
2020-12-01 23:12:34 +01:00
|
|
|
],
|
2024-01-31 10:14:57 +01:00
|
|
|
"ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests",
|
2023-12-12 15:09:32 +01:00
|
|
|
"ci:tests:functional": [
|
|
|
|
"@ci:tests:create-directories",
|
2024-07-30 16:35:47 +02:00
|
|
|
"paratest -c Build/phpunit/FunctionalTests.xml Tests/Functional"
|
2023-12-12 15:09:32 +01:00
|
|
|
],
|
2024-07-30 19:26:39 +02:00
|
|
|
"ci:tests:unit": "phpunit -c Build/phpunit/UnitTests.xml Tests/Unit",
|
2024-07-29 19:49:37 +02:00
|
|
|
"ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
2024-07-08 09:40:01 +02:00
|
|
|
"ci:xliff:lint": "php Build/xliff/xliff-lint lint:xliff Resources/Private/Language",
|
2024-05-07 15:14:57 +02:00
|
|
|
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint",
|
2024-09-06 07:23:29 +02:00
|
|
|
"coverage:create-directories": "mkdir -p build/coverage build/logs",
|
2024-05-07 12:18:26 +02:00
|
|
|
"docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation",
|
2023-05-03 12:52:54 +02:00
|
|
|
"fix:composer:normalize": "@composer normalize --no-check-lock",
|
2020-12-01 23:12:34 +01:00
|
|
|
"fix:php": [
|
|
|
|
"@fix:php:cs",
|
|
|
|
"@fix:php:sniff"
|
|
|
|
],
|
2021-11-17 16:45:49 +01:00
|
|
|
"fix:php:cs": "php-cs-fixer fix --config .php-cs-fixer.php",
|
2024-09-17 11:41:40 +02:00
|
|
|
"fix:php:sniff": "phpcbf --standard=Build/phpcs/phpcs.xml Classes Configuration Tests",
|
2024-07-30 19:26:39 +02:00
|
|
|
"phpstan:baseline": "phpstan --generate-baseline --allow-empty-baseline",
|
2021-02-22 16:59:15 +01:00
|
|
|
"prepare-release": [
|
|
|
|
"rm -rf .Build",
|
2021-09-22 10:50:41 +02:00
|
|
|
"rm -rf .ddev",
|
2021-02-22 16:59:15 +01:00
|
|
|
"rm -rf .github",
|
|
|
|
"rm -rf .gitlab",
|
[FEATURE] Integrate `runTests.sh` execution wrapper - round one (#900)
TYPO3 Core and related repositories like the `typo3/testing-framework`
or `typo3/styleguide` uses a bash script arround docker to execute all
scripts over different operating systems in a controlled and ensured
manner. This helps to reproduce locally failing jobs from a CI like
GitHub actions or GitLab.
TYPO3 core dropped recently the requirement for `docker-compose`,
reducing it to `docker` and preparing for dual usage with docker
and podman in the future.
This change integrates the current state as extension wrapper,
aligning contained suits with existing tools. Additionally, a
TYPO3 core version switch is integrated.
The added script is excluded from git archive building and
during releasing.
A list of possible options can be display with:
```shell
Build/Scripts/runTests.sh -h
```
Overview of integrated features:
* `-p` to select the PHP version (7.4 - 8.3)
* `-s` to select the suite to execute
* `-t` to select the TYPO3 core version, mainly
needed for the `composer` suits executions
* `-e` to provide additionally flags for phpunit
executions, e.g. for unit and functional tests
* `-x` to enable xdebug trigger - this helps with
debugging during unit or functional test
* `-d` to select the database backend to use, needed
for functional test execution to start the correct
database
* `-a` to select the used php driver for the `-d`
database backend, if multiple options are possible
* `-i` to specify the mariadb version
* `-j` to specify the mysql version
* `-k` to specify the postgres version
Available suits (`-s`):
- cgl: Checks the code style with the PHP Coding Standards Fixer
(PHP-CS-Fixer).
- cglFix: Fixes the code style with PHP-CS-Fixer."
- clean: clean up build, cache and testing related files and
folders
- cleanBuild: clean up build related files and folders
- cleanCache: clean up cache related files and folders
- cleanRenderedDocumentation: clean up rendered documentation
files and folders (Documentation-GENERATED-temp)
- cleanTests: clean up test related files and folders
- composer: "composer" with all remaining arguments dispatched.
- composerInstallMax: "composer update", with no platform.php config.
- composerInstallMin: "composer update --prefer-lowest", with
platform.php set to PHP version x.x.0.
- docsGenerate: Renders the extension ReST documentation.
- functional: PHP functional tests
- lintTypoScript: TypoScript linting
- lintPhp: PHP linting
- lintJson: JSON linting
- lintYaml: YAML linting
- phpstan: phpstan tests
- phpstanGenerateBaseline: regenerate phpstan baseline, handy after
phpstan updates
- unit (default): PHP unit tests
- unitRandom: PHP unit tests in random order, add -o <number> to use
specific seed
Notes:
* Not everything is available directly for now in the `runTests.sh`
and therefore not enabled in CI.
* Coverage related execution needs extended work and are therefore
left out for now.
* `composer.json` protection for core version changes not included
yet like the one or other advanced option.
* Intermediate cleanings for changing php versions and core versions
not included yet and will follow.
* typo3/testing-framework template files **must** be copied to the
extension or project and **must not** be used from the vendor
folder.
Resolves: #899
Releases: main
2023-07-31 13:38:07 +02:00
|
|
|
"rm -rf Build",
|
2021-02-22 16:59:15 +01:00
|
|
|
"rm -rf Tests",
|
2021-02-24 13:19:09 +01:00
|
|
|
"rm -rf tools",
|
2021-02-22 16:59:15 +01:00
|
|
|
"rm .editorconfig",
|
2022-05-18 17:17:45 +02:00
|
|
|
"rm .eslintignore",
|
|
|
|
"rm .eslintrc.json",
|
2024-01-05 12:51:16 +01:00
|
|
|
"rm .gitattributes",
|
|
|
|
"rm .gitignore",
|
2024-07-08 10:02:39 +02:00
|
|
|
"rm .npmrc",
|
|
|
|
"rm .nvmrc",
|
2024-01-05 12:51:16 +01:00
|
|
|
"rm .php-cs-fixer.php",
|
2022-05-18 17:17:45 +02:00
|
|
|
"rm .prettierrc.js",
|
2024-05-14 12:13:43 +02:00
|
|
|
"rm package-lock.json",
|
2024-07-08 10:02:39 +02:00
|
|
|
"rm package.json",
|
2021-02-24 13:19:09 +01:00
|
|
|
"rm phive.xml",
|
2021-09-13 04:06:10 +02:00
|
|
|
"rm phpstan-baseline.neon",
|
|
|
|
"rm phpstan.neon",
|
2024-05-07 16:49:48 +02:00
|
|
|
"rm rector.php",
|
2024-01-05 12:51:16 +01:00
|
|
|
"rm stylelint.config.js"
|
2020-12-01 23:12:34 +01:00
|
|
|
]
|
|
|
|
},
|
2021-08-24 02:27:27 +02:00
|
|
|
"scripts-descriptions": {
|
|
|
|
"ci:composer:normalize": "Checks the composer.json.",
|
2023-02-22 18:46:08 +01:00
|
|
|
"ci:composer:psr-verify": "Verifies PSR-4 namespace correctness.",
|
2024-07-29 19:20:24 +02:00
|
|
|
"ci:composer:unused": "Finds unused Composer packages required in composer.json.",
|
2021-10-06 16:23:35 +02:00
|
|
|
"ci:coverage:functional": "Generates the code coverage report for functional tests.",
|
|
|
|
"ci:coverage:merge": "Merges the code coverage reports for unit and functional tests.",
|
|
|
|
"ci:coverage:unit": "Generates the code coverage report for unit tests.",
|
2021-08-24 02:27:27 +02:00
|
|
|
"ci:json:lint": "Lints the JSON files.",
|
|
|
|
"ci:php": "Runs all static checks for the PHP files.",
|
|
|
|
"ci:php:cs-fixer": "Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer).",
|
|
|
|
"ci:php:lint": "Lints the PHP files for syntax errors.",
|
2024-07-31 12:54:03 +02:00
|
|
|
"ci:php:mess": "Runs PHP mess detection.",
|
2021-08-24 02:27:27 +02:00
|
|
|
"ci:php:sniff": "Checks the code style with PHP_CodeSniffer (PHPCS).",
|
|
|
|
"ci:php:stan": "Checks the PHP types using PHPStan.",
|
|
|
|
"ci:static": "Runs all static code checks (syntax, style, types).",
|
2023-12-12 15:09:32 +01:00
|
|
|
"ci:tests:create-directories": "Creates the directories required to smoothely run the functional tests.",
|
2021-08-24 02:27:27 +02:00
|
|
|
"ci:tests:functional": "Runs the functional tests.",
|
|
|
|
"ci:tests:unit": "Runs the unit tests.",
|
2024-07-29 19:49:37 +02:00
|
|
|
"ci:typoscript:lint": "Lints the TypoScript files.",
|
2023-12-15 16:17:39 +01:00
|
|
|
"ci:xliff:lint": "Lints the XLIFF files.",
|
2021-08-24 02:27:27 +02:00
|
|
|
"ci:yaml:lint": "Lints the YAML files.",
|
2022-04-13 16:14:25 +02:00
|
|
|
"coverage:create-directories": "Creates the directories needed for recording and merging the code coverage reports.",
|
2021-08-24 02:27:27 +02:00
|
|
|
"docs:generate": "Renders the extension ReST documentation.",
|
2023-05-03 12:52:54 +02:00
|
|
|
"fix:composer:normalize": "Normalizes composer.json file content.",
|
2021-08-24 02:27:27 +02:00
|
|
|
"fix:php": "Runs all fixers for the PHP code.",
|
|
|
|
"fix:php:cs": "Fixes the code style with PHP-CS-Fixer.",
|
2021-09-13 04:06:10 +02:00
|
|
|
"fix:php:sniff": "Fixes the code style with PHP_CodeSniffer.",
|
2022-02-25 11:36:30 +01:00
|
|
|
"phpstan:baseline": "Updates the PHPStan baseline file to match the code.",
|
|
|
|
"prepare-release": "Removes development-only files in preparation of a TER release."
|
2020-12-01 23:12:34 +01:00
|
|
|
}
|
2017-04-24 17:46:03 +02:00
|
|
|
}
|