Skip to content

Commit 7dd0e96

Browse files
authored
Merge pull request #6044 from kenjis/fix-docs-changelog-v420
docs: improve changelog v4.2.0
2 parents 58aa05e + 83c561c commit 7dd0e96

2 files changed

Lines changed: 36 additions & 22 deletions

File tree

user_guide_src/source/changelogs/v4.2.0.rst

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,26 @@ Release Date: Not Released
1212
BREAKING
1313
********
1414

15+
Method Signature Changes
16+
========================
17+
1518
- The method signature of ``CodeIgniter\Database\BaseBuilder::join()`` and ``CodeIgniter\Database\*\Builder::join()`` have been changed.
1619
- 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.
1720
- 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+
1826
- 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:
1927
- ``public/index.php``
2028
- ``spark``
2129
- 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.
2330
- 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.
2431
- The color code output by :ref:`CLI::color() <cli-library-color>` has been changed to fix a bug.
2532
- 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.
2633
- There is a possible backward compatibility break for those users extending the History Collector and they should probably update ``History::setFiles()`` method.
2734
- 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.
2935

3036
Enhancements
3137
************
@@ -49,6 +55,29 @@ Added an optional new more secure auto router. These are the changes from the le
4955

5056
See :ref:`auto-routing-improved` for the details.
5157

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.
70+
- :ref:`select() <query-builder-select-rawsql>`, :ref:`where() <query-builder-where-rawsql>`, :ref:`like() <query-builder-like-rawsql>`, :ref:`join() <query-builder-join-rawsql>` accept the ``CodeIgniter\Database\RawSql`` instance.
71+
- ``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+
5281
Commands
5382
========
5483

@@ -62,20 +91,6 @@ Commands
6291
- ``spark db:table my_table --metadata``
6392
- The ``spark routes`` command now shows closure routes, auto routes, and filters. See :ref:`URI Routing <spark-routes>`.
6493

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.
75-
- :ref:`select() <query-builder-select-rawsql>`, :ref:`where() <query-builder-where-rawsql>`, :ref:`like() <query-builder-like-rawsql>`, :ref:`join() <query-builder-join-rawsql>` accept the ``CodeIgniter\Database\RawSql`` instance.
76-
- ``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-
7994
Others
8095
======
8196

@@ -86,13 +101,8 @@ Others
86101
- See :ref:`content-security-policy` for details.
87102
- New :doc:`../outgoing/view_decorators` allow modifying the generated HTML prior to caching.
88103
- 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>"
92104
- 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.
96106
- Debugbar enhancements
97107
- Debug toolbar is now using ``microtime()`` instead of ``time()``.
98108
- Added a sample file for `Preloading <https://www.php.net/manual/en/opcache.preloading.php>`_. See **preload.php**.

user_guide_src/source/incoming/routing.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ define an array of routes and then pass it as the first parameter to the ``map()
202202

203203
.. literalinclude:: routing/021.php
204204

205+
.. _redirecting-routes:
206+
205207
Redirecting Routes
206208
==================
207209

@@ -213,6 +215,8 @@ redirect and is recommended in most cases:
213215

214216
.. literalinclude:: routing/022.php
215217

218+
.. note:: Since v4.2.0 ``addRedirect()`` can use placeholders.
219+
216220
If a redirect route is matched during a page load, the user will be immediately redirected to the new page before a
217221
controller can be loaded.
218222

0 commit comments

Comments
 (0)