Skip to content

Commit 6a1a59f

Browse files
update installation docs
1 parent edf8a55 commit 6a1a59f

12 files changed

Lines changed: 98 additions & 76 deletions

user_guide_src/source/installation/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ However you choose to install and run CodeIgniter4, the
2626
`user guide <https://codeigniter4.github.io/userguide/>`_ is accessible online.
2727

2828
.. note:: Before using CodeIgniter 4, make sure that your server meets the
29-
:doc:`requirements </intro/requirements>`, in particular the PHP
30-
version and the PHP extensions that are needed.
31-
You may find that you have to uncomment the ``php.ini`` "extension"
32-
lines to enable "curl" and "intl", for instance.
29+
:doc:`requirements </intro/requirements>`, in particular the PHP
30+
version and the PHP extensions that are needed.
31+
You may find that you have to uncomment the ``php.ini`` "extension"
32+
lines to enable "curl" and "intl", for instance.

user_guide_src/source/installation/installing_composer.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Composer Installation
2-
###############################################################################
2+
#####################
33

44
.. contents::
55
:local:
@@ -18,7 +18,7 @@ webapp,
1818
when you clone the repository to a new system.
1919

2020
App Starter
21-
============================================================
21+
===========
2222

2323
The `CodeIgniter 4 app starter <https://github.com/codeigniter4/appstarter>`_
2424
repository holds a skeleton application, with a composer dependency on
@@ -28,7 +28,7 @@ This installation technique would suit a developer who wishes to start
2828
a new CodeIgniter4 based project.
2929

3030
Installation & Set Up
31-
-------------------------------------------------------
31+
---------------------
3232

3333
In the folder above your project root::
3434

@@ -51,7 +51,7 @@ A sample such installation command, using the default project-root "appstarter":
5151
After installation you should follow the steps in the "Upgrading" section.
5252

5353
Upgrading
54-
-------------------------------------------------------
54+
---------
5555

5656
Whenever there is a new release, then from the command line in your project root::
5757

@@ -71,17 +71,17 @@ would be appropriate to do so here too, i.e., ``composer update --no-dev``.
7171
Read the upgrade instructions, and check designated ``app/Config`` folders for affected changes.
7272

7373
Pros
74-
-------------------------------------------------------
74+
----
7575

7676
Simple installation; easy to update
7777

7878
Cons
79-
-------------------------------------------------------
79+
----
8080

8181
You still need to check for ``app/Config`` changes after updating
8282

8383
Structure
84-
-------------------------------------------------------
84+
---------
8585

8686
Folders in your project after set up:
8787

@@ -90,7 +90,7 @@ Folders in your project after set up:
9090
- vendor/codeigniter4/framework/app & public (compare with yours after updating when using ``--prefer-source``)
9191

9292
Latest Dev
93-
-------------------------------------------------------
93+
----------
9494

9595
The App Starter repo comes with a ``builds`` scripts to switch Composer sources between the
9696
current stable release and the latest development branch of the framework. Use this script
@@ -114,7 +114,7 @@ After using the ``builds`` command be sure to run ``composer update`` to sync yo
114114
folder with the latest target build.
115115

116116
Adding CodeIgniter4 to an Existing Project
117-
============================================================
117+
==========================================
118118

119119
The same `CodeIgniter 4 framework <https://github.com/codeigniter4/framework>`_
120120
repository described in "Manual Installation" can also be added to an
@@ -131,7 +131,7 @@ As with the earlier two composer install methods, you can omit installing
131131
phpunit and its dependencies by adding the ``--no-dev`` argument to the ``composer require`` command.
132132

133133
Set Up
134-
-------------------------------------------------------
134+
------
135135

136136
Copy the ``app``, ``public``, and ``writable`` folders from ``vendor/codeigniter4/framework``
137137
to your project root
@@ -143,7 +143,7 @@ You will have to adjust the system path to refer to the vendor one, e.g., ``ROOT
143143
- the ``$systemDirectory`` variable in ``app/Config/Paths.php``
144144

145145
Upgrading
146-
-------------------------------------------------------
146+
---------
147147

148148
Whenever there is a new release, then from the command line in your project root::
149149

@@ -153,17 +153,17 @@ Read the upgrade instructions, and check designated
153153
``app/Config`` folders for affected changes.
154154

155155
Pros
156-
-------------------------------------------------------
156+
----
157157

158158
Relatively simple installation; easy to update
159159

160160
Cons
161-
-------------------------------------------------------
161+
----
162162

163163
You still need to check for ``app/Config`` changes after updating
164164

165165
Structure
166-
-------------------------------------------------------
166+
---------
167167

168168
Folders in your project after set up:
169169

@@ -172,7 +172,7 @@ Folders in your project after set up:
172172

173173

174174
Translations Installation
175-
============================================================
175+
=========================
176176

177177
If you want to take advantage of the system message translations,
178178
they can be added to your project in a similar fashion.

