More composer scripts + related changes to CONTRIBUTING.md

This commit is contained in:
Vladimir Razuvaev 2018-11-22 19:57:53 +07:00
parent 9cb6b4e6f3
commit 89fa0c3e67
2 changed files with 20 additions and 2 deletions

View File

@ -11,6 +11,7 @@ For smaller contributions just use this workflow:
* Fork the project.
* Add your features and or bug fixes.
* Add tests. Tests are important for us.
* Check your changes using `composer check-all`
* Send a pull request
## Using GraphQL PHP from a Git checkout
@ -34,10 +35,22 @@ Coding standard of this project is based on [Doctrine CS](https://github.com/doc
./vendor/bin/phpcs
```
Auto-fixing:
```sh
./vendor/bin/phpcbf
```
## Static analysis
Based on [PHPStan](https://github.com/phpstan/phpstan)
```sh
./vendor/bin/phpstan analyse --ansi --memory-limit 256M
```
## Running benchmarks
Benchmarks are run via phpbench:
```sh
./vendor/bin/phpbench run
./vendor/bin/phpbench run .
```

View File

@ -44,7 +44,12 @@
"psr/http-message": "To use standard GraphQL server"
},
"scripts": {
"api-docs": "php tools/gendocs.php",
"bench": "phpbench run .",
"test": "phpunit",
"lint" : "phpcs",
"static-analysis": "phpstan analyse --ansi"
"fix-style" : "phpcbf",
"static-analysis": "phpstan analyse --ansi --memory-limit 256M",
"check-all": "composer lint && composer static-analysis && composer test"
}
}