Skip to content

Commit b303dc1

Browse files
committed
docs: move section Enhancements up
1 parent 0629d59 commit b303dc1

File tree

1 file changed

+167
-167
lines changed

1 file changed

+167
-167
lines changed

user_guide_src/source/changelogs/v4.5.0.rst

Lines changed: 167 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,173 @@ Highlights
1717
- Update minimal PHP requirement to 8.1.
1818
- TBD
1919

20+
************
21+
Enhancements
22+
************
23+
24+
Commands
25+
========
26+
27+
- Added ``spark make:test`` command to generate a skeleton test file. See
28+
:ref:`cli-generators-make-test` for the details.
29+
- Added ``spark config:check`` command to check Config values. See
30+
:ref:`confirming-config-values` for the details.
31+
- Added ``spark lang:find`` command to update translations keys. See :ref:`generating-translation-files-via-command` for the details.
32+
- The ``--dbgroup`` option has been added to the ``spark db:table`` command.
33+
See :ref:`Database Commands <db-command-specify-the-dbgroup>`.
34+
35+
Testing
36+
=======
37+
38+
- **DomParser:** The new methods were added ``seeXPath()`` and ``dontSeeXPath()``
39+
which allows users to work directly with DOMXPath object, using complex expressions.
40+
- **CLI:** The new ``InputOutput`` class was added and now you can write tests
41+
for commands more easily if you use ``MockInputOutput``.
42+
See :ref:`using-mock-input-output`.
43+
- **TestResponse:** TestResponse no longer extends ``PHPUnit\Framework\TestCase`` as it
44+
is not a test. Assertions' return types are now natively typed ``void``.
45+
46+
Database
47+
========
48+
49+
Query Builder
50+
-------------
51+
52+
.. _v450-query-builder-limit-0-behavior:
53+
54+
limit(0) Behavior
55+
^^^^^^^^^^^^^^^^^
56+
57+
- Added a feature flag ``Feature::$limitZeroAsAll`` to fix the incorrect behavior
58+
of ``limit(0)``.
59+
- If ``LIMIT 0`` is specified in a SQL statement, 0 records are returned. However,
60+
there is a bug in the Query Builder, and if ``limit(0)`` is specified, the
61+
generated SQL statement will have no ``LIMIT`` clause and all records will be
62+
returned.
63+
- It is recommended that ``$limitZeroAsAll`` in **app/Config/Feature.php** be set
64+
to ``false`` as this incorrect behavior will be fixed in a future version. See
65+
also :ref:`v450-model-findall-limit-0-behavior`.
66+
67+
Forge
68+
-----
69+
70+
Others
71+
------
72+
73+
Model
74+
=====
75+
76+
Model Field Casting
77+
-------------------
78+
79+
Added a feature to convert data retrieved from a database into the appropriate
80+
PHP type. See :ref:`model-field-casting` for details.
81+
82+
.. _v450-model-findall-limit-0-behavior:
83+
84+
findAll(0) Behavior
85+
-------------------
86+
87+
- Added a feature flag ``Feature::$limitZeroAsAll`` to fix the incorrect behavior
88+
of ``limit(0)`` for Query Builder. See :ref:`v450-query-builder-limit-0-behavior`
89+
for details.
90+
- If you disable this flag, you need to change code like ``findAll(0, $offset)``
91+
to ``findAll(null, $offset)``.
92+
93+
$updateOnlyChanged
94+
------------------
95+
96+
Added a property ``$updateOnlyChanged`` whether to update
97+
:doc:`Entity <../models/entities>`'s only changed fields. If you set this property
98+
to ``false``, when you are updating an Entity, ``DataException``
99+
"There is no data to update" will not raise even if the values in the Entity have
100+
not changed.
101+
102+
See :ref:`Using CodeIgniter’s Model <model-update-only-changed>` for details.
103+
104+
Saving Dates
105+
------------
106+
107+
Now you can configure the date/time format when you save :doc:`Time <../libraries/time>`
108+
instances. See :ref:`model-saving-dates` for details.
109+
110+
Libraries
111+
=========
112+
113+
- **Validation:**
114+
- Added the new rule ``field_exists`` that checks the filed exists in the
115+
data to be validated.
116+
- The ``$dbGroup`` parameter of ``Validation::run()`` now accepts not only
117+
a database group name, but also a database connection instance or an array
118+
of database settings.
119+
120+
Helpers and Functions
121+
=====================
122+
123+
.. _v450-required-filters:
124+
125+
Required Filters
126+
================
127+
128+
New :ref:`Required Filters <filters-required>` have been introduced. They are
129+
special filters that are applied before and after other kinds of filters, and
130+
always applied even if a route does not exist.
131+
132+
The following existing functionalities have been reimplemented as Required Filters.
133+
134+
- :ref:`Force Global Secure Requests <forcehttps>`
135+
- :doc:`../general/caching`
136+
- :ref:`performancemetrics`
137+
- :ref:`the-debug-toolbar`
138+
139+
The Benchmark **Timers** used by Debug Toolbar now collect *Required Before Filters*
140+
and *Required After Filters* data.
141+
142+
The benchmark points have been changed:
143+
144+
- Before
145+
146+
- ``bootstrap``: Creating Request and Response objects, Event ``pre_system``, Instantiating RouteCollection object, Loading Routes files, Instantiating Router object,
147+
- ``routing``: Routing,
148+
- After
149+
150+
- ``bootstrap``: Creating Request and Response objects, Event ``pre_system``.
151+
- ``required_before_filters``: Instantiating Filters object, Running *Required Before Filters*.
152+
- ``routing``: Instantiating RouteCollection object, Loading Routes files, Instantiating Router object, Routing,
153+
154+
Others
155+
======
156+
157+
- **AutoRouting Improved:** The ``$translateUriToCamelCase`` option has been added
158+
that allows using CamelCase controller and method names. See
159+
:ref:`controller-translate-uri-to-camelcase`.
160+
- **Routing:**
161+
- Added option ``$multipleSegmentsOneParam``. When this option is
162+
enabled, a placeholder that matches multiple segments, such as ``(:any)``, will
163+
be passed directly as it is to one parameter, even if it contains multiple segments.
164+
See :ref:`multiple-uri-segments-as-one-parameter` for details.
165+
- Now the 404 controller's method that you set in ``$override404`` also receive
166+
a ``PageNotFoundException`` message as the first parameter.
167+
- Now you can use the ``__invoke()`` method as the default method. See
168+
:ref:`routing-default-method`.
169+
- **Autoloader:**
170+
- Autoloading performance when using Composer has been improved.
171+
Adding the ``App`` namespace in the ``autoload.psr4`` setting in **composer.json**
172+
may also improve the performance of your app. See :ref:`autoloader-application-namespace`.
173+
- FileLocator Caching implemented. See :ref:`file-locator-caching` for details.
174+
- ``FileLocatorInterface`` has been added.
175+
- **CodeIgniter:** Added a pseudo-variable ``{memory_usage}`` to show your memory
176+
usage in your view files, which was supported by CodeIgniter 3.
177+
- **CSP:** Added ``ContentSecurityPolicy::clearDirective()`` method to clear
178+
existing CSP directives. See :ref:`csp-clear-directives`.
179+
- **Events:** Added event points ``pre_command`` and ``post_command`` for Spark
180+
commands. See :ref:`Event Points <event-points-for-cli-apps>`.
181+
- **HTTP:** Added ``Message::addHeader()`` method to add another header with
182+
the same name. See :php:meth:`CodeIgniter\\HTTP\\Message::addHeader()`.
183+
- **Web Page Caching:** ``ResponseCache`` has been improved to include the request
184+
HTTP method in the cache key. This means that the same URI will be cached separately
185+
if the HTTP method is different.
186+
20187
********
21188
BREAKING
22189
********
@@ -246,173 +413,6 @@ Others
246413
``CodeIgniter\Entity\Entity`` instead.
247414
- **spark:** The deprecated constant ``SPARKED`` has been removed.
248415

