Skip to content

Commit a64d253

Browse files
authored
Merge branch 'develop' into fix-logger-psr3
2 parents e6196a0 + d43762f commit a64d253

35 files changed

Lines changed: 335 additions & 691 deletions

‎CHANGELOG.md‎

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

3+
## [v4.7.4](https://github.com/codeigniter4/CodeIgniter4/tree/v4.7.4) (2026-07-07)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.7.3...v4.7.4)
5+
6+
### Security
7+
8+
* **IncomingRequest:** *HTTPS detection via client-supplied headers* was fixed.
9+
``IncomingRequest::isSecure()`` now trusts the ``X-Forwarded-Proto`` and
10+
``Front-End-Https`` headers only when the request comes from a trusted proxy
11+
configured in ``Config\App::$proxyIPs``.
12+
See the `Security advisory GHSA-7wmf-pw8j-mc78 <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-7wmf-pw8j-mc78>`_
13+
for more information.
14+
15+
* **Query Builder:** Fixed a SQL injection vulnerability in ``deleteBatch()``.
16+
When ``deleteBatch()`` was used together with ``where()`` conditions, the
17+
bound values from the WHERE clause were substituted into the generated SQL
18+
with their escape flag ignored, so they were never escaped or quoted. The
19+
WHERE binds are now escaped in the same way as a regular ``delete()``.
20+
21+
See the `Security advisory GHSA-c9w5-rwh3-7pm9 <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-c9w5-rwh3-7pm9>`_
22+
for more information.
23+
24+
* **UploadedFile:** ``UploadedFile::move()`` now sanitizes the client-provided
25+
filename when called without a second argument. Previously, the unsanitized
26+
client filename was used as the default, allowing path traversal sequences
27+
(e.g. ``../../public/shell.php``) to write the uploaded file outside the
28+
intended directory. A name explicitly passed as the second argument is not
29+
sanitized and remains the caller's responsibility.
30+
See the `Security advisory GHSA-hhmc-q9hp-r662 <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-hhmc-q9hp-r662>`_
31+
for more information.
32+
33+
* **Validation:** The ``is_image`` and ``mime_in`` file upload validation rules
34+
now also verify non-empty client filename extensions. Previously, these rules
35+
classified an upload solely by its content-derived MIME type, so a file with a
36+
dangerous client extension (for example, a ``.php`` file prepended with image
37+
magic bytes) could pass validation while keeping its original extension on
38+
disk.
39+
See the `Security advisory GHSA-mmj4-63m4-r6h5 <https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-mmj4-63m4-r6h5>`_
40+
for more information.
41+
42+
The ``is_image`` rule now rejects uploads when a non-empty client filename
43+
extension is not an image extension. The ``mime_in`` rule now rejects uploads
44+
when a non-empty client filename extension does not match the detected file
45+
content, matching the same extension/content agreement used by ``ext_in``.
46+
Files uploaded without any extension (such as JavaScript ``Blob`` uploads)
47+
are still accepted, since the rules validate the file content.
48+
49+
### Fixed Bugs
50+
51+
* fix: prevent updateBatch with existing where conditions by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/10236
52+
* fix: detect Safari version from Version token by @memleakd in https://github.com/codeigniter4/CodeIgniter4/pull/10251
53+
* fix: nested transformer request scope leakage by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/10281
54+
* fix(model): pass $recursive parameter to parent in objectToRawArray by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10258
55+
* fix: preserve enclosing stream filter when using `MockInputOutput` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10307
56+
* fix: skip already-translated keys in `spark lang:find` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10308
57+
* fix(Filters): check both keys and values in `InvalidChars` arrays by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10303
58+
* fix: use dynamic lockMaxRetries limit in RedisHandler by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10295
59+
* fix: preserve sub-namespace when generating Entity from Model (i.e., `--return entity`) by @xgrind in https://github.com/codeigniter4/CodeIgniter4/pull/10232
60+
* fix: `env()` TypeError for non-string `$_SERVER` values + `esc()` fixes by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10305
61+
* fix: unify casing in BaseService::injectMock by @ThomasMeschke in https://github.com/codeigniter4/CodeIgniter4/pull/10316
62+
* fix: normalize SodiumHandler params and padding failures by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10321
63+
* fix(Validation): correct required_without logic and prevent array key warnings by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10328
64+
* fix: handle null ini values in phpini check by @Will-thom in https://github.com/codeigniter4/CodeIgniter4/pull/10233
65+
* fix: preserve zero values in XML export by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10367
66+
* fix: support array indexes in `getPostGet()` and `getGetPost()` by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/10362
67+
68+
### Refactoring
69+
70+
* refactor: narrow `Image` original dimension types to `int` by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/10326
71+
* refactor(HTTP): optimize file path parsing in `download()` method by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10330
72+
* refactor(database): optimize groupGetType by caching it inside BaseBuilder loops by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10340
73+
* refactor: bump to phpstan-codeigniter v2.1 by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10312
74+
* refactor: replace type `mixed` with more specific types by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10345
75+
* refactor: optimize `prepQuotedPrintable()` with hash lookup and int-length tracking by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10344
76+
* refactor: add precise `array` phpdocs for `CLI` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/10354
77+
* refactor(database): optimize `_processForeignKeys()` string allocations and loop invariants by @gr8man in https://github.com/codeigniter4/CodeIgniter4/pull/10351
78+
379
## [v4.7.3](https://github.com/codeigniter4/CodeIgniter4/tree/v4.7.3) (2026-05-22)
480
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.7.2...v4.7.3)
581