user_guide_src/source/installation/installing_manual.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Manual Installation
2-
###############################################################################
2+
###################
33

44
The `CodeIgniter 4 framework <https://github.com/codeigniter4/framework>`_
55
repository holds the released versions of the framework.
@@ -13,18 +13,18 @@ folder!
1313
for `CodeIgniter 3 <https://codeigniter.com/user_guide/installation/index.html>`_.
1414

1515
Installation
16-
============================================================
16+
============
1717

1818
Download the `latest version <https://github.com/CodeIgniter4/framework/releases/latest>`_,
1919
and extract it to become your project root.
2020

2121
Setting Up
22-
-------------------------------------------------------
22+
----------
2323

2424
None
2525

2626
Upgrading
27-
-------------------------------------------------------
27+
---------
2828

2929
Download a new copy of the framework, and then follow the upgrade
3030
instructions in the release notice or changelog to merge that with your project.
@@ -33,24 +33,24 @@ Typically, you replace the ``system`` folder, and check designated
3333
``app/Config`` folders for affected changes.
3434

3535
Pros
36-
-------------------------------------------------------
36+
----
3737

3838
Download and run
3939

4040
Cons
41-
-------------------------------------------------------
41+
----
4242

4343
You are responsible for merge conflicts when updating
4444

4545
Structure
46-
-------------------------------------------------------
46+
---------
4747

4848
Folders in your project after set up:
4949
app, public, system, writable
5050

5151

5252
Translations Installation
53-
============================================================
53+
=========================
5454

5555
If you want to take advantage of the system message translations,
5656
they can be added to your project in a similar fashion.

user_guide_src/source/installation/running.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Running Your App
2-
###############################################################################
2+
################
33

44
.. contents::
55
:local:
@@ -13,7 +13,7 @@ If you’re new to CodeIgniter, please read the :doc:`Getting Started </intro/in
1313
section of the User Guide to begin learning how to build dynamic PHP applications. Enjoy!
1414

1515
Initial Configuration & Set Up
16-
=================================================
16+
==============================
1717

1818
#. Open the **app/Config/App.php** file with a text editor and
1919
set your base URL. If you need more flexibility, the baseURL may
@@ -37,7 +37,7 @@ to "development".
3737
web server.
3838

3939
Local Development Server
40-
=================================================
40+
========================
4141

4242
CodeIgniter 4 comes with a local development server, leveraging PHP's built-in web server
4343
with CodeIgniter routing. You can use the ``serve`` script to launch it,
@@ -71,7 +71,7 @@ The local development server can be customized with three command line options:
7171
php spark serve --php /usr/bin/php7.6.5.4
7272

7373
Hosting with Apache
74-
=================================================
74+
===================
7575

7676
A CodeIgniter4 webapp is normally hosted on a web server.
7777
Apache’s ``httpd`` is the "standard" platform, and assumed in much of our documentation.
@@ -80,7 +80,7 @@ Apache is bundled with many platforms, but can also be downloaded in a bundle
8080
with a database engine and PHP from `Bitnami <https://bitnami.com/stacks/infrastructure>`_.
8181

8282
.htaccess
83-
-------------------------------------------------------
83+
---------
8484

8585
The “mod_rewrite” module enables URLs without “index.php” in them, and is assumed
8686
in our user guide.
@@ -100,7 +100,7 @@ in the "AllowOverride" setting::
100100
</Directory>
101101

102102
Virtual Hosting
103-
-------------------------------------------------------
103+
---------------
104104

105105
We recommend using “virtual hosting” to run your apps.
106106
You can set up different aliases for each of the apps you work on,
@@ -130,14 +130,14 @@ If your project folder is not a subfolder of the Apache document root, then your
130130
<VirtualHost> element may need a nested <Directory> element to grant the web server access to the files.
131131

132132
Testing
133-
-------------------------------------------------------
133+
-------
134134

135135
With the above configuration, your webapp would be accessed with the URL ``http://myproject.local`` in your browser.
136136

137137
Apache needs to be restarted whenever you change its configuration.
138138

139139
Hosting with Nginx
140-
=================================================
140+
==================
141141
Nginx is the second most widely used HTTP server for web hosting.
142142
Here you can find an example configuration using PHP 7.3 FPM (unix sockets) under Ubuntu Server.
143143

@@ -176,7 +176,7 @@ This configuration enables URLs without “index.php” in them and using CodeIg
176176
}
177177
178178
Hosting with Vagrant
179-
=================================================
179+
====================
180180

181181
Virtualization is an effective way to test your webapp in the environment you
182182
plan to deploy on, even if you develop on a different one.
@@ -187,7 +187,7 @@ The codebase comes with a ``VagrantFile.dist``, that can be copied to ``VagrantF
187187
and tailored for your system, for instance enabling access to specific database or caching engines.
188188

189189
Setting Up
190-
-------------------------------------------------------
190+
----------
191191

