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/styleguide.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
This document declares a set of coding conventions and rules to be followed when contributing PHP code
4
4
to the CodeIgniter project.
5
5
6
-
**Note:**
6
+
> [!NOTE]
7
7
> While we would recommend it, there's no requirement that you follow these conventions and rules in your
8
8
own projects. Usage is discretionary within your projects but strictly enforceable within the framework.
9
9
@@ -200,7 +200,7 @@ conditions MUST always be at the beginning or at the end of the line, not a mix
200
200
- The conditional operator, also known simply as the ternary operator, MUST be preceded and followed by at least one space around both the `?` and `:` characters.
201
201
- When the middle operand of the conditional operator is omitted, the operator MUST follow the same style rules as other binary comparison operators.
202
202
203
-
**Note:**
203
+
> [!NOTE]
204
204
> All the preceding rules are quoted from PSR-12. You may visit its website to view the code block samples.
Copy file name to clipboardExpand all lines: contributing/workflow.md
+41-34Lines changed: 41 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,9 @@ values for when you try these:
16
16
17
17
## Branching
18
18
19
-
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the next bug fix version will be developed.
20
-
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.3"__
19
+
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the
20
+
next bug fix version will be developed.
21
+
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.5"__
21
22
22
23
The "master" branch will always contain the latest stable
23
24
version and is kept clean so a "hotfix" (e.g: an emergency security
@@ -111,23 +112,25 @@ This local branch should be named appropriately, for instance
111
112
"fix/problem123" or "new/mind-reader". The slashes in these branch names
112
113
is optional, and implies a sort of namespacing if used.
113
114
114
-
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the next bug fix version will be developed.
115
-
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.3"__
115
+
- All bug fix PRs should be sent to the __"develop"__ branch, this is where the
116
+
next bug fix version will be developed.
117
+
- PRs with any enhancement should be sent to next minor version branch, e.g. __"4.5"__
116
118
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:
120
122
121
123
```console
122
124
> git switch develop
123
125
> git switch -c fix/problem123
124
126
```
125
127
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.3*, 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:
128
131
129
132
```console
130
-
> git switch 4.3
133
+
> git switch 4.5
131
134
> git switch -c new/mind-reader
132
135
```
133
136
@@ -151,23 +154,24 @@ There are some references for writing good commit messages:
151
154
152
155
If there are intermediate commits that are not meaningful to the overall PR,
153
156
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.
156
159
157
160
### Commit Messages
158
161
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.
162
165
163
166
The audience for your commit messages will be the codebase maintainers,
164
167
any code reviewers, and debuggers trying to figure out when a bug might
165
168
have been introduced.
166
169
167
170
Make your commit messages meaningful.
168
171
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.
171
175
172
176
You can have as many commits in a branch as you need to "get it right".
173
177
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.
185
189
186
190
### GPG-Signing Old Commits
187
191
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:
189
194
190
195
Latest commit only:
191
196
```console
@@ -235,7 +240,7 @@ are working in.
235
240
At some point, you will decide that your feature branch is complete, or
236
241
that it could benefit from a review by fellow developers.
237
242
238
-
> **Note**
243
+
> [!NOTE]
239
244
> Remember to sync your local repo with the shared one before pushing!
240
245
It is a lot easier to resolve conflicts at this stage.
241
246
@@ -267,16 +272,16 @@ On GitHub, you propose your changes one feature branch at a time, by
267
272
switching to the branch you wish to contribute, and then clicking on
268
273
"New pull request".
269
274
270
-
Make sure the pull request is for the shared __"develop"__ or next minor version branch, e.g. __"4.3"__, 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.
272
277
273
278
Make sure that the PR title is helpful for the maintainers and other
274
279
developers. Add any comments appropriate, for instance asking for
275
280
review.
276
281
277
-
> **Note**
278
-
> If you do not provide a title or description for your PR, the odds of it being summarily rejected
279
-
rise astronomically.
282
+
> [!NOTE]
283
+
> If you do not provide a title or description for your PR, the odds of it being
284
+
> summarily rejected rise astronomically.
280
285
281
286
When your PR is submitted, a continuous integration task will be
282
287
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:
306
311
307
312
## Updating Your Branch
308
313
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.
310
316
311
-
If the __"develop"__ or next minor version branch, e.g. __"4.3"__, 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*,
312
319
do the following:
313
320
314
321
Synchronize your repository:
@@ -347,7 +354,7 @@ And finally push your local branch to your GitHub repository:
347
354
348
355
If you have sent a PR to the wrong branch, you need to create a new PR branch.
349
356
350
-
When you have the PR branch `feat-abc` and you should have sent the PR to `4.3`,
357
+
When you have the PR branch `feat-abc` and you should have sent the PR to __"4.5"__,
351
358
but you created the PR branch from `develop` and sent a PR.
352
359
353
360
Copy the IDs of any commits you made that you want to keep:
@@ -356,13 +363,13 @@ Copy the IDs of any commits you made that you want to keep:
356
363
> git log
357
364
```
358
365
359
-
Update your `4.3` branch:
366
+
Update your __"4.5"__ branch:
360
367
361
368
```console
362
369
> git fetch upstream
363
-
> git switch 4.3
364
-
> git merge upstream/4.3
365
-
> git push origin 4.3
370
+
> git switch 4.5
371
+
> git merge upstream/4.5
372
+
> git push origin 4.5
366
373
```
367
374
368
375
(Optional) Create a new branch as a backup, just in case:
@@ -371,10 +378,10 @@ Update your `4.3` branch:
371
378
> git branch feat-abc.bk feat-abc
372
379
```
373
380
374
-
Rebase your PR branch from `develop` onto `4.3`:
381
+
Rebase your PR branch from `develop` onto __"4.5"__:
375
382
376
383
```console
377
-
> git rebase --onto 4.3 develop feat-abc
384
+
> git rebase --onto 4.5 develop feat-abc
378
385
```
379
386
380
387
Force push.
@@ -383,7 +390,7 @@ Force push.
383
390
> git push --force-with-lease origin feat-abc
384
391
```
385
392
386
-
On the GitHub PR page, change the base branch to the correct branch `4.3`.
393
+
On the GitHub PR page, change the base branch to the correct branch __"4.5"__.
'message' => '#^Parameter \\#1 \\$level \\(string\\) of method CodeIgniter\\\\Test\\\\TestLogger\\:\\:log\\(\\) should be contravariant with parameter \\$level \\(mixed\\) of method Psr\\\\Log\\\\LoggerInterface\\:\\:log\\(\\)$#',
0 commit comments