If your contribution requires significant or breaking changes, or if you plan to propose a major new feature, we recommend you to create an issue on the GitHub with a brief proposal and discuss it with us first.
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
. - Add an entry to the Changelog's Unreleases section.
- Send a pull request.
First, copy the URL of your fork and git clone
it to your local machine.
cd graphql-php
composer install
./vendor/bin/phpunit
Some tests have annotation @see it('<description>')
. It is used for reference to same tests in graphql-js implementation with the same description.
The coding standard of this project is based on Doctrine CS.
Run the inspections:
./vendor/bin/phpcs
Apply automatic code style fixes:
./vendor/bin/phpcbf
Based on PHPStan.
./vendor/bin/phpstan analyse --ansi --memory-limit 256M
Benchmarks are run via PHPBench.
./vendor/bin/phpbench run .