‎admin/README.md‎

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -41,47 +41,25 @@ This folder contains tools or docs useful for project maintainers.
4141
to be added as part of a git commit, ensuring that they conform to the
4242
framework coding style standards, and automatically fixing what can be.
4343

44-
## Maintainer Scripts
44+
## Release Scripts
4545

46-
- **release-config** holds variables used for the maintainer & release building
47-
- **docbot** re-builds the user guide from the RST source for it,
48-
and optionally deploys it to the `gh-pages` branch of the main
49-
repository (if the user running it has maintainer rights on that repo).
50-
See the [writeup](./docbot.md).
51-
52-
## Release Building Scripts
53-
54-
*Do not use these scripts! They are left here for reference only.*
55-
56-
The release workflow is detailed in its own writeup; these are the main
57-
scripts used by the release manager:
58-
59-
- **release** builds a new release branch in the main repo, for vetting.
60-
This includes updating version dependencies or constants,
61-
generating version(s) of the user guide; and possibly
62-
moving or ignoring stuff, distinguishing release from development.
63-
If successful, it will update the `config` file, with the version number
64-
in it, and it will run the related scripts following, to revise
65-
the release distributions.
66-
Usage: `admin/release version qualifier`
67-
- **release-userguide** builds the distributable userguide repo.
68-
It could be used on its own, but is normally part of `release`.
69-
- **release-deploy** pushes the release changes to the appropriate github
70-
repositories. Tag & create releases on GitHub. This is not easily reversible!
71-
Usage: `admin/release-deploy version qualifier`
72-
- **release-revert** can be used to restore your repositories to the state they
73-
were in before you started a release. **IF** you haven't deployed.
74-
This is in case you decide not to proceed with the release, for any reason.
75-
Remember to be polite when running it.
46+
The release process is detailed in [RELEASE.md](./RELEASE.md). These scripts
47+
are used as part of that process:
7648

49+
- **prepare-release.php** creates the `release-4.x.x` branch and updates
50+
version references in the framework source, the user guide, and the
51+
distribution build script.
52+
Usage: `php admin/prepare-release.php 4.x.x`
53+
- **create-new-changelog.php** creates the changelog and upgrade guide
54+
stubs for the next version and adds them to their index files.
55+
Usage: `php admin/create-new-changelog.php <current_version> <new_version>`
7756

7857
## Other Stuff
7958

