File tree Expand file tree Collapse file tree
user_guide_src/source/installation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,22 +25,21 @@ Upgrade Guide
25251. You have to change the values in the default CI4 config files according to the
2626 changes in the CI3 files. The config names are pretty much the same as in CI3.
27272. If you are using custom config files in your CI3 project you have to create those
28- files as new PHP classes in your CI4 project in `` app/Config/ `` . These classes
28+ files as new PHP classes in your CI4 project in ** app/Config ** . These classes
2929 should be in the ``Config `` namespace and should extend ``CodeIgniter\Config\BaseConfig ``.
30303. Once you have created all custom config classes, you have to copy the variables
3131 from the CI3 config into the new CI4 config class as public class properties.
32324. Now, you have to change the config fetching syntax everywhere you fetch config
3333 values. The CI3 syntax is something like ``$this->config->item('item_name'); ``.
34- You have to change this into ``config('MyConfigFile')->item_name; ``. Alternatively,
35- you can use the object-oriented approach: ``CodeIgniter\Config\Config::get('MyConfigFile')->item_name; ``
34+ You have to change this into ``config('MyConfigFile')->item_name; ``.
3635
3736Code Example
3837============
3938
4039CodeIgniter Version 3.11
4140------------------------
4241
43- Path: `` application/models `` ::
42+ Path: ** application/config ** ::
4443
4544 <?php
4645
@@ -52,7 +51,7 @@ Path: ``application/models``::
5251CodeIgniter Version 4.x
5352-----------------------
5453
55- Path: `` app/Config `` ::
54+ Path: ** app/Config ** ::
5655
5756 <?php
5857
You can’t perform that action at this time.
0 commit comments