diff --git a/app/Config/Boot/production.php b/app/Config/Boot/production.php index 73c7c60afbc7..1822cf583f82 100644 --- a/app/Config/Boot/production.php +++ b/app/Config/Boot/production.php @@ -9,8 +9,10 @@ | | If you set 'display_errors' to '1', CI4's detailed error report will show. */ +error_reporting(E_ALL & ~E_DEPRECATED); +// If you want to suppress more types of errors. +// error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); ini_set('display_errors', '0'); -error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); /* |-------------------------------------------------------------------------- diff --git a/user_guide_src/source/changelogs/v4.5.0.rst b/user_guide_src/source/changelogs/v4.5.0.rst index 31c8b3bd114a..b25bb473b5a3 100644 --- a/user_guide_src/source/changelogs/v4.5.0.rst +++ b/user_guide_src/source/changelogs/v4.5.0.rst @@ -313,6 +313,9 @@ Changes - **Config:** - ``Config\Feature::$multipleFilters`` has been removed, because now :ref:`multiple-filters` are always enabled. + - The default error level in the production environment + (**app/Config/Boot/production.php**) has been changed to ``E_ALL & ~E_DEPRECATED`` + to match the default **php.ini** for production. - **RouteCollection:** The HTTP method keys in the protected property ``$routes`` has been fixed from lowercase to uppercase. diff --git a/user_guide_src/source/installation/upgrade_450.rst b/user_guide_src/source/installation/upgrade_450.rst index c81ad21ab1d7..6b0f88a93ea4 100644 --- a/user_guide_src/source/installation/upgrade_450.rst +++ b/user_guide_src/source/installation/upgrade_450.rst @@ -255,6 +255,8 @@ The ``'toolbar'`` in the ``$global['after']`` was removed. Others ^^^^^^ +- app/Config/Boot/production.php + - The default error level to ``error_reporting()`` has been changed to ``E_ALL & ~E_DEPRECATED``. - app/Config/Database.php - The default value of ``charset`` in ``$default`` has been change to ``utf8mb4``. - The default value of ``DBCollat`` in ``$default`` has been change to ``utf8mb4_general_ci``.