mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-12-27 00:46:11 +01:00
tea/composer.json

251 lines
8.9 KiB
JSON
Raw Normal View History

2017-04-24 17:46:03 +02:00
{
"name": "ttn/tea",
"description": "TYPO3 example extension for unit testing and best practices",
"license": "GPL-2.0-or-later",
"type": "typo3-cms-extension",
"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": "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"
}
],
"homepage": "https://extensions.typo3.org/extension/tea/",
"support": {
"issues": "https://github.com/TYPO3BestPractices/tea/issues",
"source": "https://github.com/TYPO3BestPractices/tea",
"docs": "https://docs.typo3.org/p/ttn/tea/main/en-us/"
},
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"psr/http-message": "^1.0.1",
"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"
},
"require-dev": {
"ergebnis/composer-normalize": "2.45.0",
"friendsofphp/php-cs-fixer": "3.65.0",
"helmich/typo3-typoscript-lint": "3.1.1",
"icanhazstring/composer-unused": "0.8.11",
"php-parallel-lint/php-parallel-lint": "1.4.0",
"phpmd/phpmd": "2.15.0",
"phpstan/extension-installer": "1.4.3",
"phpstan/phpstan": "1.12.9",
"phpstan/phpstan-phpunit": "1.4.0",
"phpstan/phpstan-strict-rules": "1.6.1",
"phpunit/phpunit": "9.6.20",
"saschaegerer/phpstan-typo3": "1.10.2",
"seld/jsonlint": "1.11.0",
"spaze/phpstan-disallowed-calls": "4.0.1",
"squizlabs/php_codesniffer": "3.11.2",
"ssch/typo3-rector": "2.12.0",
"ssch/typo3-rector-testing-framework": "2.0.1",
"symfony/console": "^5.4.44 || ^6.4.12 || ^7.1.5",
"symfony/translation": "^5.4.44 || ^6.4.12 || ^7.1.5",
"symfony/yaml": "^5.4.44 || ^6.4.12 || ^7.1.5",
"tomasvotruba/cognitive-complexity": "0.2.3",
"tomasvotruba/type-coverage": "1.0.0",
"typo3/cms-fluid-styled-content": "^11.5.4 || ^12.4.2",
"typo3/coding-standards": "0.6.1 || 0.8.0",
"typo3/testing-framework": "7.1.0",
"webmozart/assert": "^1.11.0"
},
"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/"
}
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true,
"sbuerk/typo3-cmscomposerinstallers-testingframework-bridge": true,
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true
},
"bin-dir": ".Build/bin",
"lock": false,
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"vendor-dir": ".Build/vendor"
},
"extra": {
"branch-alias": {
"dev-main": "4.0.x-dev"
},
"typo3/cms": {
"extension-key": "tea",
"web-dir": ".Build/public"
}
},
"scripts": {
"ci:composer:normalize": "@composer normalize --no-check-lock --dry-run",
"ci:composer:psr-verify": "@composer dumpautoload --optimize --strict-psr --no-plugins",
"ci:composer:unused": "composer-unused",
"ci:coverage": [
"@ci:coverage:unit",
"@ci:coverage:functional"
],
"ci:coverage:functional": [
"@ci:tests:create-directories",
"@coverage:create-directories",
"phpunit -c Build/phpunit/FunctionalTests.xml --whitelist Classes --coverage-php=build/coverage/functional.cov Tests/Functional"
],
"ci:coverage:merge": [
"@coverage:create-directories",
"@php tools/phpcov merge --clover=build/logs/clover.xml build/coverage/"
],
"ci:coverage:unit": [
"@coverage:create-directories",
"phpunit -c Build/phpunit/UnitTests.xml --whitelist Classes --coverage-php=build/coverage/unit.cov Tests/Unit"
],
"ci:json:lint": "find . ! -path '*/.cache/*' ! -path '*/.Build/*' ! -path '*/node_modules/*' -name '*.json' | xargs -r php .Build/bin/jsonlint -q",
"ci:php": [
"@ci:php:cs-fixer",
"@ci:php:lint",
"@ci:php:sniff",
"@ci:php:stan"
],
"ci:php:cs-fixer": "php-cs-fixer fix --config .php-cs-fixer.php -v --dry-run --diff",
"ci:php:lint": "parallel-lint .*.php *.php Classes Configuration Tests",
"ci:php:mess": "phpmd Classes text Build/phpmd/phpmd.xml",
"ci:php:rector": "rector --dry-run",
"ci:php:sniff": "phpcs --standard=Build/phpcs/phpcs.xml Classes Configuration Tests",
"ci:php:stan": "phpstan --no-progress -v",
"ci:static": [
"@ci:composer:normalize",
"@ci:composer:unused",
"@ci:json:lint",
"@ci:php:lint",
"@ci:php:rector",
"@ci:php:stan",
"@ci:php:cs-fixer",
"@ci:php:sniff",
"@ci:typoscript:lint",
"@ci:xliff:lint",
"@ci:yaml:lint"
],
"ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests",
"ci:tests:functional": [
"@ci:tests:create-directories",
"find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \\\"Running functional test suite {}\\\"; .Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml {}';"
],
"ci:tests:unit": "phpunit -c Build/phpunit/UnitTests.xml Tests/Unit",
"ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
"ci:xliff:lint": "php Build/xliff/xliff-lint lint:xliff Resources/Private/Language",
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint",
"coverage:create-directories": "mkdir -p build/coverage build/logs",
"docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation",
"fix": [
"@fix:composer:normalize",
"@fix:php"
],
"fix:composer:normalize": "@composer normalize --no-check-lock",
"fix:php": [
"@fix:php:rector",
"@fix:php:cs",
"@fix:php:sniff"
],
"fix:php:cs": "php-cs-fixer fix --config .php-cs-fixer.php",
"fix:php:rector": "rector",
"fix:php:sniff": "phpcbf --standard=Build/phpcs/phpcs.xml Classes Configuration Tests",
"phpstan:baseline": "phpstan --generate-baseline --allow-empty-baseline",
"prepare-release": [
"rm -rf .Build",
"rm -rf .ddev",
"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",
"rm -rf Tests",
"rm -rf tools",
"rm .editorconfig",
"rm .eslintignore",
"rm .eslintrc.json",
"rm .gitattributes",
"rm .gitignore",
"rm .npmrc",
"rm .nvmrc",
"rm .php-cs-fixer.php",
"rm .prettierrc.js",
"rm package-lock.json",
"rm package.json",
"rm phive.xml",
"rm phpstan-baseline.neon",
"rm phpstan.neon",
"rm rector.php",
"rm stylelint.config.js"
]
},
"scripts-descriptions": {
"ci:composer:normalize": "Checks the composer.json.",
"ci:composer:psr-verify": "Verifies PSR-4 namespace correctness.",
"ci:composer:unused": "Finds unused Composer packages required in composer.json.",
"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.",
"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:mess": "Runs PHP mess detection.",
"ci:php:rector": "Checks for code for changes by Rector.",
"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:create-directories": "Creates the directories required to smoothely run the functional tests.",
"ci:tests:functional": "Runs the functional tests.",
"ci:tests:unit": "Runs the unit tests.",
"ci:typoscript:lint": "Lints the TypoScript files.",
"ci:xliff:lint": "Lints the XLIFF files.",
"ci:yaml:lint": "Lints the YAML files.",
"coverage:create-directories": "Creates the directories needed for recording and merging the code coverage reports.",
"docs:generate": "Renders the extension ReST documentation.",
"fix": "Runs all automatic code style fixes.",
"fix:composer:normalize": "Normalizes composer.json file content.",
"fix:php": "Runs all fixers for the PHP code.",
"fix:php:cs": "Fixes the code style with PHP-CS-Fixer.",
"fix:php:rector": "Updates the code with Rector.",
"fix:php:sniff": "Fixes the code style with PHP_CodeSniffer.",
"phpstan:baseline": "Updates the PHPStan baseline file to match the code.",
"prepare-release": "Removes development-only files in preparation of a TER release."
}
2017-04-24 17:46:03 +02:00
}