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.3.0.rst
+19-8Lines changed: 19 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,18 @@ Exceptions when Database Errors Occur
27
27
28
28
- The exceptions thrown by the database connection classes have been changed to ``CodeIgniter\Database\Exceptions\DatabaseException``. Previously, different database drivers threw different exception classes, but these have been unified into ``DatabaseException``.
29
29
- The exceptions thrown by the ``execute()`` method of Prepared Queries have been changed to ``DatabaseException``. Previously, different database drivers might throw different exception classes or did not throw exceptions, but these have been unified into ``DatabaseException``.
30
+
- ``DBDebug`` and ``CI_DEBUG``
31
+
32
+
- To be consistent in behavior regardless of environments, ``Config\Database::$default['DBDebug']``
33
+
and ``Config\Database::$tests['DBDebug']`` has been changed to ``true`` by default. With these
34
+
settings, an exception is always thrown when a database error occurs.
35
+
- Now ``DatabaseException`` thrown in ``BaseBuilder`` is thrown if ``$DBDebug`` is true.
36
+
Previously, it is thrown if ``CI_DEBUG`` is true.
37
+
- The default value of ``BaseConnection::$DBDebug`` has been changed to ``true``.
38
+
- With these changes, ``DBDebug`` **now means whether or not to throw an exception when an error occurs**.
39
+
Although unrelated to debugging, the name has not been changed.
40
+
- Now when you delete without WHERE clause in ``Model``, ``DatabaseException`` is thrown even if
41
+
``CI_DEBUG`` is false. Previously, it is thrown if ``CI_DEBUG`` is true.
30
42
31
43
HTTP Status Code and Exit Code when Exception Occurs
The following methods of the :doc:`Time <../libraries/time>` class had bugs that changed the state of the current object. To fix these bugs, the Time class has been fixed:
63
+
51
64
- ``add()``
52
65
- ``modify()``
53
66
- ``setDate()``
@@ -113,6 +126,7 @@ ValidationInterface
113
126
114
127
- The third parameter ``$dbGroup`` for ``ValidationInterface::run()`` has been added.
115
128
- The following methods are added to the interface:
129
+
116
130
- ``ValidationInterface::setRule()``
117
131
- ``ValidationInterface::getRules()``
118
132
- ``ValidationInterface::getRuleGroup()``
@@ -148,8 +162,10 @@ Database Forge
148
162
- The method signature of ``Forge::addPrimaryKey()`` has changed. An additional optional parameter ``$keyName`` has been added.
149
163
- The method signature of ``Forge::addUniqueKey()`` has changed. An additional optional parameter ``$keyName`` has been added.
150
164
- The following method has an additional ``$asQuery`` parameter. When set to ``true`` the method returns a stand alone SQL query.
- **API:** The return type of ``API\ResponseTrait::failServerError()`` has been changed to ``ResponseInterface``.
160
176
- The following methods have been changed to accept ``ResponseInterface`` as a parameter instead of ``Response``.
177
+
161
178
- ``Debug\Exceptions::__construct()``
162
179
- ``Services::exceptions()``
163
180
@@ -247,6 +264,8 @@ Error Handling
247
264
- To *temporarily* enable throwing of deprecations, set the environment variable ``CODEIGNITER_SCREAM_DEPRECATIONS`` to a truthy value.
248
265
- ``Config\Logger::$threshold`` is now, by default, environment-specific. For production environment, default threshold is still ``4`` but changed to ``9`` for other environments.
249
266
267
+
.. _v430-multiple-domain-support:
268
+
250
269
Multiple Domain Support
251
270
=======================
252
271
@@ -274,14 +293,6 @@ Changes
274
293
275
294
- Config
276
295
- All atomic type properties in ``Config`` classes have been typed.
277
-
- Changed the default setting to not redirect when a CSRF check fails so that it is easy to see that it is a CSRF error.
278
-
- The default ``Config\App::$appTimezone`` has been changed to ``UTC`` to avoid being affected by daylight saving time.
279
-
- DBDebug and CI_DEBUG
280
-
- To be consistent in behavior regardless of environments, ``Config\Database::$default['DBDebug']`` and ``Config\Database::$tests['DBDebug']`` has been changed to ``true`` by default. With these settings, an exception is always thrown when a database error occurs.
281
-
- Now ``DatabaseException`` thrown in ``BaseBuilder`` is thrown if ``$DBDebug`` is true. Previously, it is thrown if ``CI_DEBUG`` is true.
282
-
- The default value of ``BaseConnection::$DBDebug`` has been changed to ``true``.
283
-
- With these changes, ``DBDebug`` now means whether or not to throw an exception when an error occurs. Although unrelated to debugging, the name has not been changed.
284
-
- Now when you delete without WHERE clause in ``Model``, ``DatabaseException`` is thrown even if ``CI_DEBUG`` is false. Previously, it is thrown if ``CI_DEBUG`` is true.
285
296
- Changed the processing of Spark commands:
286
297
- The ``CodeIgniter\CodeIgniter`` no longer handles Spark commands.
287
298
- The ``CodeIgniter::isSparked()`` method has been removed.
@@ -186,11 +194,6 @@ The data returned has the following structure::
186
194
* ]
187
195
*/
188
196
189
-
Others
190
-
======
191
-
192
-
- The exception classes may be changed when database errors occur. If you catch the exceptions, you must confirm that your code can catch the exceptions. See :ref:`exceptions-when-database-errors-occur` for details.
193
-
194
197
Breaking Enhancements
195
198
*********************
196
199
@@ -228,20 +231,45 @@ Content Changes
228
231
The following files received significant changes (including deprecations or visual adjustments)
229
232
and it is recommended that you merge the updated versions with your application:
230
233
231
-
* ``app/Config/DocTypes.php``
232
-
* The property ``$html5`` to determine whether to remove the solidus (``/``) character for void HTML elements (e.g. ``<input>``) is added, and set to ``true`` by default for HTML5 compatibility.
233
-
* ``app/Config/Exceptions.php``
234
-
* Two additional public properties were added: ``$logDeprecations`` and ``$deprecationLogLevel``.
235
-
* ``app/Config/Routes.php``
236
-
* Due to the fact that the approach to running Spark Commands has changed, there is no longer a need to load the internal routes of the framework.
234
+
Config
235
+
------
236
+
237
+
- app/Config/App.php
238
+
- The new property ``$allowedHostnames`` is added to set allowed hostnames in the site URL
239
+
other than the hostname in the ``$baseURL``. See :ref:`v430-multiple-domain-support`.
240
+
- The property ``$appTimezone`` has been changed to ``UTC`` to avoid being affected
241
+
by daylight saving time.
242
+
- app/Config/Autoload.php
243
+
- The new property ``$helpers`` is added to autoload helpers.
244
+
- app/Config/Database.php
245
+
- ``$default['DBDebug']`` and ``$test['DBDebug']`` are changed to ``true`` by default.
246
+
See :ref:`exceptions-when-database-errors-occur`.
247
+
- app/Config/DocTypes.php
248
+
- The property ``$html5`` to determine whether to remove the solidus (``/``) character for void HTML
249
+
elements (e.g. ``<input>``) is added, and set to ``true`` by default for HTML5 compatibility.
250
+
- app/Config/Encryption.php
251
+
- The new property ``$rawData``, ``$encryptKeyInfo``, and ``$authKeyInfo`` are added for for CI3
252
+
Encryption compatibility. See :ref:`encryption-compatible-with-ci3`.
253
+
- app/Config/Exceptions.php
254
+
- Two additional public properties were added: ``$logDeprecations`` and ``$deprecationLogLevel``.
255
+
See See :ref:`logging_deprecation_warnings` for details.
256
+
- app/Config/Modules.php
257
+
- The new property ``$composerPackages`` is added to limit Composer package Auto-Discovery for better
258
+
performance.
259
+
- app/Config/Routes.php
260
+
- Due to the fact that the approach to running Spark Commands has changed, there is no longer a need
261
+
to load the internal routes of the framework (``SYSTEMPATH . 'Config/Routes.php'``).
262
+
- app/Config/Security.php
263
+
- Changed the value of the property ``$redirect`` to ``false`` to prevent redirection when a CSRF
264
+
check fails. This is to make it easier to recognize that it is a CSRF error.
237
265
238
266
All Changes
239
267
===========
240
268
241
269
This is a list of all files in the **project space** that received changes;
242
270
many will be simple comments or formatting that have no effect on the runtime:
0 commit comments