Skip to content

Commit d494df9

Browse files
authored
Merge pull request #1926 from jim-parry/docs/install
Docs: update installation guide
2 parents fdf2e7b + 4018dab commit d494df9

1 file changed

Lines changed: 36 additions & 16 deletions

File tree

user_guide_src/source/installation/installing_composer.rst

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,26 @@ the latest released version of the framework.
2727
This installation technique would suit a developer who wishes to start
2828
a new CodeIgniter4 based project.
2929

30-
Installation
30+
Installation & Setup
3131
-------------------------------------------------------
3232

3333
In the folder above your project root::
3434

35-
composer create-project codeigniter4/appstarter -s beta
35+
composer create-project codeigniter4/appstarter project-root -s beta
3636

37-
Setup
38-
-------------------------------------------------------
37+
The command above will create a "project-root" folder.
3938

40-
The command above will create an "appstarter" folder.
41-
Feel free to rename that for your project.
39+
If you omit the "project-root" argument, the command will create an
40+
"appstarter" folder, which can be renamed as appropriate.
41+
42+
If you don't need or want phpunit installed, and all of its composer
43+
dependencies, then add the "--no-dev" option to the end of the above
44+
command line. That will result in only the framework, and the three
45+
trusted dependencies that we bundle, being composer-installed.
46+
47+
A sample such installation command, using the default project-root "appstarter"::
48+
49+
composer create-project codeigniter4/appstarter -s beta --no-dev
4250

4351
Upgrading
4452
-------------------------------------------------------
@@ -47,6 +55,9 @@ Whenever there is a new release, then from the command line in your project root
4755

4856
composer update
4957

58+
If you used the "--no-dev" option when you created the project, it
59+
would be appropriate to do so here too, i.e. ``composer update --no-dev``.
60+
5061
Read the upgrade instructions, and check designated ``app/Config`` folders for affected changes.
5162

5263
Pros
@@ -64,14 +75,14 @@ Structure
6475

6576
Folders in your project after setup:
6677

67-
- app, public, writable
78+
- app, public, tests, writable
6879
- vendor/codeigniter4/framework/system
69-
- vendor/codeigniter4/codeigniter4/app & public (compare with yours after updating)
80+
- vendor/codeigniter4/framework/app & public (compare with yours after updating)
7081

7182
Dev Starter
7283
============================================================
7384

74-
Installation
85+
Installation & Setup
7586
-------------------------------------------------------
7687

7788
The `CodeIgniter 4 dev starter <https://github.com/codeigniter4/devstarter>`_
@@ -92,16 +103,22 @@ In the folder above your project root::
92103

93104
composer create-project codeigniter4/devstarter -s dev
94105

95-
Setup
96-
-------------------------------------------------------
97-
98106
The command above will create a "devstarter" folder.
99107
Feel free to rename that for your project.
100108

109+
Just like the appstarter, you can provide your own project
110+
name as the third composer argument, and you can add
111+
the "--no-dev" argument if your don't want phpunit and its dependencies included.
112+
An example::
113+
114+
composer create-project codeigniter4/devstarter my-awesome-project -s dev --no-dev
115+
116+
101117
Upgrading
102118
-------------------------------------------------------
103119

104-
``composer update`` whenever you are ready for the latest changes.
120+
``composer update`` whenever you are ready for the latest changes,
121+
or ``composer update --no-dev`` if you used that argument when creating your project.
105122

106123
Check the changelog to see if any recent changes affect your app,
107124
bearing in mind that the most recent changes may not have made it
@@ -123,7 +140,7 @@ Structure
123140

124141
Folders in your project after setup:
125142

126-
- app, public, writable
143+
- app, public, tests, writable
127144
- vendor/codeigniter4/codeigniter4/system
128145
- vendor/codeigniter4/codeigniter4/app & public (compare with yours after updating)
129146

@@ -141,10 +158,13 @@ In your project root::
141158

142159
composer require codeigniter4/framework @beta
143160

161+
As with the earlier two composer install methods, you can omit installing
162+
phpunit and its dependencies by adding the "--no-dev" argument to the "composer require" command.
163+
144164
Setup
145165
-------------------------------------------------------
146166

147-
Copy the app, public and writable folders from ``vendor/codeigniter4/framework``
167+
Copy the app, public, tests and writable folders from ``vendor/codeigniter4/framework``
148168
to your project root
149169

150170
Copy the ``env``, ``phpunit.xml.dist`` and ``spark`` files, from
@@ -178,7 +198,7 @@ Structure
178198

179199
Folders in your project after setup:
180200

181-
- app, public, writable
201+
- app, public, tests, writable
182202
- vendor/codeigniter4/framework/system
183203

184204

0 commit comments

Comments
 (0)