From cbce137f18926d7892ff53cbd2711134d0ed1c8e Mon Sep 17 00:00:00 2001 From: kenjis Date: Sun, 19 Nov 2023 11:54:48 +0900 Subject: [PATCH] docs: app/Config/Filters.php changes are not mandatory --- .../source/installation/upgrade_450.rst | 72 ++++++++++--------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/user_guide_src/source/installation/upgrade_450.rst b/user_guide_src/source/installation/upgrade_450.rst index 2758527b473d..727df3976f5d 100644 --- a/user_guide_src/source/installation/upgrade_450.rst +++ b/user_guide_src/source/installation/upgrade_450.rst @@ -15,40 +15,6 @@ Please refer to the upgrade instructions corresponding to your installation meth Mandatory File Changes ********************** -Config Files -============ - -app/Config/Filters.php ----------------------- - -Required Filters have been added, so add that setting. See -:ref:`Upgrading ` for details. - -Add the following items in the ``$aliases`` property:: - - public array $aliases = [ - // ... - 'forcehttps' => \CodeIgniter\Filters\ForceHTTPS::class, - 'pagecache' => \CodeIgniter\Filters\PageCache::class, - 'performance' => \CodeIgniter\Filters\PerformanceMetrics::class, - ]; - -Add the new property ``$required``, and set the following:: - - public array $required = [ - 'before' => [ - 'forcehttps', // Force Global Secure Requests - 'pagecache', // Web Page Caching - ], - 'after' => [ - 'pagecache', // Web Page Caching - 'performance', // Performance Metrics - 'toolbar', // Debug Toolbar - ], - ]; - -Remove ``'toolbar'`` from the ``$global['after']``. - Breaking Changes **************** @@ -199,6 +165,44 @@ and it is recommended that you merge the updated versions with your application: Config ------ +app/Config/Filters.php +^^^^^^^^^^^^^^^^^^^^^^ + +Required Filters have been added, so the following changes were made. See also +:ref:`Upgrading `. + +The base class has been changed:: + + class Filters extends \CodeIgniter\Config\Filters + +The following items are added in the ``$aliases`` property:: + + public array $aliases = [ + // ... + 'forcehttps' => \CodeIgniter\Filters\ForceHTTPS::class, + 'pagecache' => \CodeIgniter\Filters\PageCache::class, + 'performance' => \CodeIgniter\Filters\PerformanceMetrics::class, + ]; + +A new property ``$required`` is added, and set as the following:: + + public array $required = [ + 'before' => [ + 'forcehttps', // Force Global Secure Requests + 'pagecache', // Web Page Caching + ], + 'after' => [ + 'pagecache', // Web Page Caching + 'performance', // Performance Metrics + 'toolbar', // Debug Toolbar + ], + ]; + +The ``'toolbar'`` in the ``$global['after']`` was removed. + +Others +^^^^^^ + - 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``.