249-
************
250-
Enhancements
251-
************
252-
253-
Commands
254-
========
255-
256-
- Added ``spark make:test`` command to generate a skeleton test file. See
257-
:ref:`cli-generators-make-test` for the details.
258-
- Added ``spark config:check`` command to check Config values. See
259-
:ref:`confirming-config-values` for the details.
260-
- Added ``spark lang:find`` command to update translations keys. See :ref:`generating-translation-files-via-command` for the details.
261-
- The ``--dbgroup`` option has been added to the ``spark db:table`` command.
262-
See :ref:`Database Commands <db-command-specify-the-dbgroup>`.
263-
264-
Testing
265-
=======
266-
267-
- **DomParser:** The new methods were added ``seeXPath()`` and ``dontSeeXPath()``
268-
which allows users to work directly with DOMXPath object, using complex expressions.
269-
- **CLI:** The new ``InputOutput`` class was added and now you can write tests
270-
for commands more easily if you use ``MockInputOutput``.
271-
See :ref:`using-mock-input-output`.
272-
- **TestResponse:** TestResponse no longer extends ``PHPUnit\Framework\TestCase`` as it
273-
is not a test. Assertions' return types are now natively typed ``void``.
274-
275-
Database
276-
========
277-
278-
Query Builder
279-
-------------
280-
281-
.. _v450-query-builder-limit-0-behavior:
282-
283-
limit(0) Behavior
284-
^^^^^^^^^^^^^^^^^
285-
286-
- Added a feature flag ``Feature::$limitZeroAsAll`` to fix the incorrect behavior
287-
of ``limit(0)``.
288-
- If ``LIMIT 0`` is specified in a SQL statement, 0 records are returned. However,
289-
there is a bug in the Query Builder, and if ``limit(0)`` is specified, the
290-
generated SQL statement will have no ``LIMIT`` clause and all records will be
291-
returned.
292-
- It is recommended that ``$limitZeroAsAll`` in **app/Config/Feature.php** be set
293-
to ``false`` as this incorrect behavior will be fixed in a future version. See
294-
also :ref:`v450-model-findall-limit-0-behavior`.
295-
296-
Forge
297-
-----
298-
299-
Others
300-
------
301-
302-
Model
303-
=====
304-
305-
Model Field Casting
306-
-------------------
307-
308-
Added a feature to convert data retrieved from a database into the appropriate
309-
PHP type. See :ref:`model-field-casting` for details.
310-
311-
.. _v450-model-findall-limit-0-behavior:
312-
313-
findAll(0) Behavior
314-
-------------------
315-
316-
- Added a feature flag ``Feature::$limitZeroAsAll`` to fix the incorrect behavior
317-
of ``limit(0)`` for Query Builder. See :ref:`v450-query-builder-limit-0-behavior`
318-
for details.
319-
- If you disable this flag, you need to change code like ``findAll(0, $offset)``
320-
to ``findAll(null, $offset)``.
321-
322-
$updateOnlyChanged
323-
------------------
324-
325-
Added a property ``$updateOnlyChanged`` whether to update
326-
:doc:`Entity <../models/entities>`'s only changed fields. If you set this property
327-
to ``false``, when you are updating an Entity, ``DataException``
328-
"There is no data to update" will not raise even if the values in the Entity have
329-
not changed.
330-
331-
See :ref:`Using CodeIgniter’s Model <model-update-only-changed>` for details.
332-
333-
Saving Dates
334-
------------
335-
336-
Now you can configure the date/time format when you save :doc:`Time <../libraries/time>`
337-
instances. See :ref:`model-saving-dates` for details.
338-
339-
Libraries
340-
=========
341-
342-
- **Validation:**
343-
- Added the new rule ``field_exists`` that checks the filed exists in the
344-
data to be validated.
345-
- The ``$dbGroup`` parameter of ``Validation::run()`` now accepts not only
346-
a database group name, but also a database connection instance or an array
347-
of database settings.
348-
349-
Helpers and Functions
350-
=====================
351-
352-
.. _v450-required-filters:
353-
354-
Required Filters
355-
================
356-
357-
New :ref:`Required Filters <filters-required>` have been introduced. They are
358-
special filters that are applied before and after other kinds of filters, and
359-
always applied even if a route does not exist.
360-
361-
The following existing functionalities have been reimplemented as Required Filters.
362-
363-
- :ref:`Force Global Secure Requests <forcehttps>`
364-
- :doc:`../general/caching`
365-
- :ref:`performancemetrics`
366-
- :ref:`the-debug-toolbar`
367-
368-
The Benchmark **Timers** used by Debug Toolbar now collect *Required Before Filters*
369-
and *Required After Filters* data.
370-
371-
The benchmark points have been changed:
372-
373-
- Before
374-
375-
- ``bootstrap``: Creating Request and Response objects, Event ``pre_system``, Instantiating RouteCollection object, Loading Routes files, Instantiating Router object,
376-
- ``routing``: Routing,
377-
- After
378-
379-
- ``bootstrap``: Creating Request and Response objects, Event ``pre_system``.
380-
- ``required_before_filters``: Instantiating Filters object, Running *Required Before Filters*.
381-
- ``routing``: Instantiating RouteCollection object, Loading Routes files, Instantiating Router object, Routing,
382-
383-
Others
384-
======
385-
386-
- **AutoRouting Improved:** The ``$translateUriToCamelCase`` option has been added
387-
that allows using CamelCase controller and method names. See
388-
:ref:`controller-translate-uri-to-camelcase`.
389-
- **Routing:**
390-
- Added option ``$multipleSegmentsOneParam``. When this option is
391-
enabled, a placeholder that matches multiple segments, such as ``(:any)``, will
392-
be passed directly as it is to one parameter, even if it contains multiple segments.
393-
See :ref:`multiple-uri-segments-as-one-parameter` for details.
394-
- Now the 404 controller's method that you set in ``$override404`` also receive
395-
a ``PageNotFoundException`` message as the first parameter.
396-
- Now you can use the ``__invoke()`` method as the default method. See
397-
:ref:`routing-default-method`.
398-
- **Autoloader:**
399-
- Autoloading performance when using Composer has been improved.
400-
Adding the ``App`` namespace in the ``autoload.psr4`` setting in **composer.json**
401-
may also improve the performance of your app. See :ref:`autoloader-application-namespace`.
402-
- FileLocator Caching implemented. See :ref:`file-locator-caching` for details.
403-
- ``FileLocatorInterface`` has been added.
404-
- **CodeIgniter:** Added a pseudo-variable ``{memory_usage}`` to show your memory
405-
usage in your view files, which was supported by CodeIgniter 3.
406-
- **CSP:** Added ``ContentSecurityPolicy::clearDirective()`` method to clear
407-
existing CSP directives. See :ref:`csp-clear-directives`.
408-
- **Events:** Added event points ``pre_command`` and ``post_command`` for Spark
409-
commands. See :ref:`Event Points <event-points-for-cli-apps>`.
410-
- **HTTP:** Added ``Message::addHeader()`` method to add another header with
411-
the same name. See :php:meth:`CodeIgniter\\HTTP\\Message::addHeader()`.
412-
- **Web Page Caching:** ``ResponseCache`` has been improved to include the request
413-
HTTP method in the cache key. This means that the same URI will be cached separately
414-
if the HTTP method is different.
415-
416416
***************
417417
Message Changes
418418
***************

0 commit comments

Comments
 (0)