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: user_guide_src/source/changelogs/v4.2.0.rst
+32-22Lines changed: 32 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,20 +12,26 @@ Release Date: Not Released
12
12
BREAKING
13
13
********
14
14
15
+
Method Signature Changes
16
+
========================
17
+
15
18
- The method signature of ``CodeIgniter\Database\BaseBuilder::join()`` and ``CodeIgniter\Database\*\Builder::join()`` have been changed.
16
19
- The method signature of ``Validation::setRule()`` has been changed. The ``string`` typehint on the ``$rules`` parameter was removed. Extending classes should likewise remove the parameter so as not to break LSP.
17
20
- The method signature of ``CodeIgniter\CLI\CommandRunner::_remap()`` has been changed to fix a bug.
21
+
- The default parameter values for ``Service::reset()`` and ``CIUnitTestCase::resetServices()`` have been changed from ``false`` to ``true``. This is to eliminate unexpected problems during testing, such as ``lang()`` not getting translated messages.
22
+
23
+
Behavior Changes
24
+
================
25
+
18
26
- The ``CodeIgniter\CodeIgniter`` class has a new property ``$context`` and it must have the correct context at runtime. So the following files have been changed:
19
27
- ``public/index.php``
20
28
- ``spark``
21
29
- The ``system/bootstrap.php`` file has been modified to easily implement `Preloading <https://www.php.net/manual/en/opcache.preloading.php>`_. Returning a ``CodeIgniter`` instance and loading ``.env`` file have been moved to ``index.php`` and ``spark``.
22
-
- The method signature of ``CodeIgniter\CLI\CommandRunner::_remap()`` has been changed to fix a bug.
23
30
- The ``CodeIgniter\Autoloader\Autoloader::initialize()`` has changed the behavior to fix a bug. It used to use Composer classmap only when ``$modules->discoverInComposer`` is true. Now it always uses the Composer classmap if Composer is available.
24
31
- The color code output by :ref:`CLI::color() <cli-library-color>` has been changed to fix a bug.
25
32
- To prevent unexpected access from the web browser, if a controller is added to a cli route (``$routes->cli()``), all methods of that controller are no longer accessible via auto-routing.
26
33
- There is a possible backward compatibility break for those users extending the History Collector and they should probably update ``History::setFiles()`` method.
27
34
- The :php:func:`dot_array_search`'s unexpected behavior has been fixed. Now ``dot_array_search('foo.bar.baz', ['foo' => ['bar' => 23]])`` returns ``null``. The previous versions returned ``23``.
28
-
- The default parameter values for ``Service::reset()`` and ``CIUnitTestCase::resetServices()`` have been changed from ``false`` to ``true``. This is to eliminate unexpected problems during testing, such as ``lang()`` not getting translated messages.
29
35
30
36
Enhancements
31
37
************
@@ -49,6 +55,29 @@ Added an optional new more secure auto router. These are the changes from the le
49
55
50
56
See :ref:`auto-routing-improved` for the details.
51
57
58
+
Database
59
+
========
60
+
61
+
- Added new OCI8 driver for database.
62
+
- It can access Oracle Database and supports SQL and PL/SQL statements.
63
+
- QueryBuilder
64
+
- Added Subqueries in the FROM section. See :ref:`query-builder-from-subquery`.
65
+
- Added Subqueries in the SELECT section. See :ref:`query-builder-select`.
66
+
- The ``BaseBuilder::buildSubquery()`` method can take an optional third argument ``string $alias``.
67
+
- Union queries. See :ref:`query-builder-union`.
68
+
- Raw SQL string support
69
+
- Added the class ``CodeIgniter\Database\RawSql`` which expresses raw SQL strings.
- ``DBForge::addField()`` default value raw SQL string support. See :ref:`forge-addfield-default-value-rawsql`.
72
+
73
+
Helpers and Functions
74
+
=====================
75
+
76
+
- HTML helper ``script_tag()`` now uses ``null`` values to write boolean attributes in minimized form: ``<script src="..." defer />``. See the sample code for :php:func:`script_tag`.
77
+
- Added 4th parameter ``$includeDir`` to ``get_filenames()``. See :php:func:`get_filenames`.
78
+
- Exception information logged through ``log_message()`` has now improved. It now includes the file and line where the exception originated. It also does not truncate the message anymore.
79
+
- The log format has also changed. If users are depending on the log format in their apps, the new log format is "<1-based count> <cleaned filepath>(<line>): <class><function><args>"
80
+
52
81
Commands
53
82
========
54
83
@@ -62,20 +91,6 @@ Commands
62
91
- ``spark db:table my_table --metadata``
63
92
- The ``spark routes`` command now shows closure routes, auto routes, and filters. See :ref:`URI Routing <spark-routes>`.
64
93
65
-
Database
66
-
========
67
-
68
-
- Added Subqueries in the FROM section. See :ref:`query-builder-from-subquery`.
69
-
- Added Subqueries in the SELECT section. See :ref:`query-builder-select`.
70
-
- The BaseBuilder::buildSubquery() method can take an optional third argument ``string $alias``.
71
-
- Added new OCI8 driver for database.
72
-
- It can access Oracle Database and supports SQL and PL/SQL statements.
73
-
- QueryBuilder raw SQL string support
74
-
- Added the class ``CodeIgniter\Database\RawSql`` which expresses raw SQL strings.
- ``DBForge::addField()`` default value raw SQL string support. See :ref:`forge-addfield-default-value-rawsql`.
77
-
- QueryBuilder. Union queries. See :ref:`query-builder-union`.
78
-
79
94
Others
80
95
======
81
96
@@ -86,13 +101,8 @@ Others
86
101
- See :ref:`content-security-policy` for details.
87
102
- New :doc:`../outgoing/view_decorators` allow modifying the generated HTML prior to caching.
88
103
- Added Validation Strict Rules. See :ref:`validation-traditional-and-strict-rules`.
89
-
- The ``spark routes`` command now shows closure routes, auto routes, and filters. See :ref:`URI Routing <spark-routes>`.
90
-
- Exception information logged through ``log_message()`` has now improved. It now includes the file and line where the exception originated. It also does not truncate the message anymore.
91
-
- The log format has also changed. If users are depending on the log format in their apps, the new log format is "<1-based count> <cleaned filepath>(<line>): <class><function><args>"
92
104
- Added support for webp files to **app/Config/Mimes.php**.
93
-
- Added 4th parameter ``$includeDir`` to ``get_filenames()``. See :php:func:`get_filenames`.
94
-
- HTML helper ``script_tag()`` now uses ``null`` values to write boolean attributes in minimized form: ``<script src="..." defer />``. See the sample code for :php:func:`script_tag`.
95
-
- RouteCollection::addRedirect() can now use placeholders.
105
+
- ``RouteCollection::addRedirect()`` can now use placeholders. See :ref:`redirecting-routes` for details.
96
106
- Debugbar enhancements
97
107
- Debug toolbar is now using ``microtime()`` instead of ``time()``.
98
108
- Added a sample file for `Preloading <https://www.php.net/manual/en/opcache.preloading.php>`_. See **preload.php**.
0 commit comments