Skip to content

Commit ba69972

Browse files
committed
Revise download & install pages in UG
1 parent f0ff1e4 commit ba69972

8 files changed

Lines changed: 340 additions & 123 deletions

File tree

user_guide_src/source/changelogs/index.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ Release Date: Not Released
99

1010
**Next alpha release of CodeIgniter4**
1111

12-
- Numerous bug fixes
13-
- Many missing features implemented
12+
- Numerous bug fixes, across the framework
13+
- Many missing features implemented, across the framework
1414
- Code coverage is up to 72%
1515
- CodeIgniter4 has been promoted to its own github organization.
16-
That is reflected in docs and comments.
16+
That is reflected in docs and comments.
1717
- We have integrated a git pre-commit hook, which will apply the
18-
CI4 code sniffer rules, and attempt to fix them.
19-
We have run all the source files through it, and any "funny"
20-
code formatting is temporary until the rules are updated.
18+
CI4 code sniffer rules, and attempt to fix them.
19+
We have run all the source files through it, and any "funny"
20+
code formatting is temporary until the rules are updated.
2121
- We welcome Natan Felles, from Brazil, to the code developer team.
22-
He has proved passionate, dedicated and thorough :)
22+
He has proven to be passionate, dedicated and thorough :)
2323

2424
:doc:`See all the changes. </changelogs/next>`
2525

user_guide_src/source/changelogs/next.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ Release Date: Not Released
99
The list of changed files follows, with PR numbers shown.
1010

