Skip to content

Commit c7eb1c1

Browse files
authored
[TASK] Improve the Composer script naming (#1388)
The scripts for checking things are not CI-specific. So rename their shared prefix from `ci:` to `check:`.
1 parent 92432ab commit c7eb1c1

File tree

4 files changed

+38
-38
lines changed

4 files changed

+38
-38
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
composer show;
4848
4949
- name: PHP Lint
50-
run: composer ci:php:lint
50+
run: composer check:php:lint
5151

5252
unit-tests:
5353
name: Unit tests
@@ -145,4 +145,4 @@ jobs:
145145
phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E
146146
147147
- name: Run Command
148-
run: composer ci:${{ matrix.command }}
148+
run: composer check:${{ matrix.command }}

.github/workflows/codecoverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
composer show;
5353
5454
- name: Run Tests
55-
run: composer ci:tests:coverage
55+
run: composer check:tests:coverage
5656

5757
- name: Show generated coverage files
5858
run: ls -lah

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ code coverage of the fixed bugs and the new features.
8080
To run the existing PHPUnit tests, run this command:
8181

8282
```bash
83-
composer ci:tests:unit
83+
composer check:tests:unit
8484
```
8585

8686
## Coding Style
@@ -94,7 +94,7 @@ We will only merge pull requests that follow the project's coding style.
9494
Please check your code with the provided static code analysis tools:
9595

9696
```bash
97-
composer ci:static
97+
composer check:static
9898
```
9999

100100
Please make your code clean, well-readable and easy to understand.

composer.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,31 @@
6767
}
6868
},
6969
"scripts": {
70-
"ci": [
71-
"@ci:static",
72-
"@ci:dynamic"
70+
"check": [
71+
"@check:static",
72+
"@check:dynamic"
7373
],
74-
"ci:composer:normalize": "\"./.phive/composer-normalize\" --dry-run",
75-
"ci:dynamic": [
76-
"@ci:tests"
74+
"check:composer:normalize": "\"./.phive/composer-normalize\" --dry-run",
75+
"check:dynamic": [
76+
"@check:tests"
7777
],
78-
"ci:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots --diff bin src tests config",
79-
"ci:php:lint": "parallel-lint src tests config bin",
80-
"ci:php:rector": "rector --no-progress-bar --dry-run --config=config/rector.php",
81-
"ci:php:stan": "phpstan --no-progress --configuration=config/phpstan.neon",
82-
"ci:static": [
83-
"@ci:composer:normalize",
84-
"@ci:php:fixer",
85-
"@ci:php:lint",
86-
"@ci:php:rector",
87-
"@ci:php:stan"
78+
"check:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots --diff bin src tests config",
79+
"check:php:lint": "parallel-lint src tests config bin",
80+
"check:php:rector": "rector --no-progress-bar --dry-run --config=config/rector.php",
81+
"check:php:stan": "phpstan --no-progress --configuration=config/phpstan.neon",
82+
"check:static": [
83+
"@check:composer:normalize",
84+
"@check:php:fixer",
85+
"@check:php:lint",
86+
"@check:php:rector",
87+
"@check:php:stan"
8888
],
89-
"ci:tests": [
90-
"@ci:tests:unit"
89+
"check:tests": [
90+
"@check:tests:unit"
9191
],
92-
"ci:tests:coverage": "phpunit --do-not-cache-result --coverage-clover=coverage.xml",
93-
"ci:tests:sof": "phpunit --stop-on-failure --do-not-cache-result",
94-
"ci:tests:unit": "phpunit --do-not-cache-result",
92+
"check:tests:coverage": "phpunit --do-not-cache-result --coverage-clover=coverage.xml",
93+
"check:tests:sof": "phpunit --stop-on-failure --do-not-cache-result",
94+
"check:tests:unit": "phpunit --do-not-cache-result",
9595
"fix": [
9696
"@fix:php"
9797
],
@@ -106,18 +106,18 @@
106106
"phpstan:baseline": "phpstan --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon --allow-empty-baseline"
107107
},
108108
"scripts-descriptions": {
109-
"ci": "Runs all dynamic and static code checks.",
110-
"ci:composer:normalize": "Checks the formatting and structure of the composer.json.",
111-
"ci:dynamic": "Runs all dynamic code checks (i.e., currently, the unit tests).",
112-
"ci:php:fixer": "Checks the code style with PHP CS Fixer.",
113-
"ci:php:lint": "Checks the syntax of the PHP code.",
114-
"ci:php:rector": "Checks the code for possible code updates and refactoring.",
115-
"ci:php:stan": "Checks the types with PHPStan.",
116-
"ci:static": "Runs all static code analysis checks for the code.",
117-
"ci:tests": "Runs all dynamic tests (i.e., currently, the unit tests).",
118-
"ci:tests:coverage": "Runs the unit tests with code coverage.",
119-
"ci:tests:sof": "Runs the unit tests and stops at the first failure.",
120-
"ci:tests:unit": "Runs all unit tests.",
109+
"check": "Runs all dynamic and static code checks.",
110+
"check:composer:normalize": "Checks the formatting and structure of the composer.json.",
111+
"check:dynamic": "Runs all dynamic code checks (i.e., currently, the unit tests).",
112+
"check:php:fixer": "Checks the code style with PHP CS Fixer.",
113+
"check:php:lint": "Checks the syntax of the PHP code.",
114+
"check:php:rector": "Checks the code for possible code updates and refactoring.",
115+
"check:php:stan": "Checks the types with PHPStan.",
116+
"check:static": "Runs all static code analysis checks for the code.",
117+
"check:tests": "Runs all dynamic tests (i.e., currently, the unit tests).",
118+
"check:tests:coverage": "Runs the unit tests with code coverage.",
119+
"check:tests:sof": "Runs the unit tests and stops at the first failure.",
120+
"check:tests:unit": "Runs all unit tests.",
121121
"fix": "Runs all fixers",
122122
"fix:composer:normalize": "Reformats and sorts the composer.json file.",
123123
"fix:php": "Autofixes all autofixable issues in the PHP code.",

0 commit comments

Comments
 (0)