mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-10 00:36:13 +01:00
eb909406fe
The following are changed: - web-dir: ".Build/public" => ".Build/Web" - bin-dir: not specified, defaulted to .Build/vendor/bin => ".Build/bin" The vendor-dir was alreaday ".Build/vendor" and is left unchanged. Since the above paths may be used in scripts, composer.json, build pipelines, configuration etc. it facilitates contribution across various extensions (and the core) if the same defaults are used. The goal of patches related to #802 is to unify the paths across TYPO3 extensions, specifically focusing on the "official" extensions (such as tea, Documentation examples extension etc.). - .Build has already been well established (and is used by "tea" as well. - web-dir (".Build/Web") is currently not used consistently (across official extensions). Either ".Build/public", ".Build/Web" or ".Build/web" or "public" is used. We use ".Build/Web" now as that is already well established in "styleguide" and other extensions. (This choice is not better than the other, but is more commonly used and has led to a consensus in preliminary decision making process.) - bin-dir: Here ".Build/bin" is mostly used (if defined at all) - vendor-dir: Here ".Build/vendor" is mostly used (if defined at all) Related: #802
221 lines
7.8 KiB
JSON
221 lines
7.8 KiB
JSON
{
|
|
"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": "developer"
|
|
}
|
|
],
|
|
"homepage": "https://extensions.typo3.org/extension/tea/",
|
|
"support": {
|
|
"issues": "https://github.com/TYPO3-Documentation/tea/issues",
|
|
"source": "https://github.com/TYPO3-Documentation/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",
|
|
"psr/http-message": "^1.0.1",
|
|
"typo3/cms-core": "^11.5.4 || ^12.3",
|
|
"typo3/cms-extbase": "^11.5.4 || ^12.3",
|
|
"typo3/cms-fluid": "^11.5.4 || ^12.3",
|
|
"typo3/cms-frontend": "^11.5.4 || ^12.3"
|
|
},
|
|
"require-dev": {
|
|
"doctrine/dbal": "^2.13.8 || ^3.3.7",
|
|
"ergebnis/composer-normalize": "^2.28.3",
|
|
"friendsofphp/php-cs-fixer": "^3.14.1",
|
|
"helmich/typo3-typoscript-lint": "^3.1.0",
|
|
"php-coveralls/php-coveralls": "^2.5.3",
|
|
"phpstan/extension-installer": "^1.2.0",
|
|
"phpstan/phpstan": "^1.10.11",
|
|
"phpstan/phpstan-phpunit": "^1.3.11",
|
|
"phpstan/phpstan-strict-rules": "^1.5.1",
|
|
"phpunit/phpunit": "^9.6.6",
|
|
"saschaegerer/phpstan-typo3": "^1.8.3",
|
|
"sbuerk/typo3-cmscomposerinstallers-testingframework-bridge": "^0.1.2",
|
|
"seld/jsonlint": "^1.9.0",
|
|
"squizlabs/php_codesniffer": "^3.7.2",
|
|
"symfony/yaml": "^5.4 || ^6.1",
|
|
"typo3/cms-fluid-styled-content": "^11.5.4 || ^12.3",
|
|
"typo3/coding-standards": "^0.6.1",
|
|
"typo3/testing-framework": "^7.0@dev"
|
|
},
|
|
"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",
|
|
"preferred-install": {
|
|
"*": "dist"
|
|
},
|
|
"sort-packages": true,
|
|
"vendor-dir": ".Build/vendor"
|
|
},
|
|
"extra": {
|
|
"branch-alias": {
|
|
"dev-main": "3.0.x-dev"
|
|
},
|
|
"typo3/cms": {
|
|
"app-dir": ".Build",
|
|
"extension-key": "tea",
|
|
"web-dir": ".Build/Web"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"post-autoload-dump": [
|
|
"@link-extension"
|
|
],
|
|
"ci": [
|
|
"@ci:static"
|
|
],
|
|
"ci:composer:normalize": "@composer normalize --no-check-lock --dry-run",
|
|
"ci:composer:psr-verify": "@composer dumpautoload --optimize --strict-psr",
|
|
"ci:coverage": [
|
|
"@ci:coverage:unit",
|
|
"@ci:coverage:functional"
|
|
],
|
|
"ci:coverage:functional": [
|
|
"@coverage:create-directories",
|
|
".Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/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",
|
|
".Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml --whitelist Classes --coverage-php=.Build/coverage/unit.cov Tests/Unit"
|
|
],
|
|
"ci:dynamic": [
|
|
"@ci:tests"
|
|
],
|
|
"ci:json:lint": "find . ! -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 --using-cache no --diff",
|
|
"ci:php:lint": "find .*.php *.php Classes Configuration Tests -name '*.php' -print0 | xargs -r -0 -n 1 -P 4 php -l",
|
|
"ci:php:sniff": "phpcs Classes Configuration Tests",
|
|
"ci:php:stan": "phpstan --no-progress",
|
|
"ci:static": [
|
|
"@ci:composer:normalize",
|
|
"@ci:json:lint",
|
|
"@ci:php:cs-fixer",
|
|
"@ci:php:lint",
|
|
"@ci:php:sniff",
|
|
"@ci:php:stan",
|
|
"@ci:ts:lint",
|
|
"@ci:yaml:lint"
|
|
],
|
|
"ci:tests": [
|
|
"@ci:tests:unit",
|
|
"@ci:tests:functional"
|
|
],
|
|
"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",
|
|
"ci:ts:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
|
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' -regextype egrep -regex '.*.ya?ml$' | xargs -r php ./.Build/bin/yaml-lint",
|
|
"coverage:create-directories": "mkdir -p .Build/logs .Build/coverage",
|
|
"docs:generate": [
|
|
"docker run --rm t3docs/render-documentation show-shell-commands > tempfile.sh; echo 'dockrun_t3rd makehtml' >> tempfile.sh; bash tempfile.sh; rm tempfile.sh"
|
|
],
|
|
"fix:php": [
|
|
"@fix:php:cs",
|
|
"@fix:php:sniff"
|
|
],
|
|
"fix:php:cs": "php-cs-fixer fix --config .php-cs-fixer.php",
|
|
"fix:php:sniff": "phpcbf Classes Configuration Tests",
|
|
"link-extension": [
|
|
"@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);'"
|
|
],
|
|
"phpstan:baseline": ".Build/bin/phpstan --generate-baseline=phpstan-baseline.neon",
|
|
"prepare-release": [
|
|
"rm .gitignore",
|
|
"rm -rf .Build",
|
|
"rm -rf .ddev",
|
|
"rm -rf .github",
|
|
"rm -rf .gitlab",
|
|
"rm -rf Tests",
|
|
"rm -rf tools",
|
|
"rm .editorconfig",
|
|
"rm .gitattributes",
|
|
"rm .php-cs-fixer.php",
|
|
"rm .eslintignore",
|
|
"rm .eslintrc.json",
|
|
"rm .prettierrc.js",
|
|
"rm package.json",
|
|
"rm stylelint.config.js",
|
|
"rm phive.xml",
|
|
"rm phpstan-baseline.neon",
|
|
"rm phpstan.neon",
|
|
"rm phpcs.xml"
|
|
]
|
|
},
|
|
"scripts-descriptions": {
|
|
"ci": "Runs all dynamic and static code checks.",
|
|
"ci:composer:normalize": "Checks the composer.json.",
|
|
"ci:composer:psr-verify": "Verifies PSR-4 namespace correctness.",
|
|
"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: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.",
|
|
"coverage:create-directories": "Creates the directories needed for recording and merging the code coverage reports.",
|
|
"docs:generate": "Renders the extension ReST documentation.",
|
|
"fix:php": "Runs all fixers for the PHP code.",
|
|
"fix:php:cs": "Fixes the code style with PHP-CS-Fixer.",
|
|
"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."
|
|
}
|
|
}
|