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
<h3><aclass="toc-backref" href="#id9" role="doc-backlink">Interface Changes</a><aclass="headerlink" href="#interface-changes" title="Permalink to this heading"></a></h3>
495
+
<spanid="v470-interface-changes"></span><h3><aclass="toc-backref" href="#id9" role="doc-backlink">Interface Changes</a><aclass="headerlink" href="#interface-changes" title="Permalink to this heading"></a></h3>
496
496
<p><strong>NOTE:</strong> If you’ve implemented your own classes that implement these interfaces from scratch, you will need to update your implementations to include the new methods to ensure compatibility.</p>
497
497
<ulclass="simple">
498
498
<li><p><strong>Cache:</strong> The <codeclass="docutils literal notranslate"><spanclass="pre">CacheInterface</span></code> now includes the <codeclass="docutils literal notranslate"><spanclass="pre">deleteMatching()</span></code> method.</p></li>
<h3><aclass="toc-backref" href="#id10" role="doc-backlink">Method Signature Changes</a><aclass="headerlink" href="#method-signature-changes" title="Permalink to this heading"></a></h3>
505
+
<spanid="v470-method-signature-changes"></span><h3><aclass="toc-backref" href="#id10" role="doc-backlink">Method Signature Changes</a><aclass="headerlink" href="#method-signature-changes" title="Permalink to this heading"></a></h3>
506
506
<ulclass="simple">
507
507
<li><p><strong>BaseModel:</strong> The type of the <codeclass="docutils literal notranslate"><spanclass="pre">$row</span></code> parameter for the <codeclass="docutils literal notranslate"><spanclass="pre">cleanValidationRules()</span></code> method has been changed from <codeclass="docutils literal notranslate"><spanclass="pre">?array</span><spanclass="pre">$row</span><spanclass="pre">=</span><spanclass="pre">null</span></code> to <codeclass="docutils literal notranslate"><spanclass="pre">array</span><spanclass="pre">$row</span></code>.</p></li>
508
508
<li><p><strong>PageCache:</strong> The <codeclass="docutils literal notranslate"><spanclass="pre">PageCache</span></code> filter constructor now accepts an optional <codeclass="docutils literal notranslate"><spanclass="pre">Cache</span></code> configuration parameter: <codeclass="docutils literal notranslate"><spanclass="pre">__construct(?Cache</span><spanclass="pre">$config</span><spanclass="pre">=</span><spanclass="pre">null)</span></code>. This allows dependency injection for testing purposes. While this is technically a breaking change if you extend the <codeclass="docutils literal notranslate"><spanclass="pre">PageCache</span></code> class with your own constructor, it should not affect most users as the parameter has a default value.</p></li>
@@ -580,13 +580,13 @@ <h3><a class="toc-backref" href="#id10" role="doc-backlink">Method Signature Cha
580
580
</ul>
581
581
</section>
582
582
<sectionid="property-signature-changes">
583
-
<h3><aclass="toc-backref" href="#id11" role="doc-backlink">Property Signature Changes</a><aclass="headerlink" href="#property-signature-changes" title="Permalink to this heading"></a></h3>
583
+
<spanid="v470-property-signature-changes"></span><h3><aclass="toc-backref" href="#id11" role="doc-backlink">Property Signature Changes</a><aclass="headerlink" href="#property-signature-changes" title="Permalink to this heading"></a></h3>
584
584
<ulclass="simple">
585
585
<li><p><strong>Entity:</strong> The protected property <codeclass="docutils literal notranslate"><spanclass="pre">CodeIgniter\Entity\Entity::$dataCaster</span></code> type has been changed from <codeclass="docutils literal notranslate"><spanclass="pre">DataCaster</span></code> to <codeclass="docutils literal notranslate"><spanclass="pre">?DataCaster</span></code> (nullable).</p></li>
586
586
</ul>
587
587
</section>
588
588
<sectionid="removed-deprecated-items">
589
-
<h3><aclass="toc-backref" href="#id12" role="doc-backlink">Removed Deprecated Items</a><aclass="headerlink" href="#removed-deprecated-items" title="Permalink to this heading"></a></h3>
589
+
<spanid="v470-removed-deprecated-items"></span><h3><aclass="toc-backref" href="#id12" role="doc-backlink">Removed Deprecated Items</a><aclass="headerlink" href="#removed-deprecated-items" title="Permalink to this heading"></a></h3>
590
590
<ulclass="simple">
591
591
<li><p><strong>BaseModel:</strong> The deprecated method <codeclass="docutils literal notranslate"><spanclass="pre">transformDataRowToArray()</span></code> has been removed.</p></li>
592
592
<li><p><strong>Cache:</strong> The deprecated return type <codeclass="docutils literal notranslate"><spanclass="pre">false</span></code> for <codeclass="docutils literal notranslate"><spanclass="pre">CodeIgniter\Cache\CacheInterface::getMetaData()</span></code> has been replaced with <codeclass="docutils literal notranslate"><spanclass="pre">null</span></code> type.</p></li>
<h2><aclass="toc-backref" href="#id1" role="doc-backlink">Breaking Changes</a><aclass="headerlink" href="#breaking-changes" title="Permalink to this heading"></a></h2>
329
+
<sectionid="php-8-2-required">
330
+
<h3><aclass="toc-backref" href="#id2" role="doc-backlink">PHP 8.2 Required</a><aclass="headerlink" href="#php-8-2-required" title="Permalink to this heading"></a></h3>
331
+
<p>The minimum PHP requirement has been updated to <strong>PHP 8.2</strong>.</p>
332
+
<p>If your current runtime is older than PHP 8.2, upgrade PHP first before
333
+
upgrading CodeIgniter.</p>
334
+
</section>
335
+
<sectionid="validation-regex-match-placeholders">
336
+
<h3><aclass="toc-backref" href="#id3" role="doc-backlink">Validation <codeclass="docutils literal notranslate"><spanclass="pre">regex_match</span></code> Placeholders</a><aclass="headerlink" href="#validation-regex-match-placeholders" title="Permalink to this heading"></a></h3>
337
+
<p>Placeholders in the <codeclass="docutils literal notranslate"><spanclass="pre">regex_match</span></code> validation rule must now use double curly
338
+
braces.</p>
339
+
<p>If you previously used single braces like
340
+
<codeclass="docutils literal notranslate"><spanclass="pre">regex_match[/^{placeholder}$/]</span></code>, update it to:
<h3><aclass="toc-backref" href="#id4" role="doc-backlink">Model Primary Key Validation Timing and Exceptions</a><aclass="headerlink" href="#model-primary-key-validation-timing-and-exceptions" title="Permalink to this heading"></a></h3>
346
+
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">insertBatch()</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">updateBatch()</span></code> methods now honor model settings
347
+
like <codeclass="docutils literal notranslate"><spanclass="pre">updateOnlyChanged</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">allowEmptyInserts</span></code>. This change ensures
348
+
consistent handling across all insert/update operations.</p>
349
+
<p>Primary key values are now validated before database queries in
<p>If your code catches <codeclass="docutils literal notranslate"><spanclass="pre">DatabaseException</span></code> for invalid primary keys, update it
355
+
to handle <codeclass="docutils literal notranslate"><spanclass="pre">InvalidArgumentException</span></code> as well.</p>
356
+
</section>
357
+
<sectionid="entity-change-detection-is-now-deep">
358
+
<h3><aclass="toc-backref" href="#id5" role="doc-backlink">Entity Change Detection Is Now Deep</a><aclass="headerlink" href="#entity-change-detection-is-now-deep" title="Permalink to this heading"></a></h3>
359
+
<p><codeclass="docutils literal notranslate"><spanclass="pre">Entity::hasChanged()</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">Entity::syncOriginal()</span></code> now perform deep
360
+
comparison for arrays and objects.</p>
361
+
<p>If you relied on the previous shallow (reference-based) behavior, review your
362
+
entity update flows and tests because nested changes are now detected.</p>
363
+
<p>Also, <codeclass="docutils literal notranslate"><spanclass="pre">Entity::toRawArray()</span></code> now recursively converts arrays of entities when
364
+
<codeclass="docutils literal notranslate"><spanclass="pre">$recursive</span></code> is <codeclass="docutils literal notranslate"><spanclass="pre">true</span></code>.</p>
365
+
</section>
366
+
<sectionid="encryption-handler-key-state">
367
+
<h3><aclass="toc-backref" href="#id6" role="doc-backlink">Encryption Handler Key State</a><aclass="headerlink" href="#encryption-handler-key-state" title="Permalink to this heading"></a></h3>
368
+
<p><codeclass="docutils literal notranslate"><spanclass="pre">OpenSSLHandler</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">SodiumHandler</span></code> no longer mutate the handler’s internal
369
+
key when a key is passed via <codeclass="docutils literal notranslate"><spanclass="pre">$params</span></code> to <codeclass="docutils literal notranslate"><spanclass="pre">encrypt()</span></code>/<codeclass="docutils literal notranslate"><spanclass="pre">decrypt()</span></code>.</p>
370
+
<p>If your code depended on passing a key once and reusing it implicitly later,
371
+
move to explicit key configuration in <codeclass="docutils literal notranslate"><spanclass="pre">Config\\Encryption</span></code> (or pass a custom
372
+
config when creating the encrypter service).</p>
373
+
</section>
374
+
<sectionid="interface-changes">
375
+
<h3><aclass="toc-backref" href="#id7" role="doc-backlink">Interface Changes</a><aclass="headerlink" href="#interface-changes" title="Permalink to this heading"></a></h3>
376
+
<p>Some interface changes have been made. Classes that implement framework
377
+
interfaces should update their APIs to reflect these changes.</p>
378
+
<p>See <aclass="reference internal" href="../changelogs/v4.7.0.html#v470-interface-changes"><spanclass="std std-ref">ChangeLog</span></a> for details.</p>
379
+
</section>
380
+
<sectionid="method-signature-changes">
381
+
<h3><aclass="toc-backref" href="#id8" role="doc-backlink">Method Signature Changes</a><aclass="headerlink" href="#method-signature-changes" title="Permalink to this heading"></a></h3>
382
+
<p>Some method signature changes have been made. Classes that extend framework
383
+
classes should update their method signatures to keep LSP compatibility.</p>
384
+
<p>See <aclass="reference internal" href="../changelogs/v4.7.0.html#v470-method-signature-changes"><spanclass="std std-ref">ChangeLog</span></a> for details.</p>
385
+
</section>
386
+
<sectionid="property-signature-changes">
387
+
<h3><aclass="toc-backref" href="#id9" role="doc-backlink">Property Signature Changes</a><aclass="headerlink" href="#property-signature-changes" title="Permalink to this heading"></a></h3>
388
+
<p>Some property type signatures have changed (for example nullable
389
+
<codeclass="docutils literal notranslate"><spanclass="pre">Entity::$dataCaster</span></code>). If you extend these classes, update your code
390
+
accordingly.</p>
391
+
<p>See <aclass="reference internal" href="../changelogs/v4.7.0.html#v470-property-signature-changes"><spanclass="std std-ref">ChangeLog</span></a> for details.</p>
392
+
</section>
393
+
<sectionid="removed-deprecated-items">
394
+
<h3><aclass="toc-backref" href="#id10" role="doc-backlink">Removed Deprecated Items</a><aclass="headerlink" href="#removed-deprecated-items" title="Permalink to this heading"></a></h3>
395
+
<p>Some deprecated items have been removed. If your app still uses or extends
396
+
these APIs, update your code before upgrading.</p>
397
+
<p>See <aclass="reference internal" href="../changelogs/v4.7.0.html#v470-removed-deprecated-items"><spanclass="std std-ref">ChangeLog</span></a> for details.</p>
398
+
</section>
399
+
</section>
314
400
<sectionid="project-files">
315
-
<h2><aclass="toc-backref" href="#id1" role="doc-backlink">Project Files</a><aclass="headerlink" href="#project-files" title="Permalink to this heading"></a></h2>
401
+
<h2><aclass="toc-backref" href="#id11" role="doc-backlink">Project Files</a><aclass="headerlink" href="#project-files" title="Permalink to this heading"></a></h2>
316
402
<p>Some files in the <strong>project space</strong> (root, app, public, writable) received updates. Due to
317
403
these files being outside of the <strong>system</strong> scope they will not be changed without your intervention.</p>
318
404
<divclass="admonition note">
@@ -322,7 +408,7 @@ <h2><a class="toc-backref" href="#id1" role="doc-backlink">Project Files</a><a c
322
408
<aclass="reference external" href="https://packagist.org/explore/?query=codeigniter4%20updates">Explore on Packagist</a>.</p>
323
409
</div>
324
410
<sectionid="content-changes">
325
-
<h3><aclass="toc-backref" href="#id2" role="doc-backlink">Content Changes</a><aclass="headerlink" href="#content-changes" title="Permalink to this heading"></a></h3>
411
+
<h3><aclass="toc-backref" href="#id12" role="doc-backlink">Content Changes</a><aclass="headerlink" href="#content-changes" title="Permalink to this heading"></a></h3>
326
412
<p>The following files received significant changes (including deprecations or visual adjustments)
327
413
and it is recommended that you merge the updated versions with your application:</p>
328
414
<sectionid="config">
@@ -344,7 +430,7 @@ <h4>Config<a class="headerlink" href="#config" title="Permalink to this heading"
344
430
</section>
345
431
</section>
346
432
<sectionid="all-changes">
347
-
<h3><aclass="toc-backref" href="#id3" role="doc-backlink">All Changes</a><aclass="headerlink" href="#all-changes" title="Permalink to this heading"></a></h3>
433
+
<h3><aclass="toc-backref" href="#id13" role="doc-backlink">All Changes</a><aclass="headerlink" href="#all-changes" title="Permalink to this heading"></a></h3>
348
434
<p>This is a list of all files in the <strong>project space</strong> that received changes;
349
435
many will be simple comments or formatting that have no effect on the runtime:</p>
0 commit comments