diff --git a/composer.json b/composer.json index 3080b701539b..01a5af11b1b6 100644 --- a/composer.json +++ b/composer.json @@ -70,7 +70,11 @@ "CodeIgniter\\ComposerScripts::postUpdate", "bash -c \"if [ -f admin/setup.sh ]; then bash admin/setup.sh; fi\"" ], - "analyze": "phpstan analyse", + "analyze": [ + "phpstan analyze", + "rector process --dry-run" + ], + "sa": "@analyze", "test": "phpunit", "cs": [ "php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php", @@ -81,7 +85,8 @@ "php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.user-guide.php", "php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.no-header.php", "php-cs-fixer fix --ansi --verbose --diff" - ] + ], + "style": "@cs-fix" }, "scripts-descriptions": { "analyze": "Run static analysis", diff --git a/contributing/pull_request.md b/contributing/pull_request.md index ed6d0dfde9e6..f1e29304e305 100644 --- a/contributing/pull_request.md +++ b/contributing/pull_request.md @@ -252,7 +252,6 @@ The best way to contribute is to fork the CodeIgniter4 repository, and "clone" t - Commit messages are expected to be descriptive of why and what you changed specifically. Commit messages like "Fixes #1234" would be asked by the reviewer to be revised. [Atomic commit](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention) is recommended. See [Contribution Workflow](./workflow.md#commit-messages) for details. 9. If you have touched PHP code, run static analysis. - `> composer analyze` - - `> vendor/bin/rector process` 10. Run unit tests on the specific file you modified. If there are no existing tests yet, please create one. - `> vendor/bin/phpunit tests/system/path/to/file/you/modified` - Make sure the tests pass to have a higher chance of merging.