192192
It assumes that you have installed `VirtualBox <https://www.virtualbox.org/wiki/Downloads>`_ and
193193
`Vagrant <https://www.vagrantup.com/downloads.html>`_
@@ -199,7 +199,7 @@ The Vagrant configuration file assumes you have set up a `ubuntu/bionic64 Vagran
199199
vagrant box add ubuntu/bionic64
200200

201201
Testing
202-
-------------------------------------------------------
202+
-------
203203

204204
Once set up, you can then launch your webapp inside a VM, with the command::
205205

@@ -210,7 +210,7 @@ report for your build at ``http://localhost:8081`` and the user guide for
210210
it at ``http://localhost:8082``.
211211

212212
Bootstrapping the App
213-
=================================================
213+
=====================
214214

215215
In some scenarios you will want to load the framework without actually running the whole
216216
application. This is particularly useful for unit testing your project, but may also be

user_guide_src/source/installation/troubleshooting.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Troubleshooting
55
Here are some common installation problems, and suggested workarounds.
66

77
How do I know if my install is working?
8-
------------------------------------------------------------------------
8+
---------------------------------------
99

1010
From the command line, at your project root::
1111

@@ -55,7 +55,7 @@ CodeIgniter equivalent, ``php spark serve`` from your project root.
5555
.. |CodeIgniter4 Welcome| image:: ../images/welcome.png
5656

5757
What's with an unhelpful "Whoops!" page?
58-
------------------------------------------------------
58+
----------------------------------------
5959

6060
You find that your app is displaying a page with "Whoops!" and
6161
then the text line "We seem to have hit a snag. Please try again later...".
@@ -70,7 +70,7 @@ You can see the error in the debug toolbar display by setting your environment t
7070
Don't forget to reset the environment to "production" once you fix the problem!
7171

7272
CodeIgniter Error Logs
73-
-------------------------------------------------------
73+
----------------------
7474

7575
CodeIgniter logs error messages, according to the settings in `app/Config/Logger.php`.
7676

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
######################################
1+
#############################
22
Upgrading from 4.1.1 to 4.1.2
3-
######################################
3+
#############################
44

55
**BaseConnection::query() return values**
66

@@ -9,7 +9,7 @@ even if the query failed. This method will now return ``false`` for failed queri
99
Exception if ``DBDebug==true``) and will return booleans for write-type queries. Review any use
1010
of ``query()`` method and be assess whether the value might be boolean instead of Result object.
1111
For a better idea of what queries are write-type queries, check ``BaseConnection::isWriteType()``
12-
and any DBMS-specific override ``isWriteType()`` in the relevant Connection class.
12+
and any DBMS-specific override ``isWriteType()`` in the relevant Connection class.
1313

1414
**ConnectionInterface::isWriteType() declaration added**
1515

@@ -26,24 +26,24 @@ classes have been deprecated and their methods moved to ``DatabaseTestTrait`` an
2626
``FeatureTestTrait`` respectively. Update your test cases to extend the main test case
2727
and use any traits you need. For example::
2828

29-
use CodeIgniter\Test\DatabaseTestCase;
29+
use CodeIgniter\Test\DatabaseTestCase;
3030

31-
class MyDatabaseTest extends DatabaseTestCase
32-
{
33-
public function testBadRow()
34-
{
31+
class MyDatabaseTest extends DatabaseTestCase
32+
{
33+
public function testBadRow()
34+
{
3535

3636
... becomes::
3737

38-
use CodeIgniter\Test\CIUnitTestCase;
39-
use CodeIgniter\Test\DatabaseTestTrait;
38+
use CodeIgniter\Test\CIUnitTestCase;
39+
use CodeIgniter\Test\DatabaseTestTrait;
4040

41-
class MyDatabaseTest extends CIUnitTestCase
42-
{
43-
use DatabaseTestTrait;
41+
class MyDatabaseTest extends CIUnitTestCase
42+
{
43+
use DatabaseTestTrait;
4444

45-
public function testBadRow()
46-
{
45+
public function testBadRow()
46+
{
4747

4848
Finally, ``ControllerTester`` has been superseded by ``ControllerTestTrait`` to standardize
4949
approach and take advantage of the updated response testing (below).
@@ -55,5 +55,6 @@ The tools for testing responses have been consolidated and improved. A new
5555
set of methods and properties expected from both those classes. In most cases these changes
5656
will be "behind the scenes" by ``ControllerTestTrait`` and ``FeatureTestCase``, but two
5757
changes to be aware of:
58+
5859
* ``TestResponse``'s ``$request`` and ``$response`` properties are protected and should only be access through their getter methods, ``request()`` and ``response()``
5960
* ``TestResponse`` does not have ``getBody()`` and ``setBody()`` methods, but rather uses the Response methods directly, e.g.: ``$body = $result->response()->getBody();``

0 commit comments

Comments
 (0)