Skip to content

Commit 0c01f8b

Browse files
authored
Merge pull request #6469 from kenjis/fix-docs-changelogs/v4.3.0.rst
docs: improve changelogs/v4.3.0.rst
2 parents 7bdecb5 + 68fff4a commit 0c01f8b

File tree

4 files changed

+58
-16
lines changed

4 files changed

+58
-16
lines changed

user_guide_src/source/changelogs/v4.3.0.rst

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,34 +49,56 @@ Others
4949
Enhancements
5050
************
5151

52-
CLI
53-
===
52+
Commands
53+
========
54+
55+
- The call handler for Spark commands from the ``CodeIgniter\CodeIgniter`` class has been extracted. This will reduce the cost of console calls.
56+
- Added ``spark filter:check`` command to check the filters for a route. See :ref:`Controller Filters <spark-filter-check>` for the details.
57+
- Now ``spark routes`` command shows route names. See :ref:`URI Routing <routing-spark-routes>`.
58+
- Help information for a spark command can now be accessed using the ``--help`` option (e.g. ``php spark serve --help``)
5459
- Added methods ``CLI::promptByMultipleKeys()`` to support multiple value in input, unlike ``promptByKey()``. See :ref:`prompt-by-multiple-keys` for details.
5560

56-
Others
57-
======
61+
Testing
62+
=======
63+
5864
- Added the ``StreamFilterTrait`` to make it easier to work with capturing data from STDOUT and STDERR streams. See :ref:`testing-cli-output`.
5965
- The CITestStreamFilter filter class now implements methods for adding a filter to streams. See :ref:`testing-cli-output`.
6066
- Added the ``PhpStreamWrapper`` to make it easier to work with setting data to ``php://stdin``. See :ref:`testing-cli-input`.
67+
- Added method :ref:`benchmark-timer-record` to measure performance in a callable. Also enhanced common function ``timer()`` to accept optional callable.
68+
69+
Database
70+
========
71+
72+
- SQLite :ref:`BaseConnection::getIndexData() <db-metadata-getindexdata>` now can return pseudo index named ``PRIMARY`` for `AUTOINCREMENT` column, and each returned index data has ``type`` property.
73+
- SQLSRV now automatically drops ``DEFAULT`` constraint when using :ref:`Forge::dropColumn() <db-forge-dropColumn>`.
74+
- ``BaseConnection::escape()`` now excludes the ``RawSql`` data type. This allows passing SQL strings into data.
75+
76+
Model
77+
=====
78+
6179
- Added before and after events to ``BaseModel::insertBatch()`` and ``BaseModel::updateBatch()`` methods. See :ref:`model-events-callbacks`.
6280
- Added ``Model::allowEmptyInserts()`` method to insert empty data. See :ref:`Using CodeIgniter's Model <model-allow-empty-inserts>`
63-
- Added ``$routes->useSupportedLocalesOnly(true)`` so that the Router returns 404 Not Found if the locale in the URL is not supported in ``Config\App::$supportedLocales``. See :ref:`Localization <localization-in-routes>`
81+
- Added new :ref:`entities-property-casting` class ``IntBoolCast`` for Entity.
82+
83+
Libraries
84+
=========
85+
6486
- Added methods ``replace()``, ``addLineAfter()`` and ``addLineBefore()`` to modify files in Publisher. See :ref:`Publisher <publisher-modifying-files>` for details.
65-
- The call handler for Spark commands from the ``CodeIgniter\CodeIgniter`` class has been extracted. This will reduce the cost of console calls.
66-
- SQLite ``BaseConnection::getIndexData()`` now can return pseudo index named ``PRIMARY`` for `AUTOINCREMENT` column, and each returned index data has ``type`` property.
67-
- Added ``spark filter:check`` command to check the filters for a route. See :ref:`Controller Filters <spark-filter-check>` for the details.
6887
- Now **Encryption** can decrypt data encrypted with CI3's Encryption. See :ref:`encryption-compatible-with-ci3`.
69-
- Added method ``Timer::record()`` to measure performance in a callable. Also enhanced common function ``timer()`` to accept optional callable.
70-
- Now ``spark routes`` command shows route names. See :ref:`URI Routing <routing-spark-routes>`.
71-
- Added new :ref:`entities-property-casting` class ``IntBoolCast`` for Entity.
72-
- Help information for a spark command can now be accessed using the ``--help`` option (e.g. ``php spark serve --help``)
73-
- Added new Form helper function :php:func:`validation_errors()`, :php:func:`validation_list_errors()` and :php:func:`validation_show_error()` to display Validation Errors.
74-
- Now you can autoload helpers by **app/Config/Autoload.php**.
75-
- ``BaseConnection::escape()`` now excludes the ``RawSql`` data type. This allows passing SQL strings into data.
76-
- SQLSRV now automatically drops ``DEFAULT`` constraint when using ``Forge::dropColumn()``.
7788
- Added :ref:`Time::toDatabase() <time-todatabase>` to get a datetime string that can be used with databases regardless of locale.
89+
90+
Helpers and Functions
91+
=====================
92+
93+
- Now you can autoload helpers by **app/Config/Autoload.php**.
94+
- Added new Form helper function :php:func:`validation_errors()`, :php:func:`validation_list_errors()` and :php:func:`validation_show_error()` to display Validation Errors.
7895
- You can set the locale to :php:func:`route_to()` if you pass a locale value as the last parameter.
7996

97+
Others
98+
======
99+
100+
- Added ``$routes->useSupportedLocalesOnly(true)`` so that the Router returns 404 Not Found if the locale in the URL is not supported in ``Config\App::$supportedLocales``. See :ref:`Localization <localization-in-routes>`
101+
80102
Changes
81103
*******
82104

user_guide_src/source/database/metadata.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ database:
110110
List the Indexes in a Table
111111
===========================
112112

113+
.. _db-metadata-getindexdata:
114+
113115
$db->getIndexData()
114116
-------------------
115117

user_guide_src/source/dbmgmt/forge.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ Examples:
262262
Dropping Columns From a Table
263263
==============================
264264

265+
.. _db-forge-dropColumn:
266+
265267
$forge->dropColumn()
266268
--------------------
267269

user_guide_src/source/testing/benchmark.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,38 @@ With the Timer, you can measure the time between two moments in the execution of
2222
it simple to measure the performance of different aspects of your application. All measurement is done using
2323
the ``start()`` and ``stop()`` methods.
2424

25+
Timer::start()
26+
==============
27+
2528
The ``start()`` methods takes a single parameter: the name of this timer. You can use any string as the name
2629
of the timer. It is only used for you to reference later to know which measurement is which:
2730

2831
.. literalinclude:: benchmark/001.php
2932

33+
Timer::stop()
34+
=============
35+
3036
The ``stop()`` method takes the name of the timer that you want to stop as the only parameter, also:
3137

3238
.. literalinclude:: benchmark/002.php
3339

3440
The name is not case-sensitive, but otherwise must match the name you gave it when you started the timer.
3541

42+
timer()
43+
=======
44+
3645
Alternatively, you can use the :doc:`global function </general/common_functions>` ``timer()`` to start
3746
and stop timers:
3847

3948
.. literalinclude:: benchmark/003.php
4049

50+
.. _benchmark-timer-record:
51+
52+
Timer::record()
53+
===============
54+
55+
.. versionadded:: 4.3.0
56+
4157
Since v4.3.0, if you use very small code blocks to benchmark, you can also use the ``record()`` method. It accepts
4258
a no-parameter callable and measures its execution time. Methods ``start()`` and ``stop()`` will be called
4359
automatically around the function call.

0 commit comments

Comments
 (0)