Skip to content

Commit 1919c4c

Browse files
authored
Merge pull request #7165 from kenjis/fix-docs-installing_composer
docs: improve installing_composer.rst
2 parents 1d7ecd1 + 12f7ea0 commit 1919c4c

2 files changed

Lines changed: 23 additions & 11 deletions

File tree

user_guide_src/source/installation/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Which is right for you?
1111
is known for, choose the manual installation.
1212

1313
However you choose to install and run CodeIgniter4, the
14-
`user guide <https://codeigniter4.github.io/userguide/>`_ is accessible online.
14+
`user guide <https://codeigniter.com/user_guide/>`_ is accessible online.
1515

1616
.. note:: Before using CodeIgniter 4, make sure that your server meets the
1717
:doc:`requirements </intro/requirements>`, in particular the PHP

user_guide_src/source/installation/installing_composer.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ Composer can be used in several ways to install CodeIgniter4 on your system.
99

1010
.. important:: CodeIgniter4 requires Composer 2.0.14 or later.
1111

12+
.. note:: If you are not familiar with Composer, we recommend you read
13+
`Basic usage <https://getcomposer.org/doc/01-basic-usage.md>`_ first.
14+
1215
The first technique describes creating a skeleton project
1316
using CodeIgniter4, that you would then use as the base for a new webapp.
1417
The second technique described below lets you add CodeIgniter4 to an existing
1518
webapp,
1619

1720
.. note:: If you are using a Git repository to store your code, or for
18-
collaboration with others, then the ``vendor`` folder would normally
21+
collaboration with others, then the **vendor** folder would normally
1922
be "git ignored". In such a case, you will need to do a ``composer update``
2023
when you clone the repository to a new system.
2124

@@ -36,7 +39,7 @@ In the folder above your project root::
3639

3740
> composer create-project codeigniter4/appstarter project-root
3841

39-
The command above will create a "project-root" folder.
42+
The command above will create a **project-root** folder.
4043

4144
If you omit the "project-root" argument, the command will create an
4245
"appstarter" folder, which can be renamed as appropriate.
@@ -45,14 +48,14 @@ If you omit the "project-root" argument, the command will create an
4548
The symbols that can be used are ``/``, ``_``, ``.``, ``:``, ``\`` and space.
4649
So if you install CodeIgniter under the folder that contains the special characters like ``(``, ``)``, etc., CodeIgniter won't work.
4750

48-
If you don't need or want phpunit installed, and all of its composer
49-
dependencies, then add the ``--no-dev`` option to the end of the above
50-
command line. That will result in only the framework, and the three
51-
trusted dependencies that we bundle, being composer-installed.
51+
.. important:: When you deploy to your production server, don't forget to run the
52+
following command::
5253

53-
A sample such installation command, using the default project-root "appstarter"::
54+
> composer install --no-dev
5455

55-
> composer create-project codeigniter4/appstarter --no-dev
56+
The above command will removes the Composer packages only for development
57+
that are not needed in the production environment. This will greatly reduce
58+
the vendor folder size.
5659

5760
Initial Configuration
5861
---------------------
@@ -131,11 +134,20 @@ In your project root::
131134

132135
> composer require codeigniter4/framework
133136

137+
.. important:: When you deploy to your production server, don't forget to run the
138+
following command::
139+
140+
> composer install --no-dev
141+
142+
The above command will removes the Composer packages only for development
143+
that are not needed in the production environment. This will greatly reduce
144+
the vendor folder size.
145+
134146
Setting Up
135147
----------
136148

137-
1. Copy the ``app``, ``public``, ``tests`` and ``writable`` folders from ``vendor/codeigniter4/framework`` to your project root
138-
2. Copy the ``env``, ``phpunit.xml.dist`` and ``spark`` files, from ``vendor/codeigniter4/framework`` to your project root
149+
1. Copy the **app**, **public**, **tests** and **writable** folders from **vendor/codeigniter4/framework** to your project root
150+
2. Copy the **env**, **phpunit.xml.dist** and **spark** files, from **vendor/codeigniter4/framework** to your project root
139151
3. You will have to adjust the ``$systemDirectory`` property in **app/Config/Paths.php** to refer to the vendor one, e.g., ``ROOTPATH . '/vendor/codeigniter4/framework/system'``.
140152

141153
Initial Configuration

0 commit comments

Comments
 (0)