From 2e3dd46d42ba9c9953e1df55ed64860c3341decc Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 29 Aug 2022 10:32:27 +0900 Subject: [PATCH 1/3] chore: add `rector process --dry-run` to `composer analyze` --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3080b701539b..ec04c8a0b02d 100644 --- a/composer.json +++ b/composer.json @@ -70,7 +70,10 @@ "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" + ], "test": "phpunit", "cs": [ "php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php", From cb60d9394f8a5a8ff9bce8ad25461e15f2f8dd81 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 29 Aug 2022 10:32:49 +0900 Subject: [PATCH 2/3] chore: add composer script aliaes --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ec04c8a0b02d..01a5af11b1b6 100644 --- a/composer.json +++ b/composer.json @@ -74,6 +74,7 @@ "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", @@ -84,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", From a589af0d6164dcee628afbff45ffff859f57c8f1 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 29 Aug 2022 10:40:35 +0900 Subject: [PATCH 3/3] docs: update pull_request.md --- contributing/pull_request.md | 1 - 1 file changed, 1 deletion(-) 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.