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/general/errors.rst
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,12 +94,26 @@ Logging Deprecation Warnings
94
94
95
95
.. versionadded:: 4.3.0
96
96
97
-
By default, all errors reported by ``error_reporting()`` will be thrown as an ``ErrorException`` object. These
98
-
include both ``E_DEPRECATED`` and ``E_USER_DEPRECATED`` errors. With the surge in use of PHP 8.1+, many users
99
-
may see exceptions thrown for `passing null to non-nullable arguments of internal functions <https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg>`_.
100
-
To ease the migration to PHP 8.1, you can instruct CodeIgniter to log the deprecations instead of throwing them.
97
+
Prior to v4.3.0, all errors reported by ``error_reporting()`` will be thrown as
98
+
an ``ErrorException`` object.
101
99
102
-
First, make sure your copy of ``Config\Exceptions`` is updated with the two new properties and set as follows:
100
+
But with the surge in use of PHP 8.1+, many users may see exceptions thrown for
101
+
`passing null to non-nullable arguments of internal functions <https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg>`_.
102
+
103
+
To ease the migration to PHP 8.1, starting with v4.3.0, CodeIgniter has the feature
104
+
that only logs the deprecation errors (``E_DEPRECATED`` and ``E_USER_DEPRECATED``)
105
+
without throwing them as exceptions.
106
+
107
+
By default, CodeIgniter will only log deprecations without throwing exceptions in
108
+
development environment. In production environment, no logging is done and no
109
+
exceptions are thrown.
110
+
111
+
Configuration
112
+
^^^^^^^^^^^^^
113
+
114
+
The settings for this feature are as follows.
115
+
First, make sure your copy of ``Config\Exceptions`` is updated with the two new
0 commit comments