docs: update contributing/pull_request.md

This commit is contained in:
kenjis 2024-05-05 11:18:07 +09:00
parent c23bc4c9e2
commit 20e8388f67
No known key found for this signature in database
GPG Key ID: BD254878922AF198

View File

@ -2,25 +2,23 @@
## Contributions
We expect all contributions to
- conform to our [style guide](./styleguide.md),
- be commented (inside the PHP source files),
- be documented (in the [user guide](https://codeigniter4.github.io/userguide/)),
- and unit tested (in the [test folder](https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests)).
We expect the following in all pull requests.
- All git commits are [GPG-signed](#signing)
- Must follow our [style guide](#php-style)
- Be [commented](#comments) in the PHP source file
- Be documented in the [user guide](#user-guide)
- Be [unit tested](#unit-testing)
- Pass all checks in GitHub Actions
> [!IMPORTANT]
> We expect all code changes or bug-fixes to be accompanied by one or more tests
> added to our test suite to prove the code works.
If pull requests are not accompanied by relevant tests, they will likely be closed.
If pull requests do not comply with the above, they will likely be closed.
Since we are a team of volunteers, we don't have any more time to work on the
framework than you do. Please make it as painless for your contributions to be
included as possible.
If you need help with getting tests running on your local machines, ask for help
on the [forum](https://forum.codeigniter.com/forumdisplay.php?fid=27). We would
be happy to help out.
The [Open Source Guide](https://opensource.guide/) is a good first read for those
new to contributing to open source!
@ -67,13 +65,18 @@ composer cs
If you are not familiar with Unit Testing, see
[the forum thread](https://forum.codeigniter.com/showthread.php?tid=81830).
If you need help with getting tests running on your local machines, ask for help
on the [forum](https://forum.codeigniter.com/forumdisplay.php?fid=27). We would
be happy to help out.
Unit testing is expected for all CodeIgniter components. We use PHPUnit,
and run unit tests using GitHub Actions for each PR submitted or changed.
In the CodeIgniter project, there is a `tests` folder, with a structure
In the CodeIgniter project, there is a [tests][tests-folder] folder, with a structure
that parallels that of `system`.
[tests-folder]: https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests
The normal practice would be to have a unit test class for each of the
classes in `system`, named appropriately. For instance, the `BananaTest`
class would test the `Banana` class. There will be occasions when it is