Skip to content

Commit f9679ec

Browse files
authored
Merge pull request #8219 from kenjis/change-error_reporting-in-production
config: change the default error reporting level in production
2 parents e7795a9 + 017a5c4 commit f9679ec

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

app/Config/Boot/production.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
|
1010
| If you set 'display_errors' to '1', CI4's detailed error report will show.
1111
*/
12+
error_reporting(E_ALL & ~E_DEPRECATED);
13+
// If you want to suppress more types of errors.
14+
// error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
1215
ini_set('display_errors', '0');
13-
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
1416

1517
/*
1618
|--------------------------------------------------------------------------

user_guide_src/source/changelogs/v4.5.0.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ Changes
315315
- **Config:**
316316
- ``Config\Feature::$multipleFilters`` has been removed, because now
317317
:ref:`multiple-filters` are always enabled.
318+
- The default error level in the production environment
319+
(**app/Config/Boot/production.php**) has been changed to ``E_ALL & ~E_DEPRECATED``
320+
to match the default **php.ini** for production.
318321
- **RouteCollection:** The HTTP method keys in the protected property ``$routes``
319322
has been fixed from lowercase to uppercase.
320323

user_guide_src/source/installation/upgrade_450.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ The ``'toolbar'`` in the ``$global['after']`` was removed.
255255
Others
256256
^^^^^^
257257

258+
- app/Config/Boot/production.php
259+
- The default error level to ``error_reporting()`` has been changed to ``E_ALL & ~E_DEPRECATED``.
258260
- app/Config/Database.php
259261
- The default value of ``charset`` in ``$default`` has been change to ``utf8mb4``.
260262
- The default value of ``DBCollat`` in ``$default`` has been change to ``utf8mb4_general_ci``.

0 commit comments

Comments
 (0)