You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+27-2Lines changed: 27 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,31 @@ Before submitting a pull request:
36
36
- Check the codebase to ensure that your feature doesn't already exist.
37
37
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38
38
39
+
## Run Tests
40
+
41
+
The full test suite requires PHP cli with mongodb extension, a running MongoDB server and a running MySQL server.
42
+
Duplicate the `phpunit.xml.dist` file to `phpunit.xml` and edit the environment variables to match your setup.
43
+
44
+
```bash
45
+
$ docker-compose up -d mongodb mysql
46
+
$ docker-compose run tests
47
+
```
48
+
49
+
Docker can be slow to start. You can run the command `php vendor/bin/phpunit --testdox` locally or in a docker container.
50
+
51
+
```bash
52
+
$ docker-compose run -it tests bash
53
+
# Inside the container
54
+
$ composer install
55
+
$ vendor/bin/phpunit --testdox
56
+
```
57
+
58
+
For fixing style issues, you can run the PHP Code Beautifier and Fixer:
59
+
60
+
```bash
61
+
$ php vendor/bin/phpcbf
62
+
```
63
+
39
64
## Requirements
40
65
41
66
If the project maintainer has any additional requirements, you will find them listed here.
@@ -44,12 +69,12 @@ If the project maintainer has any additional requirements, you will find them li
44
69
45
70
-**Add tests!** - Your patch won't be accepted if it doesn't have tests.
46
71
47
-
-**Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
72
+
-**Document any change in behaviour** - Make sure the documentations are kept up-to-date.
48
73
49
74
-**Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50
75
51
76
-**One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52
77
53
78
-**Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
0 commit comments