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: .github/CONTRIBUTING.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,36 @@ Since Yii 3 consists of many packages, we have a [special development tool](http
16
16
17
17
3. Now you are ready. Fork any package listed in `packages.php` and do `./yii-dev install username/package`.
18
18
19
+
4. Create a new branch for your changes.
20
+
21
+
If you are only going to make a pull request in a single repository, simply create the new branch, where the name correctly identifies the fix or feature to be made.
22
+
23
+
if you are going to make a pull request in multiple repositories, create a **new branch with the same name in all repositories**, this allows our github actions workflow to sync all branches, and tests to run correctly.
24
+
25
+
5.[Check your changes](/docs/en/testing.md).
26
+
27
+
## Reporting issues
28
+
29
+
Please follow the guidelines below when creating an issue so that your issue can be more promptly resolved:
30
+
31
+
* Provide information including: the version of PHP, dbms and the type of operating system.
32
+
* Provide the **complete** error call stack if available. A screenshot to explain the issue is very welcome.
33
+
* Describe the steps for reproducing the issue. It would be even better if you could provide code to reproduce the issue.
34
+
* If possible you may even create a failing unit test and [send it as a pull request](#git-workflow).
35
+
36
+
If the issue is related to one of the dbms packages, please report it to the corresponding repository.
37
+
38
+
If you are unsure, [report it to the main repository](https://github.com/yiisoft/cache-db/issues/new) (<https://github.com/yiisoft/cache-db/issues>).
39
+
40
+
**Do not report an issue if**
41
+
42
+
* you are asking how to use some **Yii Cache Library** feature. You should use [the forum](https://forum.yiiframework.com/c/yii-3-0/63) or [telegram](https://t.me/yii3en) for this purpose.
43
+
* your issue is about security. Please [contact us directly](https://www.yiiframework.com/security/) to report security issues.
44
+
45
+
**Avoid duplicated issues**
46
+
47
+
Before you report an issue, please search through [existing issues](https://github.com/yiisoft/cache-db/issues) to see if your issue is already reported or fixed to make sure you are not reporting a duplicated issue.
48
+
19
49
If you don't have any particular package in mind to start with:
All our packages have github actions by default, so you can test your [contribution](https://github.com/yiisoft/cache-db/blob/master/.github/CONTRIBUTING.md) in the cloud.
14
+
15
+
> Note: We recommend pull requesting in draft mode until all tests pass.
16
+
17
+
## Docker images
18
+
19
+
For greater ease it is recommended to use Docker containers for each DBMS, for this you can use the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file that in the root directory of each package.
For running the Docker containers you can use the following command:
28
+
29
+
```shell
30
+
docker compose up -d
31
+
```
32
+
33
+
## Unit testing
34
+
35
+
The package is tested with [PHPUnit](https://phpunit.de/).
36
+
37
+
### Global testing
38
+
39
+
The following steps are required to run the tests.
40
+
41
+
1. Run all Docker containers for each dbms.
42
+
2. Install the dependencies of the project with composer.
43
+
3. Run the tests.
44
+
45
+
```shell
46
+
vendor/bin/phpunit
47
+
```
48
+
49
+
### Individual testing
50
+
51
+
The following steps are required to run the tests.
52
+
53
+
1. Run the Docker container for the dbms you want to test.
54
+
2. Install the dependencies of the project with composer.
55
+
3. Run the tests.
56
+
57
+
```shell
58
+
vendor/bin/phpunit --testsuite=Pgsql
59
+
```
60
+
61
+
Suites available:
62
+
- Mssql
63
+
- Mysql
64
+
- Oracle
65
+
- Pgsql
66
+
- Sqlite
67
+
68
+
## Composer require checker
69
+
70
+
This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all dependencies are correctly defined in `composer.json`.
71
+
72
+
To run the checker, execute the following command:
73
+
74
+
```shell
75
+
./vendor/bin/composer-require-checker
76
+
```
77
+
78
+
## Mutation testing
79
+
80
+
The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
81
+
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:
0 commit comments