diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d6d7a1bb896..72b155413fa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,92 @@ # Changelog +## [v4.7.0](https://github.com/codeigniter4/CodeIgniter4/tree/v4.7.0) (2026-02-01) +[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.6.5...v4.7.0) + +### Breaking Changes + +* feat: require double curly braces for placeholders in `regex_match` rule by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9597 +* feat(cache): add `deleteMatching` method definition in CacheInterface by @yassinedoghri in https://github.com/codeigniter4/CodeIgniter4/pull/9809 +* feat(cache): add native types to all CacheInterface methods by @yassinedoghri in https://github.com/codeigniter4/CodeIgniter4/pull/9811 +* feat(entity): deep change tracking for objects and arrays by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9779 +* feat(model): primary key validation by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9840 +* feat(entity): properly convert arrays of entities in `toRawArray()` by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9841 +* feat: add configurable status code filtering for `PageCache` filter by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9856 +* fix: inconsistent `key` handling in encryption by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9868 +* refactor: complete `QueryInterface` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9892 +* feat: add `remember()` to `CacheInterface` by @datamweb in https://github.com/codeigniter4/CodeIgniter4/pull/9875 +* refactor: Use native return types instead of using `#[ReturnTypeWillChange]` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9900 + +### Fixed Bugs + +* fix: ucfirst all cookie samesite values by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9564 +* fix: controller attribute filters with parameters by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9769 +* fix: Fixed test Transformers by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9778 +* fix: signal trait by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9846 + +### New Features + +* feat: signals by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9690 +* feat(app): Added controller attributes by @lonnieezell in https://github.com/codeigniter4/CodeIgniter4/pull/9745 +* feat: API transformers by @lonnieezell in https://github.com/codeigniter4/CodeIgniter4/pull/9763 +* feat: FrankenPHP Worker Mode by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9889 + +### Enhancements + +* feat: add email/smtp plain auth method by @ip-qi in https://github.com/codeigniter4/CodeIgniter4/pull/9462 +* feat: rewrite `ImageMagickHandler` to rely solely on the PHP `imagick` extension by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9526 +* feat: add `Time::addCalendarMonths()` and `Time::subCalendarMonths()` methods by @christianberkman in https://github.com/codeigniter4/CodeIgniter4/pull/9528 +* feat: add `clearMetadata()` method to provide privacy options when using imagick handler by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9538 +* feat: add `dns_cache_timeout` for option `CURLRequest` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9553 +* feat: added `fresh_connect` options to `CURLRequest` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9559 +* feat: update `CookieInterface::EXPIRES_FORMAT` to use date format per RFC 7231 by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9563 +* feat: share connection & DNS Cache to `CURLRequest` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9557 +* feat: add option to change default behaviour of `JSONFormatter` max depth by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9585 +* feat: customizable `.env` directory path by @totoprayogo1916 in https://github.com/codeigniter4/CodeIgniter4/pull/9631 +* feat: migrations lock by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9660 +* feat: uniform rendering of stack trace from failed DB operations by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9677 +* feat: make `insertBatch()` and `updateBatch()` respect model rules by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9708 +* feat: add enum casting by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9752 +* feat(app): Added pagination response to API ResponseTrait by @lonnieezell in https://github.com/codeigniter4/CodeIgniter4/pull/9758 +* feat: update robots definition for `UserAgent` class by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9782 +* feat: added `async` & `persistent` options to Cache Redis by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9792 +* feat: Add support for HTTP status in `ResponseCache` by @sk757a in https://github.com/codeigniter4/CodeIgniter4/pull/9855 +* feat: prevent `Maximum call stack size exceeded` on client-managed requests by @datamweb in https://github.com/codeigniter4/CodeIgniter4/pull/9852 +* feat: add `isPast()` and `isFuture()` time convenience methods by @datamweb in https://github.com/codeigniter4/CodeIgniter4/pull/9861 +* feat: allow overriding namespaced views via `app/Views` directory by @datamweb in https://github.com/codeigniter4/CodeIgniter4/pull/9860 +* feat: make DebugToolbar smarter about detecting binary/streamed responses by @datamweb in https://github.com/codeigniter4/CodeIgniter4/pull/9862 +* feat: complete `Superglobals` implementation by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9858 +* feat: encryption key rotation by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9870 +* feat: APCu caching driver by @sk757a in https://github.com/codeigniter4/CodeIgniter4/pull/9874 +* feat: added ``persistent`` config item to redis handler `Session` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9793 +* feat: Add CSP3 `script-src-elem` directive by @mark-unwin in https://github.com/codeigniter4/CodeIgniter4/pull/9722 +* feat: Add support for CSP3 keyword-sources by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9906 +* feat: enclose hash-based CSP directive values in single quotes by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9908 +* feat: add support for more CSP3 directives by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9909 +* feat: add support for CSP3 `report-to` directive by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9910 + +### Refactoring + +* refactor: cleanup code in `Email` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9570 +* refactor: remove deprecated types in random_string() helper by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9592 +* refactor: do not use future-deprecated `DATE_RFC7231` constant by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9657 +* refactor: remove `curl_close` has no effect since PHP 8.0 by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9683 +* refactor: remove `finfo_close` has no effect since PHP 8.1 by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9684 +* refactor: remove `imagedestroy` has no effect since PHP 8.0 by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9688 +* refactor: deprecated PHP 8.5 constant `FILTER_DEFAULT` for `filter_*()` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9699 +* chore: bump minimum required `PHP 8.2` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9701 +* refactor: add the `SensitiveParameter` attribute to methods dealing with sensitive info by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9710 +* fix: Remove check ext-json by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9713 +* refactor(app): Standardize subdomain detection logic by @lonnieezell in https://github.com/codeigniter4/CodeIgniter4/pull/9751 +* refactor: Types for `BaseModel`, `Model` and dependencies by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9830 +* chore: remove IncomingRequest deprecations by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9851 +* refactor: Session library by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9831 +* refactor: Superglobals - remove property promotion and fix PHPDocs by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9871 +* refactor: Rework `Entity` class by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9878 +* refactor: compare `$db->connID` to `false` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9891 +* refactor: cleanup `ContentSecurityPolicy` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9904 +* refactor: deprecate `CodeIgniter\HTTP\ContentSecurityPolicy::$nonces` since never used by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9905 + For the changelog of v4.6, see [CHANGELOG_4.6.md](./changelogs/CHANGELOG_4.6.md). For the changelog of v4.5, see [CHANGELOG_4.5.md](./changelogs/CHANGELOG_4.5.md). For the changelog of v4.4, see [CHANGELOG_4.5.md](./changelogs/CHANGELOG_4.4.md). diff --git a/loader.neon b/loader.neon deleted file mode 100644 index b01c551b4dc0..000000000000 --- a/loader.neon +++ /dev/null @@ -1,4 +0,0 @@ -# total 5 errors - -includes: - - missingType.iterableValue.neon diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml index f894ef0e893a..441a942b00f6 100644 --- a/phpdoc.dist.xml +++ b/phpdoc.dist.xml @@ -5,12 +5,12 @@ xmlns="https://www.phpdoc.org" xsi:noNamespaceSchemaLocation="https://docs.phpdoc.org/latest/phpdoc.xsd" > - CodeIgniter v4.6 API + CodeIgniter v4.7 API api/build/ api/cache/ - + system diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index cd5a13e4a63a..d59ebd61c5c8 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -55,7 +55,7 @@ class CodeIgniter /** * The current version of CodeIgniter Framework */ - public const CI_VERSION = '4.6.5'; + public const CI_VERSION = '4.7.0'; /** * App startup time. diff --git a/user_guide_src/source/changelogs/v4.7.0.rst b/user_guide_src/source/changelogs/v4.7.0.rst index 4cb009fe4299..7d1fd9089ca1 100644 --- a/user_guide_src/source/changelogs/v4.7.0.rst +++ b/user_guide_src/source/changelogs/v4.7.0.rst @@ -2,7 +2,7 @@ Version 4.7.0 ############# -Release Date: Unreleased +Release Date: February 1, 2026 **4.7.0 release of CodeIgniter4** @@ -49,19 +49,17 @@ and ``delete()`` methods now validate primary key values **before** executing da Invalid primary key values will now throw ``InvalidArgumentException`` instead of ``DatabaseException``. -**What changed:** +**What Changed:** - **Exception type:** Invalid primary keys now throw ``InvalidArgumentException`` with specific error messages instead of generic ``DatabaseException`` from the database layer. - **Validation timing:** - - For ``update()`` and ``delete()``: Validation happens **before** the ``beforeUpdate``/``beforeDelete`` events and before any database queries are executed. - For ``insert()`` and ``insertBatch()`` (when auto-increment is disabled): Validation happens **after** the ``beforeInsert`` event but **before** database queries are executed. - **Invalid values:** The following values are now explicitly rejected as primary keys: - - ``null`` (for insert when auto-increment is disabled) - ``0`` (integer zero) - ``'0'`` (string zero) @@ -127,7 +125,7 @@ The ``OpenSSLHandler`` and ``SodiumHandler`` no longer modify the handler's ``$k when encryption/decryption parameters are passed via the ``$params`` argument. Keys passed through ``$params`` are now used as local variables, ensuring the handler's state remains unchanged. -**What changed:** +**What Changed:** - Previously, passing a key via ``$params`` to ``encrypt()`` or ``decrypt()`` would permanently modify the handler's internal ``$key`` property. @@ -294,6 +292,7 @@ Libraries - **Time:** added methods ``Time::addCalendarMonths()`` and ``Time::subCalendarMonths()`` - **Time:** Added ``Time::isPast()`` and ``Time::isFuture()`` convenience methods. See :ref:`isPast ` and :ref:`isFuture ` for details. - **Toolbar:** Fixed an issue where the Debug Toolbar was incorrectly injected into responses generated by third-party libraries (e.g., Dompdf) that use native PHP headers instead of the framework's Response object. +- **UserAgents:** Expanded the list of recognized ``robots`` with new search engine and service crawlers. - **View:** Added the ability to override namespaced views (e.g., from modules/packages) by placing a matching file structure within the **app/Views/overrides** directory. See :ref:`Overriding Namespaced Views ` for details. Commands @@ -302,9 +301,6 @@ Commands - Added ``php spark worker:install`` command to generate FrankenPHP worker mode files (Caddyfile and worker entry point). - Added ``php spark worker:uninstall`` command to remove worker mode files. -Testing -======= - Database ======== @@ -312,25 +308,11 @@ Database - **BaseConnection:** The ``reconnect()`` method now uses ``ping()`` to check if the connection is alive before reconnecting. Previously, some drivers would always close and reconnect unconditionally, and OCI8's ``reconnect()`` did nothing. - **Exception Logging:** All DB drivers now log database exceptions uniformly. Previously, each driver had its own log format. -Query Builder -------------- - -Forge ------ - Migrations ---------- - **MigrationRunner:** Added distributed locking support to prevent concurrent migrations in multi-process environments. Enable with ``Config\Migrations::$lock = true``. -Others ------- - -- **UserAgents:** Expanded the list of recognized ``robots`` with new search engine and service crawlers. - -Model -===== - HTTP ==== diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index 20aae5de6e23..bc92288cc8d9 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -23,10 +23,10 @@ copyright = '2019-' + str(year_now) + ' CodeIgniter Foundation' # The short X.Y version. -version = '4.6' +version = '4.7' # The full version, including alpha/beta/rc tags. -release = '4.6.5' +release = '4.7.0' # -- General configuration --------------------------------------------------- diff --git a/user_guide_src/source/installation/upgrade_470.rst b/user_guide_src/source/installation/upgrade_470.rst index 10d7aad2d26c..621ba2ec6bd8 100644 --- a/user_guide_src/source/installation/upgrade_470.rst +++ b/user_guide_src/source/installation/upgrade_470.rst @@ -12,18 +12,6 @@ Please refer to the upgrade instructions corresponding to your installation meth :local: :depth: 2 -********************** -Mandatory File Changes -********************** - -**************** -Breaking Changes -**************** - -********************* -Breaking Enhancements -********************* - ************* Project Files ************* @@ -47,10 +35,33 @@ Config - app/Config/Migrations.php - ``Config\Migrations::$lock`` has been added, with a default value set to ``false``. +These files are new in this release: + +- app/Config/Hostnames.php +- app/Config/WorkerMode.php + All Changes =========== This is a list of all files in the **project space** that received changes; many will be simple comments or formatting that have no effect on the runtime: +- app/Config/CURLRequest.php +- app/Config/Cache.php +- app/Config/ContentSecurityPolicy.php +- app/Config/Email.php +- app/Config/Encryption.php +- app/Config/Format.php +- app/Config/Hostnames.php +- app/Config/Images.php - app/Config/Migrations.php +- app/Config/Optimize.php +- app/Config/Paths.php +- app/Config/Routing.php +- app/Config/Session.php +- app/Config/Toolbar.php +- app/Config/UserAgents.php +- app/Config/View.php +- app/Config/WorkerMode.php +- public/index.php +- spark