|
2 | 2 |
|
3 | 3 | ## Contributions |
4 | 4 |
|
5 | | -We expect all contributions to |
6 | | -- conform to our [style guide](./styleguide.md), |
7 | | -- be commented (inside the PHP source files), |
8 | | -- be documented (in the [user guide](https://codeigniter4.github.io/userguide/)), |
9 | | -- and unit tested (in the [test folder](https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests)). |
| 5 | +We expect the following in all Pull Requests (PRs). |
| 6 | +- PRs must be sent to the [appropriate branch](#branching) |
| 7 | +- All git commits must be [GPG-signed](#signing) |
| 8 | +- Must follow our [style guide](#php-style) |
| 9 | +- Be [commented](#comments) in the PHP source file |
| 10 | +- Be documented in the [user guide](#user-guide) |
| 11 | +- Be [unit tested](#unit-testing) |
| 12 | +- Pass all checks in GitHub Actions |
10 | 13 |
|
11 | 14 | > [!IMPORTANT] |
12 | 15 | > We expect all code changes or bug-fixes to be accompanied by one or more tests |
13 | 16 | > added to our test suite to prove the code works. |
14 | 17 |
|
15 | | -If pull requests are not accompanied by relevant tests, they will likely be closed. |
| 18 | +If pull requests do not comply with the above, they will likely be closed. |
16 | 19 | Since we are a team of volunteers, we don't have any more time to work on the |
17 | 20 | framework than you do. Please make it as painless for your contributions to be |
18 | 21 | included as possible. |
19 | 22 |
|
20 | | -If you need help with getting tests running on your local machines, ask for help |
21 | | -on the [forum](https://forum.codeigniter.com/forumdisplay.php?fid=27). We would |
22 | | -be happy to help out. |
23 | | - |
24 | 23 | The [Open Source Guide](https://opensource.guide/) is a good first read for those |
25 | 24 | new to contributing to open source! |
26 | 25 |
|
@@ -67,13 +66,18 @@ composer cs |
67 | 66 |
|
68 | 67 | If you are not familiar with Unit Testing, see |
69 | 68 | [the forum thread](https://forum.codeigniter.com/showthread.php?tid=81830). |
| 69 | +If you need help with getting tests running on your local machines, ask for help |
| 70 | +on the [forum](https://forum.codeigniter.com/forumdisplay.php?fid=27). We would |
| 71 | +be happy to help out. |
70 | 72 |
|
71 | 73 | Unit testing is expected for all CodeIgniter components. We use PHPUnit, |
72 | 74 | and run unit tests using GitHub Actions for each PR submitted or changed. |
73 | 75 |
|
74 | | -In the CodeIgniter project, there is a `tests` folder, with a structure |
| 76 | +In the CodeIgniter project, there is a [tests][tests-folder] folder, with a structure |
75 | 77 | that parallels that of `system`. |
76 | 78 |
|
| 79 | +[tests-folder]: https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests |
| 80 | + |
77 | 81 | The normal practice would be to have a unit test class for each of the |
78 | 82 | classes in `system`, named appropriately. For instance, the `BananaTest` |
79 | 83 | class would test the `Banana` class. There will be occasions when it is |
@@ -199,7 +203,7 @@ working on your contribution. |
199 | 203 | All bug fixes should be sent to the __"develop"__ branch, this is where the next |
200 | 204 | bug fix version will be developed. |
201 | 205 |
|
202 | | -PRs with any enhancement should be sent to next minor version branch, e.g. __"4.5"__ |
| 206 | +PRs with any enhancement should be sent to next minor version branch, e.g. __"4.6"__ |
203 | 207 |
|
204 | 208 | The __"master"__ branch will always contain the latest stable version and is kept |
205 | 209 | clean so a "hotfix" (e.g. an emergency security patch) can be applied to the |
@@ -300,7 +304,7 @@ GitHub means "making a copy of that repo to your account" and "cloning" means |
300 | 304 | - If your PR is for bug fixes: |
301 | 305 | - `> git switch develop` |
302 | 306 | - `> git switch -c <new-branch-name>` |
303 | | - - If your PR has any enhancement, create new branch from next minor version branch, e.g. __"4.5"__: |
| 307 | + - If your PR has any enhancement, create new branch from next minor version branch, e.g. __"4.6"__: |
304 | 308 | - `> git switch <next-minor-version-branch>` |
305 | 309 | - `> git switch -c <new-branch-name>` |
306 | 310 | 7. Fix existing bugs on the [Issue tracker](https://github.com/codeigniter4/CodeIgniter4/issues) after confirming that no one |
|
0 commit comments