Skip to content

Commit 4dbc4d0

Browse files
committed
docs: break long lines
1 parent 35a1dd8 commit 4dbc4d0

2 files changed

Lines changed: 101 additions & 62 deletions

File tree

contributing/pull_request.md

Lines changed: 73 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ We expect all contributions to
1313
> added to our test suite to prove the code works.
1414
1515
If pull requests are not accompanied by relevant tests, they will likely be closed.
16-
Since we are a team of volunteers, we don't have any more time to work on the framework than you do. Please
17-
make it as painless for your contributions to be included as possible.
16+
Since we are a team of volunteers, we don't have any more time to work on the
17+
framework than you do. Please make it as painless for your contributions to be
18+
included as possible.
1819

1920
If you need help with getting tests running on your local machines, ask for help
2021
on the [forum](https://forum.codeigniter.com/forumdisplay.php?fid=27). We would
2122
be happy to help out.
2223

23-
The [Open Source Guide](https://opensource.guide/) is a good first read for those new to contributing to open source!
24+
The [Open Source Guide](https://opensource.guide/) is a good first read for those
25+
new to contributing to open source!
2426

2527
## CodeIgniter Internals Overview
2628

@@ -35,7 +37,8 @@ Your Pull Requests (PRs) need to meet our guidelines.
3537

3638
If your Pull Requests fail to pass these guidelines, they will be declined,
3739
and you will need to re-submit when you've made the changes.
38-
This might sound a bit tough, but it is required for us to maintain the quality of the codebase.
40+
This might sound a bit tough, but it is required for us to maintain the quality
41+
of the codebase.
3942

4043
### PHP Style
4144

@@ -44,10 +47,11 @@ This might sound a bit tough, but it is required for us to maintain the quality
4447
All code must conform to our [Style Guide](./styleguide.md), which is
4548
based on PSR-12.
4649

47-
This makes certain that all submitted code is of the same format
48-
as the existing code and ensures that the codebase will be as readable as possible.
50+
This makes certain that all submitted code is of the same format as the existing
51+
code and ensures that the codebase will be as readable as possible.
4952

50-
You can fix most of the coding style violations by running this command in your terminal:
53+
You can fix most of the coding style violations by running this command in your
54+
terminal:
5155

5256
```console
5357
composer cs-fix
@@ -61,7 +65,8 @@ composer cs
6165

6266
### Unit Testing
6367

64-
If you are not familiar with Unit Testing, see [the forum thread](https://forum.codeigniter.com/showthread.php?tid=81830).
68+
If you are not familiar with Unit Testing, see
69+
[the forum thread](https://forum.codeigniter.com/showthread.php?tid=81830).
6570

6671
Unit testing is expected for all CodeIgniter components. We use PHPUnit,
6772
and run unit tests using GitHub Actions for each PR submitted or changed.
@@ -112,8 +117,8 @@ then you will need to add to the documentation.
112117
New classes, methods, parameters, changing default values, changing behavior etc.
113118
are all changes that require a change to documentation.
114119

115-
Also, the [Changelog](https://codeigniter4.github.io/CodeIgniter4/changelogs/index.html) must be updated for every change,
116-
and PHPDoc blocks must be maintained.
120+
Also, the [Changelog](https://codeigniter4.github.io/CodeIgniter4/changelogs/index.html)
121+
must be updated for every change, and PHPDoc blocks must be maintained.
117122

118123
See [Writing CodeIgniter Documentation](./documentation.rst).
119124

@@ -141,7 +146,7 @@ folder is also needed.
141146

142147
- Add an instruction what to do when upgrading.
143148
- If you add new properties or changes default values in Config files, add the
144-
changes in *"Project Files > Content Changes > Config"*.
149+
changes in *"Project Files > Content Changes > Config"*.
145150

146151
### CSS
147152

@@ -164,12 +169,19 @@ break with earlier versions of the framework.
164169

165170
#### Breaking Changes
166171

167-
In general, any change that would disrupt existing uses of the framework is considered a "Breaking Change" (BC) and will not be favorably considered. A few specific examples to pay attention to:
172+
In general, any change that would disrupt existing uses of the framework is
173+
considered a "Breaking Change" (BC) and will not be favorably considered. A few
174+
specific examples to pay attention to:
168175

169-
1. New classes/properties/constants in `system` are acceptable, but anything in the `app` directory that will be used in `system` should be backwards-compatible.
170-
2. Any changes to non-private methods must be backwards-compatible with the original definition.
171-
3. Deleting non-private properties or methods without prior deprecation notices is frowned upon and will likely be closed.
172-
4. Deleting or renaming public classes and interfaces, as well as those not marked as `@internal`, without prior deprecation notices or not providing fallback solutions will also not be favorably considered.
176+
1. New classes/properties/constants in `system` are acceptable, but anything in
177+
the `app` directory that will be used in `system` should be backwards-compatible.
178+
2. Any changes to non-private methods must be backwards-compatible with the original
179+
definition.
180+
3. Deleting non-private properties or methods without prior deprecation notices
181+
is frowned upon and will likely be closed.
182+
4. Deleting or renaming public classes and interfaces, as well as those not marked
183+
as `@internal`, without prior deprecation notices or not providing fallback
184+
solutions will also not be favorably considered.
173185

174186
### Mergeability
175187

@@ -184,48 +196,56 @@ working on your contribution.
184196

185197
### Branching
186198

187-
All bug fixes should be sent to the __"develop"__ branch, this is where the next bug fix version will be developed.
199+
All bug fixes should be sent to the __"develop"__ branch, this is where the next
200+
bug fix version will be developed.
188201

189202
PRs with any enhancement should be sent to next minor version branch, e.g. __"4.5"__
190203

191-
The __"master"__ branch will always contain the latest stable version and is kept clean so a "hotfix" (e.g. an
192-
emergency security patch) can be applied to the "master" branch to create a new version, without worrying
193-
about other features holding it up. Any sent to the "master" branch will be closed automatically.
204+
The __"master"__ branch will always contain the latest stable version and is kept
205+
clean so a "hotfix" (e.g. an emergency security patch) can be applied to the
206+
"master" branch to create a new version, without worrying about other features
207+
holding it up. Any sent to the "master" branch will be closed automatically.
194208

195209
If you have multiple changes to submit,
196210
please place all changes into their own branch on your fork.
197211

198-
**One thing at a time:** A pull request should only contain one change. That does not mean only one commit,
199-
but one change - however many commits it took. The reason for this is that if you change X and Y,
200-
but send a pull request for both at the same time, we might really want X but disagree with Y,
201-
meaning we cannot merge the request. Using the Git-Flow branching model you can create new
202-
branches for both of these features and send two requests.
212+
**One thing at a time:** A pull request should only contain one change. That does
213+
not mean only one commit, but one change - however many commits it took. The reason
214+
for this is that if you change X and Y, but send a pull request for both at the
215+
same time, we might really want X but disagree with Y, meaning we cannot merge
216+
the request. Using the Git-Flow branching model you can create new branches for
217+
both of these features and send two requests.
203218

204-
A reminder: **please use separate branches for each of your PRs** - it will make it easier for you to keep
205-
changes separate from each other and from whatever else you are doing with your repository!
219+
A reminder: **please use separate branches for each of your PRs** - it will make
220+
it easier for you to keep changes separate from each other and from whatever else
221+
you are doing with your repository!
206222

207223
### Signing
208224

209225
You must [GPG-sign](./signing.md) your work, certifying that you either wrote the work or
210-
otherwise have the right to pass it on to an open-source project. See [Developer's Certificate of Origin](./DCO.md).
226+
otherwise have the right to pass it on to an open-source project. See
227+
[Developer's Certificate of Origin](./DCO.md).
211228

212229
This is *not* just a "signed-off-by" commit, but instead, a digitally signed one.
213230

214231
See [Contribution signing](./signing.md) for details.
215232

216233
### Static Analysis on PHP code
217234

218-
We cannot, at all times, guarantee that all PHP code submitted on pull requests to be working well without
219-
actually running the code. For this reason, we make use of two static analysis tools, [PHPStan][1]
220-
and [Rector][2] to do the analysis for us.
235+
We cannot, at all times, guarantee that all PHP code submitted on pull requests
236+
to be working well without actually running the code. For this reason, we make
237+
use of two static analysis tools, [PHPStan][1] and [Rector][2] to do the analysis
238+
for us.
221239

222-
These tools have already been integrated into our CI/CD workflow to minimize unannounced bugs. Pull requests
223-
are expected that their code will pass these two. In your local machine, you can manually run these tools
224-
so that you can fix whatever errors that pop up with your submission.
240+
These tools have already been integrated into our CI/CD workflow to minimize
241+
unannounced bugs. Pull requests are expected that their code will pass these two.
242+
In your local machine, you can manually run these tools so that you can fix
243+
whatever errors that pop up with your submission.
225244

226245
#### PHPStan
227246

228-
PHPStan is expected to scan the entire framework by running this command in your terminal:
247+
PHPStan is expected to scan the entire framework by running this command in your
248+
terminal:
229249

230250
```console
231251
vendor/bin/phpstan analyse
@@ -262,7 +282,10 @@ vendor/bin/rector process path/to/file
262282

263283
## How-to Guide
264284

265-
The best way to contribute is to fork the CodeIgniter4 repository, and "clone" that to your development area. That sounds like some jargon, but "forking" on GitHub means "making a copy of that repo to your account" and "cloning" means "copying that code to your environment so you can work on it".
285+
The best way to contribute is to fork the CodeIgniter4 repository, and "clone"
286+
that to your development area. That sounds like some jargon, but "forking" on
287+
GitHub means "making a copy of that repo to your account" and "cloning" means
288+
"copying that code to your environment so you can work on it".
266289

267290
1. Set up Git ([Windows](https://git-scm.com/download/win), [Mac](https://git-scm.com/download/mac), & [Linux](https://git-scm.com/download/linux)).
268291
2. Go to the [CodeIgniter4 repository](https://github.com/codeigniter4/CodeIgniter4).
@@ -279,13 +302,18 @@ The best way to contribute is to fork the CodeIgniter4 repository, and "clone" t
279302
- If your PR has any enhancement, create new branch from next minor version branch, e.g. __"4.5"__:
280303
- `> git switch <next-minor-version-branch>`
281304
- `> git switch -c <new-branch-name>`
282-
7. Fix existing bugs on the [Issue tracker](https://github.com/codeigniter4/CodeIgniter4/issues) after confirming that no one else is working on them.
305+
7. Fix existing bugs on the [Issue tracker](https://github.com/codeigniter4/CodeIgniter4/issues) after confirming that no one
306+
else is working on them.
283307
8. [Commit](https://help.github.com/en/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project) the changed files in your contribution branch.
284308
- `> git commit`
285-
- Commit messages are expected to be descriptive of why and what you changed specifically. Commit messages like "Fixes #1234" would be asked by the reviewer to be revised. [Atomic commit](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention) is recommended. See [Contribution Workflow](./workflow.md#commit-messages) for details.
309+
- Commit messages are expected to be descriptive of why and what you changed
310+
specifically. Commit messages like "Fixes #1234" would be asked by the reviewer
311+
to be revised. [Atomic commit](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention) is recommended. See
312+
[Contribution Workflow](./workflow.md#commit-messages) for details.
286313
9. If you have touched PHP code, run static analysis.
287314
- `> composer analyze`
288-
10. Run unit tests on the specific file you modified. If there are no existing tests yet, please create one.
315+
10. Run unit tests on the specific file you modified. If there are no existing
316+
tests yet, please create one.
289317
- `> vendor/bin/phpunit tests/system/path/to/file/you/modified`
290318
- Make sure the tests pass to have a higher chance of merging.
291319
11. [Push](https://docs.github.com/en/github/using-git/pushing-commits-to-a-remote-repository) your contribution branch to your fork.
@@ -295,9 +323,13 @@ The best way to contribute is to fork the CodeIgniter4 repository, and "clone" t
295323

296324
See [Contribution workflow](./workflow.md) for Git workflow details.
297325

298-
The codebase maintainers will now be alerted to the submission and someone from the team will respond. If your change fails to meet the guidelines, it will be rejected or feedback will be provided to help you improve it.
326+
The codebase maintainers will now be alerted to the submission and someone from
327+
the team will respond. If your change fails to meet the guidelines, it will be
328+
rejected or feedback will be provided to help you improve it.
299329

300-
Once the maintainer handling your pull request is satisfied with it, they will approve the pull request and merge it into the "develop" branch. Your patch will now be part of the next release!
330+
Once the maintainer handling your pull request is satisfied with it, they will
331+
approve the pull request and merge it into the "develop" branch. Your patch will
332+
now be part of the next release!
301333

302334
## Translating System Messages
303335

contributing/workflow.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ values for when you try these:
1616

1717
## Branching
1818

19-
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the next bug fix version will be developed.
19+
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the
20+
next bug fix version will be developed.
2021
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.5"__
2122

2223
The "master" branch will always contain the latest stable
@@ -111,20 +112,22 @@ This local branch should be named appropriately, for instance
111112
"fix/problem123" or "new/mind-reader". The slashes in these branch names
112113
is optional, and implies a sort of namespacing if used.
113114

114-
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the next bug fix version will be developed.
115+
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the
116+
next bug fix version will be developed.
115117
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.5"__
116118

117-
For instance, if you send a PR to __"develop"__ branch, make sure you are in the *develop* branch, and create a
118-
new bugfix branch, based on *develop*, for a new feature you are
119-
creating:
119+
For instance, if you send a PR to __"develop"__ branch, make sure you are in the
120+
*develop* branch, and create a new bugfix branch, based on *develop*, for a new
121+
feature you are creating:
120122

121123
```console
122124
> git switch develop
123125
> git switch -c fix/problem123
124126
```
125127

126-
If you send a PR with an enhancement, make sure you are in the *next minor version* branch,
127-
and create a new feature branch, based on, e.g., __"4.5"__, for a new feature you are creating:
128+
If you send a PR with an enhancement, make sure you are in the *next minor version*
129+
branch, and create a new feature branch, based on, e.g., __"4.5"__, for a new
130+
feature you are creating:
128131

129132
```console
130133
> git switch 4.5
@@ -151,23 +154,24 @@ There are some references for writing good commit messages:
151154

152155
If there are intermediate commits that are not meaningful to the overall PR,
153156
such as "Fix error on style guide", "Fix phpstan error", "Fix mistake in code",
154-
and other related commits, you can squash your commits so that we can have a clean commit history.
155-
But it is not a must.
157+
and other related commits, you can squash your commits so that we can have a
158+
clean commit history. But it is not a must.
156159

157160
### Commit Messages
158161

159-
Commit messages are important. They communicate the intent of a specific change, concisely.
160-
They make it easier to review code, and to find out why a change was made
161-
if the code history is examined later.
162+
Commit messages are important. They communicate the intent of a specific change,
163+
concisely. They make it easier to review code, and to find out why a change was
164+
made if the code history is examined later.
162165

163166
The audience for your commit messages will be the codebase maintainers,
164167
any code reviewers, and debuggers trying to figure out when a bug might
165168
have been introduced.
166169

167170
Make your commit messages meaningful.
168171

169-
Commit messages are expected to be descriptive of **why** and what you changed specifically.
170-
Commit messages like "Fixes #1234" would be asked by the reviewer to be revised.
172+
Commit messages are expected to be descriptive of **why** and what you changed
173+
specifically. Commit messages like "Fixes #1234" would be asked by the reviewer
174+
to be revised.
171175

172176
You can have as many commits in a branch as you need to "get it right".
173177
For instance, to commit your work from a debugging session:
@@ -185,7 +189,8 @@ Just make sure that your commits in a feature branch are all related.
185189
186190
### GPG-Signing Old Commits
187191

188-
Any developer can forget GPG-signing their commits with the option `-S`, like `git commit -S -m 'Signed GPG'`. In such a case, all you need to do is the following:
192+
Any developer can forget GPG-signing their commits with the option `-S`, like
193+
`git commit -S -m 'Signed GPG'`. In such a case, all you need to do is the following:
189194

190195
Latest commit only:
191196
```console
@@ -267,16 +272,16 @@ On GitHub, you propose your changes one feature branch at a time, by
267272
switching to the branch you wish to contribute, and then clicking on
268273
"New pull request".
269274

270-
Make sure the pull request is for the shared __"develop"__ or next minor version branch, e.g. __"4.5"__, or it
271-
may be rejected.
275+
Make sure the pull request is for the shared __"develop"__ or next minor version
276+
branch, e.g. __"4.5"__, or it may be rejected.
272277

273278
Make sure that the PR title is helpful for the maintainers and other
274279
developers. Add any comments appropriate, for instance asking for
275280
review.
276281

277282
> **Note**
278-
> If you do not provide a title or description for your PR, the odds of it being summarily rejected
279-
rise astronomically.
283+
> If you do not provide a title or description for your PR, the odds of it being
284+
> summarily rejected rise astronomically.
280285
281286
When your PR is submitted, a continuous integration task will be
282287
triggered, running all the unit tests as well as any other checking we
@@ -306,9 +311,11 @@ And if your PRs have the breaking changes, label the following label:
306311

307312
## Updating Your Branch
308313

309-
If you are asked for changes in the review, commit the fix in your branch and push it to GitHub again.
314+
If you are asked for changes in the review, commit the fix in your branch and
315+
push it to GitHub again.
310316

311-
If the __"develop"__ or next minor version branch, e.g. __"4.5"__, progresses and conflicts arise that prevent merging, or if you are asked to *rebase*,
317+
If the __"develop"__ or next minor version branch, e.g. __"4.5"__, progresses
318+
and conflicts arise that prevent merging, or if you are asked to *rebase*,
312319
do the following:
313320

314321
Synchronize your repository:

0 commit comments

Comments
 (0)