Skip to content

Commit b0424df

Browse files
authored
Merge pull request #5396 from kenjis/fix-docs-upgrade_4xx.rst
docs: fix upgrade_4xx.rst
2 parents 5862d46 + c28b5d1 commit b0424df

1 file changed

Lines changed: 15 additions & 17 deletions

File tree

user_guide_src/source/installation/upgrade_4xx.rst

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,26 @@ General Adjustments
3939

4040
**Application Structure**
4141

42-
- The ``application`` folder is renamed as ``app`` and the framework still has ``system`` folders,
42+
- The **application** folder is renamed as **app** and the framework still has **system** folders,
4343
with the same interpretation as before.
44-
- The framework now provides for a ``public`` folder, intended as the document root for your app.
45-
- There is also a ``writable`` folder, to hold cache data, logs, and session data.
46-
- The ``app`` folder looks very similar to ``application`` for CI3, with some
47-
name changes, and some subfolders moved to the ``writable`` folder.
48-
- There is no longer a nested ``application/core`` folder, as we have
44+
- The framework now provides for a **public** folder, intended as the document root for your app.
45+
- There is also a **writable** folder, to hold cache data, logs, and session data.
46+
- The **app** folder looks very similar to **application** for CI3, with some
47+
name changes, and some subfolders moved to the **writable** folder.
48+
- There is no longer a nested **application/core** folder, as we have
4949
a different mechanism for extending framework components (see below).
5050

5151
**Model, View and Controller**
5252

5353
- CodeIgniter is based on the MVC concept. Thus, the changes on the Model, View and Controller
5454
are one of the most important things you have to handle.
55-
- In CodeIgniter 4, models are now located in ``app/Models`` and you have to add the lines
55+
- In CodeIgniter 4, models are now located in **app/Models** and you have to add the lines
5656
``namespace App\Models;`` along with ``use CodeIgniter\Model;`` right after the opening php tag.
5757
The last step is to replace ``extends CI_Model`` with ``extends Model``.
58-
- The views of CodeIgniter 4 have been moved ``to app/Views``. Furthermore, you have to change
58+
- The views of CodeIgniter 4 have been moved to **app/Views**. Furthermore, you have to change
5959
the syntax of loading views from ``$this->load->view('directory_name/file_name')`` to
6060
``echo view('directory_name/file_name');``.
61-
- Controllers of CodeIgniter 4 have to be moved to ``app/Controllers;``. After that,
61+
- Controllers of CodeIgniter 4 have to be moved to **app/Controllers**. After that,
6262
add ``namespace App\Controllers;`` after the opening php tag.
6363
Lastly, replace ``extends CI_Controller`` with ``extends BaseController``.
6464
- For more information we recommend you the following upgrade guides, which will give
@@ -78,16 +78,14 @@ General Adjustments
7878
- Classes are instantiated where needed, and components are managed
7979
by ``Services``.
8080
- The class loader automatically handles PSR-4 style class locating,
81-
within the ``App`` (application) and ``CodeIgniter`` (i.e., system) top level
82-
namespaces; with composer autoloading support, and even using educated
83-
guessing to find your models and libraries if they are in the right
84-
folder even though not namespaced.
81+
within the ``App`` (**app**) and ``CodeIgniter`` (i.e., **system**) top level
82+
namespaces; with Composer autoloading support.
8583
- You can configure the class loading to support whatever application structure
8684
you are most comfortable with, including the "HMVC" style.
8785

8886
**Libraries**
8987

90-
- Your app classes can still go inside ``app/Libraries``, but they don't have to.
88+
- Your app classes can still go inside **app/Libraries**, but they don't have to.
9189
- Instead of CI3's ``$this->load->library(x);`` you can now use
9290
``$this->x = new X();``, following namespaced conventions for your component.
9391

@@ -107,18 +105,18 @@ General Adjustments
107105

108106
**Extending the framework**
109107

110-
- You don't need a ``core`` folder to hold ``MY_...`` framework
108+
- You don't need a **core** folder to hold ``MY_...`` framework
111109
component extensions or replacements.
112110
- You don't need ``MY_x`` classes inside your libraries folder
113111
to extend or replace CI4 pieces.
114112
- Make any such classes where you like, and add appropriate
115-
service methods in ``app/Config/Services.php`` to load
113+
service methods in **app/Config/Services.php** to load
116114
your components instead of the default ones.
117115

118116
Upgrading Libraries
119117
===================
120118

121-
- Your app classes can still go inside ``app/Libraries``, but they don’t have to.
119+
- Your app classes can still go inside **app/Libraries**, but they don’t have to.
122120
- Instead of CI3’s ``$this->load->library(x);`` you can now use ``$this->x = new X();``,
123121
following namespaced conventions for your component.
124122
- Some libraries from CodeIgniter 3 no longer exists in Version 4. For all these

0 commit comments

Comments
 (0)