Skip to content

Commit

Permalink
Merge pull request #7029 from rarila/composer-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Nov 30, 2021
2 parents 28c4f86 + 2ff739b commit b8e34ed
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
25 changes: 17 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,26 @@
"psalter"
],
"scripts": {
"all-tests": [
"phpcs",
"@php ./psalm --find-dead-code",
"phpunit"
],
"psalm": "@php ./psalm --find-dead-code",
"cs": "phpcs -p",
"cs-fix": "phpcbf -p",
"lint": "parallel-lint ./src ./tests",
"phpunit": "paratest --runner=WrapperRunner",
"phpunit-std": "phpunit",
"psalm": "@php ./psalm --find-dead-code",
"tests": [
"phpcs",
"phpunit"
"@lint",
"@cs",
"@psalm",
"@phpunit"
]
},
"scripts-descriptions": {
"cs": "Checks that the code conforms to the coding standard.",
"cs-fix": "Automatically correct coding standard violations.",
"lint": "Runs unit tests.",
"phpunit": "Runs unit tests in parallel.",
"phpunit-std": "Runs unit tests.",
"psalm": "Runs static analysis.",
"tests": "Runs all available tests."
}
}
6 changes: 1 addition & 5 deletions docs/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ Lastly, working to improve static analysis tools will also make you a better PHP

Before you send a pull request, make sure you follow these guidelines:

Run integration checks locally:

- `composer cs` - checks the code is properly linted
- `vendor/bin/paratest` - runs PHPUnit tests in parallel
- `./psalm` - runs Psalm on itself
Run integration checks locally: `composer tests`

If you're adding new features or fixing bugs, don’t forget to add tests!

0 comments on commit b8e34ed

Please sign in to comment.