Skip to content

Commit 8520691

Browse files
authored
Merge pull request #9546 from codeigniter4/develop
4.6.1 Ready code
2 parents 5f37fda + 143ea7d commit 8520691

File tree

248 files changed

+1909
-3155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+1909
-3155
lines changed

.github/mergeable.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,38 @@ mergeable:
3232
3333
Sincerely, the mergeable bot 🤖
3434
- do: close
35+
36+
- when: pull_request.opened, pull_request.ready_for_review
37+
filter:
38+
- do: payload
39+
pull_request:
40+
author_association:
41+
must_include:
42+
regex: ^NONE|FIRST_TIME_CONTRIBUTOR|FIRST_TIMER$
43+
validate: []
44+
pass:
45+
- do: comment
46+
payload:
47+
body: |
48+
Hi there, @@author! :wave:
49+
50+
Thank you for sending this PR!
51+
52+
We expect the following in all Pull Requests (PRs).
53+
- PRs must be sent to the [appropriate branch](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#branching)
54+
- All git commits must be [GPG-signed](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#signing)
55+
- Must follow our [style guide](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#php-style)
56+
- Be [commented](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#comments) in the PHP source file
57+
- Be documented in the [user guide](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#user-guide)
58+
- Be [unit tested](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#unit-testing)
59+
- Pass all checks in GitHub Actions
60+
61+
> [!IMPORTANT]
62+
> 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.
63+
64+
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
65+
on the framework than you do. Please make it as painless for your contributions to be included as possible.
66+
67+
See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md
68+
69+
Sincerely, the mergeable bot 🤖

.github/workflows/deploy-apidocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Download latest phpDocumentor
5151
working-directory: source
52-
run: phive --no-progress install --trust-gpg-keys 8AC0BAA79732DD42 phpDocumentor
52+
run: phive --no-progress install --trust-gpg-keys 6DA3ACC4991FFAE5 phpDocumentor
5353

5454
- name: Prepare API repo
5555
working-directory: api

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# Changelog
22

3+
## [v4.6.1](https://github.com/codeigniter4/CodeIgniter4/tree/v4.6.0) (2025-05-02)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.6.0...v4.6.1)
5+
6+
### Fixed Bugs
7+
* fix(CURLRequest): multiple header sections after redirects by @ducng99 in https://github.com/codeigniter4/CodeIgniter4/pull/9426
8+
* fix: set headers for CORS by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9437
9+
* fix: upsert with composite unique index by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9454
10+
* fix: `getVersion()` for OCI8 and SQLSRV drivers by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9471
11+
* fix: Toolbar when `maxHistory` is set to `0` by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9506
12+
* fix: `Session::markAsTempdata()` adding wrong TTL by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9536
13+
* fix: added "application/octet-stream" to the "stl" mime type in the M… by @Franky5831 in https://github.com/codeigniter4/CodeIgniter4/pull/9543
14+
15+
### Refactoring
16+
* refactor: get upper first protocol only one call in Email by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9449
17+
* refactor: PHPDocs in `env()` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9468
18+
* refactor: remove lowercase event name for logging by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9483
19+
* refactor: OCI8 `limit()` method by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9472
20+
* refactor: deprecate redundant `FileHandler` cache methods by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9511
21+
* refactor: fix `variable.undefined` (and other) errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9513
22+
* refactor: fix `return.unusedType` errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9514
23+
* refactor: add `CITestStreamFilter` to phpstan-analysed list and fix errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9515
24+
* refactor: fix `property.protected` errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9517
25+
* refactor: fix `function.alreadyNarrowedType` errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9518
26+
* refactor: fix `empty.property` errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9519
27+
* refactor: import FQCNs by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9520
28+
* refactor: fix `isset.property` errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9522
29+
* refactor: fix `missingType.return` errors by @warcooft in https://github.com/codeigniter4/CodeIgniter4/pull/9523
30+
* refactor: fix `nullCoalesce.variable` errors by @warcooft in https://github.com/codeigniter4/CodeIgniter4/pull/9524
31+
* refactor: fix phpstan errors in `URI` and `SiteURI` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9525
32+
* refactor: fix `@readonly` property errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9529
33+
* refactor: fix `missingType.return` errors in system files by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9530
34+
* refactor: fix `codeigniter.modelArgumentType` errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9533
35+
* refactor: fix `Session` and `SessionInterface` code by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9535
36+
337
## [v4.6.0](https://github.com/codeigniter4/CodeIgniter4/tree/v4.6.0) (2025-01-19)
438
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.5.8...v4.6.0)
539

admin/RELEASE.md

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
> Documentation guide based on the releases of `4.0.5` and `4.1.0` on January 31, 2021.
44
>
55
> Updated for `4.5.0` on April 7, 2024.
6+
> Updated for `4.6.0` on January 19, 2025.
67
>
78
> -MGatner, kenjis
89
@@ -33,10 +34,12 @@ git push upstream HEAD
3334

3435
If you release a new minor version.
3536

36-
* [ ] Create PR to merge `4.y` into `develop` and merge it
37+
* [ ] Create PR to merge `4.y` into `develop`:
38+
* Title: `4.y.0 Merge code`
39+
* Description: blank
3740
* [ ] Rename the current minor version (e.g., `4.5`) in Setting > Branches >
38-
"Branch protection rules" to the next minor version. E.g. `4.5``4.6`
39-
* [ ] Delete the merged `4.y` branch (This closes all PRs to the branch)
41+
"Branch protection rules" to the next minor version (e.g. `4.5``4.6`).
42+
* [ ] Delete the merged `4.y` branch (this closes all PRs to the branch).
4043

4144
## Preparation
4245

@@ -60,7 +63,7 @@ Work off direct clones of the repos so the release branches persist for a time.
6063

6164
## Changelog
6265

63-
When generating the changelog each Pull Request to be included must have one of
66+
When generating the changelog, each pull request to be included must have one of
6467
the following [labels](https://github.com/codeigniter4/CodeIgniter4/labels):
6568
- **bug** ... PRs that fix bugs
6669
- **enhancement** ... PRs to improve existing functionalities
@@ -72,11 +75,11 @@ PRs with breaking changes must have the following additional label:
7275

7376
### Generate Changelog
7477

75-
To auto-generate, navigate to the
78+
To auto-generate the changelog, navigate to the
7679
[Releases](https://github.com/codeigniter4/CodeIgniter4/releases) page,
7780
click the "Draft a new release" button.
7881

79-
* Tag: `v4.x.x` (Create new tag)
82+
* Choose a tag: `v4.x.x` (Create new tag: v4.x.x on publish)
8083
* Target: `develop`
8184

8285
Click the "Generate release notes" button.
@@ -85,7 +88,7 @@ Check the resulting content. If there are items in the *Others* section which
8588
should be included in the changelog, add a label to the PR and regenerate
8689
the changelog.
8790

88-
Copy the resulting content into **CHANGELOG.md** and adjust the format to match
91+
Copy the resulting contents into **CHANGELOG.md** and adjust the format to match
8992
the existing content.
9093

9194
## Process
@@ -95,23 +98,27 @@ the existing content.
9598
> been included with their PR, so this process assumes you will not be
9699
> generating much new content.
97100
98-
* [ ] Merge any Security Advisory PRs in private forks
99-
* [ ] Replace **CHANGELOG.md** with the new version generated above
101+
* [ ] Merge any security advisory PRs in private forks.
102+
* [ ] Add the current version to **CHANGELOG.md** with the contents generated above.
100103
* [ ] Update **user_guide_src/source/changelogs/v4.x.x.rst**
101104
* Remove the section titles that have no items
102105
* [ ] Update **user_guide_src/source/installation/upgrade_4xx.rst**
103-
* [ ] fill in the "All Changes" section, and add it to **upgrade_4xx.rst**
104-
* git diff --name-status origin/master -- . ':!system' ':!tests' ':!user_guide_src'
105-
* Note: `tests/` is not used for distribution repos. See `admin/starter/tests/`
106+
* [ ] fill in the "All Changes" section using the following command, and add it to **upgrade_4xx.rst**:
107+
```
108+
git diff --name-status origin/master -- . ':!.github/' ':!admin/' ':!system/' ':!tests/' \
109+
':!user_guide_src/' ':!utils/' ':!*.json' ':!*.xml' ':!*.dist' ':!rector.php' \
110+
':!phpstan*' ':!psalm*' ':!.php-cs-fixer.*' ':!LICENSE' ':!CHANGELOG.md'
111+
```
112+
* Note: `tests/` is not used for distribution repos. See `admin/starter/tests/`.
106113
* [ ] Remove the section titles that have no items
107-
* [ ] [Minor version only] Update the "from" version in the title. E.g., `from 4.3.x``from 4.3.8`
108-
* [ ] Run `php admin/prepare-release.php 4.x.x` and push to origin
114+
* [ ] [Minor version only] Update the "from" version in the title, (e.g., `from 4.3.x` → `from 4.3.8`).
115+
* [ ] Run `php admin/prepare-release.php 4.x.x` and push to origin.
109116
* The above command does the following:
110117
* Create a new branch `release-4.x.x`
111118
* Update **system/CodeIgniter.php** with the new version number:
112119
`const CI_VERSION = '4.x.x';`
113-
* Update **user_guide_src/source/conf.py** with the new `version = '4.x'` (if applicable)
114-
and `release = '4.x.x'`
120+
* Update **user_guide_src/source/conf.py** with the new `version = '4.x'` (if releasing
121+
the minor version) and `release = '4.x.x'`.
115122
* Update **user_guide_src/source/changelogs/{version}.rst**
116123
* Set the date to format `Release Date: January 31, 2021`
117124
* Update **phpdoc.dist.xml** with the new `<title>CodeIgniter v4.x API</title>`
@@ -126,15 +133,17 @@ the existing content.
126133
Previous version: #xxxx
127134
Release Code: TODO
128135
New Changelog: TODO
129-
```
136+
130137
(plus checklist)
131-
* [ ] Let all tests run, then review and merge the PR
138+
```
139+
140+
* [ ] Let all tests run, then review and merge the PR.
132141
* [ ] Create a new PR from `develop` to `master`:
133142
* Title: `4.x.x Ready code`
134143
* Description: blank
135144
* [ ] Merge the PR and wait for all tests.
136145
* [ ] Create a new Release:
137-
* Tag: `v4.x.x` (Create new tag)
146+
* Choose a tag: `v4.x.x` (Create new tag: v4.x.x on publish)
138147
* Target: `master`
139148
* Title: `CodeIgniter 4.x.x`
140149
* Description:
@@ -167,31 +176,31 @@ the existing content.
167176
created when v4.3.8 was released.
168177
* [ ] Fast-forward `develop` branch to catch the merge commit from `master`
169178
```console
170-
git fetch origin
179+
git fetch upstream
171180
git checkout develop
172-
git merge origin/develop
173-
git merge origin/master
174-
git push origin HEAD
181+
git merge upstream/develop
182+
git merge upstream/master
183+
git push upstream HEAD
175184
```
176185
* [ ] Update the next minor version branch `4.y`:
177186
```console
178-
git fetch origin
179-
git checkout 4.y
180-
git merge origin/4.y
181-
git merge origin/develop
182-
git push origin HEAD
187+
git fetch upstream
188+
git switch 4.y
189+
git merge upstream/4.y
190+
git merge upstream/develop
191+
git push upstream HEAD
183192
```
184193
* [ ] [Minor version only] Create the new next minor version branch `4.z`:
185194
```console
186-
git fetch origin
195+
git fetch upstream
187196
git switch develop
188197
git switch -c 4.z
189-
git push origin HEAD
198+
git push upstream HEAD
190199
```
191-
* [ ] Request CVEs and Publish any Security Advisories that were resolved from private forks
192-
(note: publishing is restricted to administrators):
200+
* [ ] Request CVEs and publish any security advisories that were resolved from private forks
201+
(note: publishing is restricted to administrators).
193202
* [ ] Announce the release on the forums and Slack channel
194-
(note: this forum is restricted to administrators):
203+
(note: this forum is restricted to administrators).
195204
* Make a new topic in the "News & Discussion" forums:
196205
https://forum.codeigniter.com/forum-2.html
197206
* The content is somewhat organic, but should include any major features and

admin/css/debug-toolbar/toolbar.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,31 @@
457457
}
458458
}
459459

460+
@media screen and (max-width: 768px) {
461+
#debug-bar {
462+
table {
463+
display: block;
464+
overflow-x: auto;
465+
font-size: 12px;
466+
margin: 5px 5px 10px 5px;
467+
468+
td,
469+
th {
470+
padding: 4px 6px;
471+
}
472+
}
473+
474+
.timeline {
475+
display: block;
476+
white-space: nowrap;
477+
font-size: 12px;
478+
}
479+
480+
.toolbar {
481+
overflow-x: auto;
482+
}
483+
}
484+
}
460485

461486
// THEMES
462487
// ========================================================================== */

admin/framework/.gitignore

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ _modules/*
100100
.idea/
101101
*.iml
102102

103-
# Netbeans
104-
nbproject/
105-
build/
106-
nbbuild/
107-
dist/
108-
nbdist/
109-
nbactions.xml
110-
nb-configuration.xml
111-
.nb-gradle/
103+
# NetBeans
104+
/nbproject/
105+
/build/
106+
/nbbuild/
107+
/dist/
108+
/nbdist/
109+
/nbactions.xml
110+
/nb-configuration.xml
111+
/.nb-gradle/
112112

113113
# Sublime Text
114114
*.tmlanguage.cache

admin/starter/.gitignore

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ _modules/*
100100
.idea/
101101
*.iml
102102

103-
# Netbeans
104-
nbproject/
105-
build/
106-
nbbuild/
107-
dist/
108-
nbdist/
109-
nbactions.xml
110-
nb-configuration.xml
111-
.nb-gradle/
103+
# NetBeans
104+
/nbproject/
105+
/build/
106+
/nbbuild/
107+
/dist/
108+
/nbdist/
109+
/nbactions.xml
110+
/nb-configuration.xml
111+
/.nb-gradle/
112112

113113
# Sublime Text
114114
*.tmlanguage.cache

admin/starter/tests/_support/Libraries/ConfigReader.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
namespace Tests\Support\Libraries;
44

5+
use Config\App;
6+
57
/**
68
* Class ConfigReader
79
*
810
* An extension of BaseConfig that prevents the constructor from
911
* loading external values. Used to read actual local values from
1012
* a config file.
1113
*/
12-
class ConfigReader extends \Config\App
14+
class ConfigReader extends App
1315
{
1416
public function __construct()
1517
{

app/Config/Autoload.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*
1818
* NOTE: This class is required prior to Autoloader instantiation,
1919
* and does not extend BaseConfig.
20-
*
21-
* @immutable
2220
*/
2321
class Autoload extends AutoloadConfig
2422
{

app/Config/Cache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class Cache extends BaseConfig
108108
* -------------------------------------------------------------------------
109109
* Redis settings
110110
* -------------------------------------------------------------------------
111+
*
111112
* Your Redis server can be specified below, if you are using
112113
* the Redis or Predis drivers.
113114
*

app/Config/DocTypes.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
namespace Config;
44

5-
/**
6-
* @immutable
7-
*/
85
class DocTypes
96
{
107
/**

0 commit comments

Comments
 (0)