Skip to content

Commit

Permalink
Update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
Signed-off-by: Marijn van Wezel <96489967+marijnvanwezel@users.noreply.github.com>
  • Loading branch information
marijnvanwezel authored Jan 30, 2023
1 parent 42861e9 commit 41384e4
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to php-cypher-dsl

Welcome! We look forward to your contributions. This document outlines the guidelines for contributing to php-cypher-dsl. Keep in mind that these are just suggestions, and shouldn't hold you back from making improvements to php-cypher-dsl. Don't be afraid to ignore the rules.
Welcome! We look forward to your contributions. This document outlines the guidelines for contributing to php-cypher-dsl. Keep in mind that these guidelines are mostly just suggestions, and shouldn't hold you back from improving php-cypher-dsl. Don't be afraid to ignore them.

Below are some examples on how you can contribute:

Expand All @@ -21,11 +21,10 @@ When submitting code or changes, your submissions will automatically be licensed
In your bug report, you should provide the following:

* A short summary of the bug
* What you expected would happen
* What you expect would happen
* What actually happens
* Steps to reproduce
* Be specific!
* Give sample code if possible.
* Be specific! Give sample code if possible.
* Include the version of PHP and php-cypher-dsl.

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).
Expand All @@ -39,7 +38,7 @@ Feel free to propose a new feature by [opening an issue for it](https://github.c
1. Fork the repository.
1. Create a new branch.
1. If you are **implementing new functionality**, create your branch from `development`.
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).
1. If you are **fixing a bug**, create your branch from the oldest [supported](https://github.com/neo4j-php/php-cypher-dsl/blob/main/LIFECYCLE.md) branch that is affected by the bug.
1. Implement your change and add tests for it.
1. Make sure the test suite passes.
1. Make sure that the code complies with the coding guidelines (see below).
Expand All @@ -56,22 +55,22 @@ Some things to keep in mind:
The branching model used by this project is [gitflow](https://nvie.com/posts/a-successful-git-branching-model/), with the following changes/additions:

1. Feature branches must follow the naming convention `feature/*`.
1. The name of a feature branch should reflect the feature added (e.g. `feature/match-support` instead of `feature/feature-1`).
1. Release branches must follow the naming convention `release/x.y`.
1. Hotfix branches must follow the naming convention `hotfix/x.y.z`.
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).
1. The name of a feature branch should reflect the feature added (e.g. `feature/support-indexing-operator` instead of `feature/feature-1`).
1. Release branches must follow the naming convention `release/x.y`, where `x` and `y` are the major and minor version of the release respectively. A release branch should never be made for a patch.
1. Hotfix branches must follow the naming convention `hotfix/x.y.z`, where `x`, `y` and `z` are the major, minor and patch version of the hot respectively.
1. Hotfix branches must branch off from the oldest [supported](https://github.com/neo4j-php/php-cypher-dsl/blob/main/LIFECYCLE.md) branch that is affected by the bug.
1. Right before a new **major** version is released, a *support* branch is created from `main`.
1. Support branches must follow the naming convention `support/x.y`, where `x.y` is the most recent minor release.
1. Support branches must follow the naming convention `support/x.y`, where `x` and `y` are the major and minor version of the most recent release respectively.

## Coding guidelines

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:
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:

```
$ php vendor/bin/php-cs-fixer fix --config .php-cs-fixer.dist.php
```

This project uses PHPStan for static analysis, which you can use to perform static analysis:
This project uses PHPStan for static analysis:

```
$ php vendor/bin/phpstan
Expand All @@ -87,13 +86,19 @@ $ XDEBUG_MODE=coverage php vendor/bin/infection --min-msi=80

## Running test suites

To run all unit tests, use the following command:
To run all tests, use:

```
$ php vendor/bin/phpunit --no-coverage
```

To only run *unit* tests, use:

```
$ php vendor/bin/phpunit --testsuite unit --no-coverage
```

To run all end-to-end tests, use the following command:
To only run *end-to-end* tests, use:

```
$ php vendor/bin/phpunit --testsuite end-to-end --no-coverage
Expand Down

0 comments on commit 41384e4

Please sign in to comment.