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
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,10 +134,10 @@ Since v4.3.0, you can specify the exit code for your Exception class to implemen
134
134
135
135
When an exception implementing ``HasExitCodeInterface`` is caught by CodeIgniter's exception handler, the code returned from the ``getExitCode()`` method will become the exit code.
136
136
137
-
.. _logging_deprecation_errors:
137
+
.. _logging_deprecation_warnings:
138
138
139
-
Logging Deprecation Errors
140
-
==========================
139
+
Logging Deprecation Warnings
140
+
============================
141
141
142
142
.. versionadded:: 4.3.0
143
143
@@ -152,7 +152,7 @@ First, make sure your copy of ``Config\Exceptions`` is updated with the two new
152
152
153
153
Next, depending on the log level you set in ``Config\Exceptions::$deprecationLogLevel``, check whether the
154
154
logger threshold defined in ``Config\Logger::$threshold`` covers the deprecation log level. If not, adjust
155
-
it accordingly.
155
+
it accordingly. In default installations starting with ``v4.3.0``, this is set to ``5``.
156
156
157
157
.. literalinclude:: errors/013.php
158
158
@@ -161,3 +161,6 @@ After that, subsequent deprecations will be logged instead of thrown.
161
161
This feature also works with user deprecations:
162
162
163
163
.. literalinclude:: errors/014.php
164
+
165
+
For testing your application you may want to always throw on deprecations. You may configure this by
166
+
setting the environment variable ``CODEIGNITER_SCREAM_DEPRECATIONS`` to a truthy value.
0 commit comments