Skip to content

Commit 42861e9

Browse files
Update CONTRIBUTING.md
Signed-off-by: Marijn van Wezel <[email protected]>
1 parent 63af716 commit 42861e9

File tree

1 file changed

+71
-3
lines changed

1 file changed

+71
-3
lines changed

.github/CONTRIBUTING.md

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,77 @@ In your bug report, you should provide the following:
2424
* What you expected would happen
2525
* What actually happens
2626
* Steps to reproduce
27-
** Be specific!
28-
** Give sample code if possible.
29-
** Include the version of PHP and php-cypher-dsl.
27+
* Be specific!
28+
* Give sample code if possible.
29+
* Include the version of PHP and php-cypher-dsl.
3030

3131
You should only report bugs for versions of php-cypher-dsl that [are supported](https://github.com/neo4j-php/php-cypher-dsl/blob/main/LIFECYCLE.md). Please only report bugs if you are using a php-cypher-dsl with a [compatible version of PHP](https://github.com/neo4j-php/php-cypher-dsl/blob/main/LIFECYCLE.md).
3232

33+
## Proposing new features
34+
35+
Feel free to propose a new feature by [opening an issue for it](https://github.com/neo4j-php/php-cypher-dsl/issues/new?template=missing_feature_request.md).
36+
37+
## Workflow for pull requests
38+
39+
1. Fork the repository.
40+
1. Create a new branch.
41+
1. If you are **implementing new functionality**, create your branch from `development`.
42+
1. If you are **fixing a bug**, create your branch from the oldest branch that is [supported](https://github.com/neo4j-php/php-cypher-dsl/blob/main/LIFECYCLE.md).
43+
1. Implement your change and add tests for it.
44+
1. Make sure the test suite passes.
45+
1. Make sure that the code complies with the coding guidelines (see below).
46+
1. Submit your pull request!
47+
48+
Some things to keep in mind:
49+
50+
* Make sure that you have [configured a user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git.
51+
* Keep backwards compatibility breaks to a minimum.
52+
* You are encouraged to [sign your commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) with GPG.
53+
54+
## Branching model
55+
56+
The branching model used by this project is [gitflow](https://nvie.com/posts/a-successful-git-branching-model/), with the following changes/additions:
57+
58+
1. Feature branches must follow the naming convention `feature/*`.
59+
1. The name of a feature branch should reflect the feature added (e.g. `feature/match-support` instead of `feature/feature-1`).
60+
1. Release branches must follow the naming convention `release/x.y`.
61+
1. Hotfix branches must follow the naming convention `hotfix/x.y.z`.
62+
1. Hotfix branches must branch off from the oldest branch that is [supported](https://github.com/neo4j-php/php-cypher-dsl/blob/main/LIFECYCLE.md).
63+
1. Right before a new **major** version is released, a *support* branch is created from `main`.
64+
1. Support branches must follow the naming convention `support/x.y`, where `x.y` is the most recent minor release.
65+
66+
## Coding guidelines
67+
68+
This project comes with a [configuration file](https://github.com/neo4j-php/php-cypher-dsl/blob/main/.php-cs-fixer.dist.php) for php-cs-fixer that you can use to format your code:
69+
70+
```
71+
$ php vendor/bin/php-cs-fixer fix --config .php-cs-fixer.dist.php
72+
```
73+
74+
This project uses PHPStan for static analysis, which you can use to perform static analysis:
75+
76+
```
77+
$ php vendor/bin/phpstan
78+
```
79+
80+
After making your changes and adding your tests, you can check whether the minimum coverage and minimum mutation score indicator requirements are still met:
81+
82+
```
83+
$ XDEBUG_MODE=coverage php vendor/bin/phpunit --testsuite unit
84+
$ php vendor/bin/coverage-check coverage/clover.xml 90
85+
$ XDEBUG_MODE=coverage php vendor/bin/infection --min-msi=80
86+
```
87+
88+
## Running test suites
89+
90+
To run all unit tests, use the following command:
91+
92+
```
93+
$ php vendor/bin/phpunit --testsuite unit --no-coverage
94+
```
95+
96+
To run all end-to-end tests, use the following command:
97+
98+
```
99+
$ php vendor/bin/phpunit --testsuite end-to-end --no-coverage
100+
```

0 commit comments

Comments
 (0)