Skip to content

Commit 3e4d247

Browse files
authored
Merge pull request #5399 from kenjis/fix-docs-upgrade_configuration.rst
docs: fix upgrade_configuration.rst
2 parents 865c5cb + 748b11a commit 3e4d247

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

user_guide_src/source/installation/upgrade_configuration.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,21 @@ Upgrade Guide
2525
1. 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.
2727
2. 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``.
3030
3. 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.
3232
4. 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

3736
Code Example
3837
============
3938

4039
CodeIgniter Version 3.11
4140
------------------------
4241

43-
Path: ``application/models``::
42+
Path: **application/config**::
4443

4544
<?php
4645

@@ -52,7 +51,7 @@ Path: ``application/models``::
5251
CodeIgniter Version 4.x
5352
-----------------------
5453

55-
Path: ``app/Config``::
54+
Path: **app/Config**::
5655

5756
<?php
5857

0 commit comments

Comments
 (0)