Skip to content

Commit 3ed4329

Browse files
committed
docs: app/Config/Filters.php changes are not mandatory
1 parent 1217561 commit 3ed4329

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

user_guide_src/source/installation/upgrade_450.rst

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,6 @@ Please refer to the upgrade instructions corresponding to your installation meth
1515
Mandatory File Changes
1616
**********************
1717

18-
Config Files
19-
============
20-
21-
app/Config/Filters.php
22-
----------------------
23-
24-
Required Filters have been added, so add that setting. See
25-
:ref:`Upgrading <v450-required-filters>` for details.
26-
27-
Add the following items in the ``$aliases`` property::
28-
29-
public array $aliases = [
30-
// ...
31-
'forcehttps' => \CodeIgniter\Filters\ForceHTTPS::class,
32-
'pagecache' => \CodeIgniter\Filters\PageCache::class,
33-
'performance' => \CodeIgniter\Filters\PerformanceMetrics::class,
34-
];
35-
36-
Add the new property ``$required``, and set the following::
37-
38-
public array $required = [
39-
'before' => [
40-
'forcehttps', // Force Global Secure Requests
41-
'pagecache', // Web Page Caching
42-
],
43-
'after' => [
44-
'pagecache', // Web Page Caching
45-
'performance', // Performance Metrics
46-
'toolbar', // Debug Toolbar
47-
],
48-
];
49-
50-
Remove ``'toolbar'`` from the ``$global['after']``.
51-
5218
Breaking Changes
5319
****************
5420

@@ -251,6 +217,44 @@ and it is recommended that you merge the updated versions with your application:
251217
Config
252218
------
253219

220+
app/Config/Filters.php
221+
^^^^^^^^^^^^^^^^^^^^^^
222+
223+
Required Filters have been added, so the following changes were made. See also
224+
:ref:`Upgrading <v450-required-filters>`.
225+
226+
The base class has been changed::
227+
228+
class Filters extends \CodeIgniter\Config\Filters
229+
230+
The following items are added in the ``$aliases`` property::
231+
232+
public array $aliases = [
233+
// ...
234+
'forcehttps' => \CodeIgniter\Filters\ForceHTTPS::class,
235+
'pagecache' => \CodeIgniter\Filters\PageCache::class,
236+
'performance' => \CodeIgniter\Filters\PerformanceMetrics::class,
237+
];
238+
239+
A new property ``$required`` is added, and set as the following::
240+
241+
public array $required = [
242+
'before' => [
243+
'forcehttps', // Force Global Secure Requests
244+
'pagecache', // Web Page Caching
245+
],
246+
'after' => [
247+
'pagecache', // Web Page Caching
248+
'performance', // Performance Metrics
249+
'toolbar', // Debug Toolbar
250+
],
251+
];
252+
253+
The ``'toolbar'`` in the ``$global['after']`` was removed.
254+
255+
Others
256+
^^^^^^
257+
254258
- app/Config/Database.php
255259
- The default value of ``charset`` in ``$default`` has been change to ``utf8mb4``.
256260
- The default value of ``DBCollat`` in ``$default`` has been change to ``utf8mb4_general_ci``.

0 commit comments

Comments
 (0)