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",
|
|
|
|
"role": "developer"
|
|
|
|
}
|
|
|
|
],
|
2022-04-12 19:00:11 +02:00
|
|
|
"homepage": "https://extensions.typo3.org/extension/tea/",
|
2021-12-26 02:48:55 +01:00
|
|
|
"support": {
|
|
|
|
"issues": "https://github.com/TYPO3-Documentation/tea/issues",
|
2022-04-12 19:00:11 +02:00
|
|
|
"source": "https://github.com/TYPO3-Documentation/tea",
|
|
|
|
"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-04-02 12:53:33 +02:00
|
|
|
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0",
|
2022-10-06 17:55:14 +02:00
|
|
|
"psr/http-message": "^1.0.1",
|
2023-04-25 10:01:54 +02:00
|
|
|
"typo3/cms-core": "^11.5.4 || ^12.4",
|
|
|
|
"typo3/cms-extbase": "^11.5.4 || ^12.4",
|
|
|
|
"typo3/cms-fluid": "^11.5.4 || ^12.4",
|
|
|
|
"typo3/cms-frontend": "^11.5.4 || ^12.4"
|
2020-12-01 23:12:34 +01:00
|
|
|
},
|
|
|
|
"require-dev": {
|
2023-05-02 11:17:58 +02:00
|
|
|
"doctrine/dbal": "^2.13.5 || ^3.6.2",
|
2022-09-23 16:00:17 +02:00
|
|
|
"ergebnis/composer-normalize": "^2.28.3",
|
2023-10-04 07:38:09 +02:00
|
|
|
"friendsofphp/php-cs-fixer": "^3.34.1",
|
2023-02-22 07:26:20 +01:00
|
|
|
"helmich/typo3-typoscript-lint": "^3.1.0",
|
2023-07-17 07:47:10 +02:00
|
|
|
"php-coveralls/php-coveralls": "^2.6.0",
|
2023-05-25 08:02:18 +02:00
|
|
|
"phpstan/extension-installer": "^1.3.1",
|
2023-10-03 07:45:59 +02:00
|
|
|
"phpstan/phpstan": "^1.10.37",
|
2023-08-26 16:14:04 +02:00
|
|
|
"phpstan/phpstan-phpunit": "^1.3.14",
|
2023-03-30 08:03:35 +02:00
|
|
|
"phpstan/phpstan-strict-rules": "^1.5.1",
|
2023-09-19 17:52:56 +02:00
|
|
|
"phpunit/phpunit": "^9.6.13",
|
2023-09-07 16:47:27 +02:00
|
|
|
"saschaegerer/phpstan-typo3": "^1.9.0",
|
2023-05-11 17:29:10 +02:00
|
|
|
"seld/jsonlint": "^1.10.0",
|
2023-02-23 12:15:00 +01:00
|
|
|
"squizlabs/php_codesniffer": "^3.7.2",
|
2023-05-02 11:17:58 +02:00
|
|
|
"symfony/yaml": "^5.3.6 || ^6.2.0",
|
|
|
|
"typo3/cms-fluid-styled-content": "^11.5.4 || ^12.4.0",
|
2022-12-22 09:53:36 +01:00
|
|
|
"typo3/coding-standards": "^0.6.1",
|
2023-08-29 07:32:36 +02:00
|
|
|
"typo3/testing-framework": "^7.0.4"
|
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",
|
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": {
|
2022-10-19 22:19:52 +02:00
|
|
|
"dev-main": "3.0.x-dev"
|
2021-02-03 19:52:21 +01:00
|
|
|
},
|
|
|
|
"typo3/cms": {
|
2021-09-11 13:56:03 +02:00
|
|
|
"app-dir": ".Build",
|
2021-02-03 19:52:21 +01:00
|
|
|
"extension-key": "tea",
|
2023-04-11 10:24:24 +02:00
|
|
|
"web-dir": ".Build/Web"
|
2021-02-03 19:52:21 +01:00
|
|
|
}
|
2020-12-01 23:12:34 +01:00
|
|
|
},
|
|
|
|
"scripts": {
|
2021-02-03 19:52:21 +01:00
|
|
|
"post-autoload-dump": [
|
|
|
|
"@link-extension"
|
|
|
|
],
|
|
|
|
"ci": [
|
|
|
|
"@ci:static"
|
2020-12-01 23:12:34 +01:00
|
|
|
],
|
2022-10-16 17:50:33 +02:00
|
|
|
"ci:composer:normalize": "@composer normalize --no-check-lock --dry-run",
|
2023-02-22 18:46:08 +01:00
|
|
|
"ci:composer:psr-verify": "@composer dumpautoload --optimize --strict-psr",
|
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": [
|
|
|
|
"@coverage:create-directories",
|
2023-04-11 10:24:24 +02:00
|
|
|
".Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/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",
|
2022-10-24 18:26:02 +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",
|
2023-04-11 10:24:24 +02:00
|
|
|
".Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml --whitelist Classes --coverage-php=.Build/coverage/unit.cov Tests/Unit"
|
2022-04-13 16:14:25 +02:00
|
|
|
],
|
2020-12-01 23:12:34 +01:00
|
|
|
"ci:dynamic": [
|
|
|
|
"@ci:tests"
|
|
|
|
],
|
2023-04-11 10:24:24 +02:00
|
|
|
"ci:json:lint": "find . ! -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
|
|
|
],
|
2021-11-17 16:45:49 +01:00
|
|
|
"ci:php:cs-fixer": "php-cs-fixer fix --config .php-cs-fixer.php -v --dry-run --using-cache no --diff",
|
2022-09-07 11:47:31 +02:00
|
|
|
"ci:php:lint": "find .*.php *.php Classes Configuration Tests -name '*.php' -print0 | xargs -r -0 -n 1 -P 4 php -l",
|
2021-08-24 02:42:02 +02:00
|
|
|
"ci:php:sniff": "phpcs Classes Configuration Tests",
|
2021-09-13 04:06:10 +02:00
|
|
|
"ci:php:stan": "phpstan --no-progress",
|
2020-12-01 23:12:34 +01:00
|
|
|
"ci:static": [
|
2021-04-05 17:26:00 +02:00
|
|
|
"@ci:composer:normalize",
|
|
|
|
"@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",
|
|
|
|
"@ci:ts:lint",
|
|
|
|
"@ci:yaml:lint"
|
2020-12-01 23:12:34 +01:00
|
|
|
],
|
2021-02-03 19:52:21 +01:00
|
|
|
"ci:tests": [
|
|
|
|
"@ci:tests:unit",
|
|
|
|
"@ci:tests:functional"
|
2020-12-01 23:12:34 +01:00
|
|
|
],
|
2023-04-11 10:24:24 +02:00
|
|
|
"ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml {}';",
|
|
|
|
"ci:tests:unit": ".Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml Tests/Unit",
|
2021-08-24 02:42:02 +02:00
|
|
|
"ci:ts:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
2023-04-11 10:24:24 +02:00
|
|
|
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' -regextype egrep -regex '.*.ya?ml$' | xargs -r php ./.Build/bin/yaml-lint",
|
2022-10-24 18:26:02 +02:00
|
|
|
"coverage:create-directories": "mkdir -p .Build/logs .Build/coverage",
|
2021-08-22 17:47:05 +02:00
|
|
|
"docs:generate": [
|
2023-08-02 10:46:30 +02:00
|
|
|
"@docs:generate:pullimage",
|
|
|
|
"docker run --rm ghcr.io/t3docs/render-documentation show-shell-commands > tempfile.sh; echo 'dockrun_t3rd makehtml' >> tempfile.sh; bash tempfile.sh; rm tempfile.sh"
|
|
|
|
],
|
|
|
|
"docs:generate:pullimage": [
|
|
|
|
"docker pull ghcr.io/t3docs/render-documentation",
|
|
|
|
"docker tag ghcr.io/t3docs/render-documentation t3docs/render-documentation"
|
2021-08-22 17:47:05 +02:00
|
|
|
],
|
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",
|
2021-08-24 02:42:02 +02:00
|
|
|
"fix:php:sniff": "phpcbf Classes Configuration Tests",
|
2021-02-03 19:52:21 +01:00
|
|
|
"link-extension": [
|
2023-04-11 10:24:24 +02:00
|
|
|
"@php -r 'is_dir($extFolder=__DIR__.\"/.Build/Web/typo3conf/ext/\") || mkdir($extFolder, 0777, true);'",
|
|
|
|
"@php -r 'file_exists($extFolder=__DIR__.\"/.Build/Web/typo3conf/ext/tea\") || symlink(__DIR__,$extFolder);'"
|
2021-02-22 16:59:15 +01:00
|
|
|
],
|
2023-04-11 10:24:24 +02:00
|
|
|
"phpstan:baseline": ".Build/bin/phpstan --generate-baseline=phpstan-baseline.neon",
|
2021-02-22 16:59:15 +01:00
|
|
|
"prepare-release": [
|
2021-07-08 02:08:36 +02:00
|
|
|
"rm .gitignore",
|
2021-02-22 16:59:15 +01:00
|
|
|
"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",
|
|
|
|
"rm .gitattributes",
|
2021-11-17 16:45:49 +01:00
|
|
|
"rm .php-cs-fixer.php",
|
2022-05-18 17:17:45 +02:00
|
|
|
"rm .eslintignore",
|
|
|
|
"rm .eslintrc.json",
|
|
|
|
"rm .prettierrc.js",
|
|
|
|
"rm package.json",
|
|
|
|
"rm stylelint.config.js",
|
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",
|
2021-02-22 16:59:15 +01:00
|
|
|
"rm phpcs.xml"
|
2020-12-01 23:12:34 +01:00
|
|
|
]
|
|
|
|
},
|
2021-08-24 02:27:27 +02:00
|
|
|
"scripts-descriptions": {
|
|
|
|
"ci": "Runs all dynamic and static code checks.",
|
|
|
|
"ci:composer:normalize": "Checks the composer.json.",
|
2023-02-22 18:46:08 +01:00
|
|
|
"ci:composer:psr-verify": "Verifies PSR-4 namespace correctness.",
|
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:dynamic": "Runs all PHPUnit tests (unit and functional).",
|
|
|
|
"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.",
|
|
|
|
"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).",
|
|
|
|
"ci:tests": "Runs all PHPUnit tests (unit and functional).",
|
|
|
|
"ci:tests:functional": "Runs the functional tests.",
|
|
|
|
"ci:tests:unit": "Runs the unit tests.",
|
|
|
|
"ci:ts:lint": "Lints the TypoScript files.",
|
|
|
|
"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
|
|
|
}
|