mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-22 04:16:13 +01:00

[FEATURE] Add Composer scripts and a CI job for Rector

Closes #851
This commit is contained in:
Oliver Klee 2024-09-17 13:21:10 +02:00
parent ef1e39b20d
commit 68892be32e
2 changed files with 7 additions and 0 deletions

View file

@ -83,6 +83,7 @@ jobs:
- "json:lint" - "json:lint"
- "php:cs-fixer" - "php:cs-fixer"
- "php:mess" - "php:mess"
- "php:rector"
- "php:sniff" - "php:sniff"
- "php:stan" - "php:stan"
- "typoscript:lint" - "typoscript:lint"

View file

@ -147,6 +147,7 @@
"ci:php:cs-fixer": "php-cs-fixer fix --config .php-cs-fixer.php -v --dry-run --diff", "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:lint": "parallel-lint .*.php *.php Classes Configuration Tests",
"ci:php:mess": "phpmd Classes text Build/phpmd/phpmd.xml", "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:sniff": "phpcs --standard=Build/phpcs/phpcs.xml Classes Configuration Tests",
"ci:php:stan": "phpstan --no-progress -v", "ci:php:stan": "phpstan --no-progress -v",
"ci:static": [ "ci:static": [
@ -155,6 +156,7 @@
"@ci:json:lint", "@ci:json:lint",
"@ci:php:cs-fixer", "@ci:php:cs-fixer",
"@ci:php:lint", "@ci:php:lint",
"@ci:php:rector",
"@ci:php:sniff", "@ci:php:sniff",
"@ci:php:stan", "@ci:php:stan",
"@ci:typoscript:lint", "@ci:typoscript:lint",
@ -174,10 +176,12 @@
"docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation", "docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation",
"fix:composer:normalize": "@composer normalize --no-check-lock", "fix:composer:normalize": "@composer normalize --no-check-lock",
"fix:php": [ "fix:php": [
"@fix:php:rector",
"@fix:php:cs", "@fix:php:cs",
"@fix:php:sniff" "@fix:php:sniff"
], ],
"fix:php:cs": "php-cs-fixer fix --config .php-cs-fixer.php", "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", "fix:php:sniff": "phpcbf --standard=Build/phpcs/phpcs.xml Classes Configuration Tests",
"phpstan:baseline": "phpstan --generate-baseline --allow-empty-baseline", "phpstan:baseline": "phpstan --generate-baseline --allow-empty-baseline",
"prepare-release": [ "prepare-release": [
@ -218,6 +222,7 @@
"ci:php:cs-fixer": "Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer).", "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:lint": "Lints the PHP files for syntax errors.",
"ci:php:mess": "Runs PHP mess detection.", "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:sniff": "Checks the code style with PHP_CodeSniffer (PHPCS).",
"ci:php:stan": "Checks the PHP types using PHPStan.", "ci:php:stan": "Checks the PHP types using PHPStan.",
"ci:static": "Runs all static code checks (syntax, style, types).", "ci:static": "Runs all static code checks (syntax, style, types).",
@ -232,6 +237,7 @@
"fix:composer:normalize": "Normalizes composer.json file content.", "fix:composer:normalize": "Normalizes composer.json file content.",
"fix:php": "Runs all fixers for the PHP code.", "fix:php": "Runs all fixers for the PHP code.",
"fix:php:cs": "Fixes the code style with PHP-CS-Fixer.", "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.", "fix:php:sniff": "Fixes the code style with PHP_CodeSniffer.",
"phpstan:baseline": "Updates the PHPStan baseline file to match the code.", "phpstan:baseline": "Updates the PHPStan baseline file to match the code.",
"prepare-release": "Removes development-only files in preparation of a TER release." "prepare-release": "Removes development-only files in preparation of a TER release."