80-
- **release-notes.bb** is a boilerplate for forum announcements of a new release.
81-
It is marked up using [BBcode](https://en.wikipedia.org/wiki/BBCode).
8259
- The **framework** and **starter** subfolders contain files that will over-ride
8360
those from the development repository, when the distribution repositories
8461
are built.
8562
- The subfolders inside `admin` contain "next release" files in the case of
8663
`codeigniter4` and over-written distribution files in the other cases.
87-
- The CHANGELOG.md file is auto-generated using the [GitHub Changelog Generator](https://github.com/github-changelog-generator/github-changelog-generator)
64+
- The CHANGELOG.md file is generated from GitHub's auto-generated release
65+
notes, as described in [RELEASE.md](./RELEASE.md).

‎admin/RELEASE.md‎

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@
1818
1919
## Merge `develop` branch into next minor version branch `4.y`
2020

21-
Before starting release process, if there are commits in `develop` branch that
21+
Before starting the release process, if there are commits in `develop` branch that
2222
are not merged into `4.y` branch, merge them. This is because if conflicts occur,
2323
merging will take time.
2424

25-
```console
26-
git fetch upstream
27-
git switch 4.y
28-
git merge upstream/4.y
29-
git merge upstream/develop
30-
git push upstream HEAD
31-
```
25+
* [ ] Merge `develop` into `4.y`:
26+
```console
27+
git fetch upstream
28+
git switch 4.y
29+
git merge upstream/4.y
30+
git merge upstream/develop
31+
git push upstream HEAD
32+
```
3233

3334
## [Minor version only] Merge minor version branch into `develop`
3435

@@ -118,16 +119,16 @@ the existing content.
118119
* Create a new branch `release-4.x.x`
119120
* Update **system/CodeIgniter.php** with the new version number:
120121
`const CI_VERSION = '4.x.x';`
121-
* Update **user_guide_src/source/conf.py** with the new `version = '4.x'` (if releasing
122-
the minor version) and `release = '4.x.x'`.
122+
* Update **user_guide_src/source/conf.py** with the new `version = '4.x'`
123+
and `release = '4.x.x'`.
123124
* Update **user_guide_src/source/changelogs/{version}.rst**
124125
* Set the date to format `Release Date: January 31, 2021`
125126
* Update **phpdoc.dist.xml** with the new `<title>CodeIgniter v4.x API</title>`
126127
and `<version number="4.x.x">`
127128
* Update **admin/starter/builds**:
128129
* Set `define('LATEST_RELEASE', '^4.x')`
129-
* Set `define('NEXT_MINOR', '4.y-dev')`.
130-
* If the major version changes, you need to manually change to `define('NEXT_MINOR', '5.0-dev')`.
130+
* Set `define('NEXT_MINOR', '^4.y-dev')`.
131+
* If the major version changes, you need to manually change to `define('NEXT_MINOR', '^5.0-dev')`.
131132
* Commit the changes with `Prep for 4.x.x release`
132133
* [ ] Create a new PR from `release-4.x.x` to `develop`:
133134
* Title: `Prep for 4.x.x release`
@@ -234,26 +235,31 @@ sudo pip3 install sphinx_rtd_theme
234235

235236
### Manual User Guide Process
236237

237-
* Still in the **CodeIgniter4** repo enter the **user_guide_src** directory
238-
* Clear out any old build files: `rm -rf build/`
239-
* Build the HTML version of the User Guide: `make html`
240-
* Build the ePub version of the User Guide: `make epub`
241-
* Switch to the **userguide** repo and create a new branch `release-4.x.x`
242-
* Replace **docs/** with **CodeIgniter4/user_guide_src/build/html**
243-
* Ensure the file **docs/.nojekyll** exists or GitHub Pages will ignore folders
238+
> [!NOTE]
239+
> This process is normally not needed. The "Deploy Distributable Repos" action
240+
> builds and deploys the User Guide automatically when a release is published.
241+
> Follow these steps only if the automatic deployment fails.
242+
243+
* [ ] Still in the **CodeIgniter4** repo enter the **user_guide_src** directory
244+
* [ ] Clear out any old build files: `rm -rf build/`
245+
* [ ] Build the HTML version of the User Guide: `make html`
246+
* [ ] Build the ePub version of the User Guide: `make epub`
247+
* [ ] Switch to the **userguide** repo and create a new branch `release-4.x.x`
248+
* [ ] Replace **docs/** with **CodeIgniter4/user_guide_src/build/html**
249+
* [ ] Ensure the file **docs/.nojekyll** exists or GitHub Pages will ignore folders
244250
with an underscore prefix
245-
* Copy **CodeIgniter4/user_guide_src/build/epub/CodeIgniter.epub** to
251+
* [ ] Copy **CodeIgniter4/user_guide_src/build/epub/CodeIgniter.epub** to
246252
**./CodeIgniter4.x.x.epub**
247-
* Commit the changes with "Update for 4.x.x" and push to origin
248-
* Create a new PR from `release-4.x.x` to `develop`:
253+
* [ ] Commit the changes with "Update for 4.x.x" and push to origin
254+
* [ ] Create a new PR from `release-4.x.x` to `develop`:
249255
* Title: "Update for 4.x.x"
250256
* Description: blank
251-
* Merge the PR
252-
* Create a new Release:
257+
* [ ] Merge the PR
258+
* [ ] Create a new Release:
253259
* Version: "v4.x.x"
254260
* Title: "CodeIgniter 4.x.x User Guide"
255261
* Description: "CodeIgniter 4.x.x User Guide"
256-
* Watch for the "github pages" Environment to make sure the deployment succeeds
262+
* [ ] Watch for the "github pages" Environment to make sure the deployment succeeds
257263

258264
The User Guide website should update itself via the deploy GitHub Action. Should
259265
this fail the server must be updated manually. See repo and hosting details in

‎admin/alldocs‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎admin/apibot‎

Lines changed: 0 additions & 42 deletions
This file was deleted.

‎admin/apibot.md‎

Lines changed: 0 additions & 36 deletions
This file was deleted.

‎admin/docbot‎

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)