1111
- admin/
12+
- framework/* #1553
13+
- starter/* #1553
14+
- docbot #1553
1215
- release* #1484,
1316
- pre-commit #1388
17+
- README.md #1553
1418
- setup.sh #1388
1519

1620
- application /
@@ -198,7 +202,7 @@ The list of changed files follows, with PR numbers shown.
198202
- CommonFunctionsTest #1180, #1486, #1496
199203

200204
- user_guide_src /source/
201-
- changelogs/ #1385, #1490
205+
- changelogs/ #1385, #1490, #1553
202206
- concepts/
203207
- autoloader #1547
204208
- security #1540
@@ -230,14 +234,15 @@ The list of changed files follows, with PR numbers shown.
230234
- static_pages #1547
231235

232236
- /
233-
- composer.json #1388, #1418, #1536
234-
- README.md
237+
- composer.json #1388, #1418, #1536, #1553
238+
- README.md #1553
235239
- spark 2047b5a
236240
- .travis.yml #1394
237241

238242
PRs merged:
239243
-----------
240244

245+
- #1553 Admin/scripts
241246
- #1550 remove commented CLI::newLine($tempFiles) at FileLocator
242247
- #1549 use .gitkeep instead of .gitignore in Database/Seeds directory
243248
- #1547 Change file exists to is file

user_guide_src/source/installation/downloads.rst

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,51 @@
22
Downloading CodeIgniter
33
#######################
44

5-
`Git <http://git-scm.com/about>`_ is a distributed version control system.
5+
The CodeIgniter 4 open source project has its own
6+
`Github organization <https://github.com/codeigniter4>`_.
67

7-
Public Git access is available at `GitHub <https://github.com/codeigniter4/CodeIgniter4>`_.
8-
Please note that while every effort is made to keep this code base
9-
functional, we cannot guarantee the functionality of code taken from
10-
the develop branch.
8+
There are a number of repositories there of interest:
119

12-
Stable versions are available via `GitHub Releases <https://github.com/codeigniter4/framework/releases>`_.
10+
- `CodeIgniter4 <https://github.com/codeigniter4/CodeIgniter4>`_
11+
holds the codebase for the project, including unit testing
12+
and the source from which the user guide is built.
13+
This would be used by contributors to the project.
14+
- `framework <https://github.com/codeigniter4/framework>`_
15+
holds the released versions of the framework.
16+
This would be normally be used by developers.
17+
- `appstarter <https://github.com/codeigniter4/appstarter>`_
18+
holds the released application starter, with application
19+
and public folders, but with only a composer
20+
dependency on the framework.
21+
This is meant as the easy way to start a CodeIgniter 4 project.
22+
- `userguide <https://github.com/codeigniter4/userguide>`_
23+
holds the pre-built user guide. It can be downloaded
24+
on its own, or `viewed online <https://codeigniter4.github.io/userguide>`_.
25+
- `translations <https://github.com/codeigniter4/translations>`_
26+
holds translations of the CodeIgniter 4 system messages.
27+
Developers can use this for :doc:`localization </outgoing/localization>`.
28+
- `coding-standard <https://github.com/codeigniter4/coding-standard>`_
29+
holds the coding conventions we use for source code that is
30+
part of the framework itself.
31+
It is a dependency of the codebase repository, for contributors.
1332

14-
You can also download a zip of the `development branch <https://codeload.github.com/codeigniter4/CodeIgniter4/zip/develop>`_,
15-
i.e. the upcoming version.
33+
In all the above, the latest version of a repository can be downloaded
34+
by selecting the "releases" link in the secondary navbar inside
35+
the "Code" tab. The current (in development) version of each can
36+
be cloned or downloaded by selecting the "Clone or download" dropdown
37+
button on the right-hand side if the repository homepage.
38+
39+
Composer Packages
40+
=================
41+
42+
We also maintain composer-installable packages on `packagist.org <https://packagist.org/search/?query=codeigniter4>`_.
43+
These correspond to the repositories mentioned above:
44+
45+
- `codeigniter4/framework <https://packagist.org/packages/codeigniter4/framework>`_
46+
- `codeigniter4/appstarter <https://packagist.org/packages/codeigniter4/appstarter>`_
47+
- `codeigniter4/userguide <https://packagist.org/packages/codeigniter4/userguide>`_
48+
- `codeigniter4/translations <https://packagist.org/packages/codeigniter4/translations>`_
49+
- `codeigniter4/CodeIgniter4 <https://packagist.org/packages/codeigniter4/CodeIgniter4>`_
50+
- `codeigniter4/coding-standard <https://packagist.org/packages/codeigniter4/codeigniter4-standard>`_
51+
52+
See the :doc:`Installation </installation/index>` page for more information.

user_guide_src/source/installation/index.rst

Lines changed: 4 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,14 @@
22
Installation
33
############
44

5-
CodeIgniter4 can be installed manually, or using Composer.
6-
7-
.. note:: Before using CodeIgniter, make sure that your server meets the
8-
:doc:`requirements </intro/requirements>`.
9-
10-
Manual Installation
11-
===================
12-
13-
CodeIgniter is installed via manual download and unzip the package.
14-
15-
Composer Installation
16-
=====================
17-
18-
While not required, CodeIgniter can be installed via `composer <https://getcomposer.org>`_ create-project command.
19-
20-
::
21-
22-
composer create-project codeigniter4/framework
23-
24-
.. note:: When installing via composer, a pre-commit hook is installed for this repo that automatically runs
25-
PHP Code Sniffer and fixes any fixable issues on commit.
26-
27-
Running
28-
=======
29-
30-
#. Upload the CodeIgniter folders and files to your server. The
31-
**index.php** file will be in the **public** folder inside
32-
your project root.
33-
#. Open the **application/Config/App.php** file with a text editor and
34-
set your base URL. If you intend to use encryption or sessions, set
35-
your encryption key. If you need more flexibility, the baseURL may
36-
be set within the .env file as **app.baseURL="http://example.com"**.
37-
#. If you intend to use a database, open the
38-
**application/Config/Database.php** file with a text editor and set your
39-
database settings.
40-
41-
For the best security, both the system and any application directories
42-
come placed above the web root so that they are not directly accessible
43-
via a browser. By default, **.htaccess** files are included in each directory
44-
to help prevent direct access, but it is best to remove them from public
45-
access entirely in case the web server configuration changes or doesn't
46-
abide by the **.htaccess**.
47-
48-
If you would like to keep your views public it is also possible to move
49-
the **views** directory out of your **application** directory, to a
50-
corresponding folder inside **public**. If you do this, remember to
51-
open your main index.php file and set the
52-
``$system_path``, ``$application_folder`` and ``$view_folder`` variables,
53-
preferably with a full path, e.g. '*/www/MyUser/system*'.
54-
55-
One additional measure to take in production environments is to disable
56-
PHP error reporting and any other development-only functionality. In
57-
CodeIgniter, this can be done by setting the ``ENVIRONMENT`` constant, which
58-
is more fully described on the :doc:`environments page </general/environments>`.
59-
By default, the application will run using the "production" environment. To
60-
take advantage of the debugging tools provided, you should set the environment
61-
to "develop".
62-
63-
.. caution:: Using PHP's built-in web server is likely to cause problems,
64-
as it does not process the `.htaccess` file used to properly handle requests.
65-
66-
That's it!
67-
68-
If you're new to CodeIgniter, please read the :doc:`Getting
69-
Started <../intro/index>` section of the User Guide
70-
to begin learning how to build dynamic PHP applications. Enjoy!
5+
There are a number of ways to download, install and run a
6+
CodeIgniter4 app. Read on :)
717

728
.. toctree::
73-
:hidden:
749
:titlesonly:
7510

7611
downloads
77-
self
12+
installing
13+
running
7814
upgrading
7915
troubleshooting
80-
local_server
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
############
2+
Installation
3+
############
4+
5+
CodeIgniter4 can be installed in a number of different ways: manually,
6+
using `Composer <https://getcomposer.org>`_, or even using
7+
`Git <https://git-scm.com/>`_. This section addresses how to use
8+
each technique, and explains some of the pros and cons of them.
9+
10+
Once installed, read the next section, :doc:`running your app </installation/running>`.
11+
12+
.. note:: Before using CodeIgniter 4, make sure that your server meets the
13+
:doc:`requirements </intro/requirements>`.
14+
15+
Manual Installation
16+
============================================================
17+
18+
Install the framework by downloading the latest version,
19+
and extract it to become your project root. Your document
20+
root will be the ``public`` folder inside here.
21+
22+
Pros:
23+
24+
- download and run; this is the installation technique
25+
closest to that described for `CodeIgniter 3 <https://www.codeigniter.com/user_guide/installation/index.html>`_.
26+
27+
Cons:
28+
29+
- upgrading the framework is done by downloading a new copy
30+
of the framework, and then following the upgrade
31+
directions to merge that with your project (typically
32+
replace the ``system`` folder and inspect designated
33+
``application/Config`` folders for affected changes).
34+
35+
Resulting folder structure:
36+
37+
- application
38+
- public
39+
- system
40+
- writable
41+
42+
Composer Installation
43+
============================================================
44+
45+
Install the latest version of the framework with::
46+
47+
> composer create-project codeigniter4/framework PROJECT_ROOT
48+
49+
Pros:
50+
51+
- simple installation
52+
53+
Cons:
54+
55+
- upgrading the framework is done by::
56+
57+
> composer update
58+
59+
You would then need to resolve merge conflicts for any framework
60+
changes to ``application`` files that you modified for your app.
61+
62+
Resulting folder structure:
63+
64+
- application
65+
- public
66+
- system
67+
- writable
68+
69+
70+
Codebase Installation
71+
============================================================
72+
73+
Install the latest version of the codebase by
74+
75+
- forking the codebase to your github account
76+
- cloning your forked repository locally
77+
78+
Pros:
79+
80+
- you get the latest version of the codebase
81+
- you can propose contributions by creating a feature branch, and then
82+
submitting a pull request to the main repository once you have
83+
pushed your feature branch to your repository
84+
- a pre-commit hook is installed for this repo that binds it to the
85+
coding-standard repo, and then automatically runs
86+
PHP Code Sniffer and fixes any fixable issues whenever you commit.
87+
88+
Cons:
89+
90+
- you need to add a git remote alias to your project, so you can
91+
pull codebase changes::
92+
93+
> git remote add upstream https://github.com/codeigniter4/CodeIgniter4.git
94+
95+
- upgrading the framework is done by::
96+
97+
> git checkout develop
98+
> git pull upstream develop
99+
> git push origin develop
100+
101+
You would then need to resolve merge conflicts for any framework
102+
changes that conflict with modifications you have made.
103+
104+
Resulting folder structure:
105+
106+
- application
107+
- public
108+
- system
109+
- tests
110+
- user_guide_src
111+
- writable
112+
113+
App Starter Installation
114+
============================================================
115+
116+
Install the latest version of the framework's app starter with::
117+
118+
> composer create-project codeigniter4/appstarter PROJECT_ROOT
119+
120+
Pros:
121+
122+
- simple installation
123+
124+
Cons:
125+
126+
- upgrading the framework is done by::
127+
128+
> composer update
129+
130+
You would then need to resolve merge conflicts for any framework
131+
changes to ``application`` files that you modified for your app.
132+
133+
Resulting folder structure:
134+
135+
- application
136+
- public
137+
- writable
138+
- vendor/codeigniter4/framework
139+
140+
- application
141+
- public
142+
- system
143+
144+
Translations Installation
145+
============================================================
146+
147+
Install the available localizations to an existing CodeIgniter 4
148+
project with::
149+
150+
> composer require codeigniter4/translations
151+
152+
Update the translations at any time with::
153+
154+
> composer update
155+
156+
When the translations are installed, they are added to the appropriate namespace.
157+
See the :doc:`localization page </outgoing/localization>`
158+
for guidance.
159+
160+
Resulting folder structure:
161+
162+
...
163+
164+
- vendor
165+
166+
- codeigniter4
167+
168+
- translations
169+
170+
Coding Standards Installation
171+
============================================================
172+
173+
This is bound and installed automatically as part of the
174+
codebase installation.

0 commit comments

Comments
 (0)