Skip to content

Commit 2713cc4

Browse files
authored
Merge pull request #8759 from kenjis/docs-upgrading
docs: add "Upgrading to a Specified Version"
2 parents 666c8fc + 678bfd2 commit 2713cc4

File tree

2 files changed

+73
-3
lines changed

2 files changed

+73
-3
lines changed

user_guide_src/source/installation/installing_composer.rst

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,35 @@ If you omit the "project-root" argument, the command will create an
6565
that are not needed in the production environment. This will greatly reduce
6666
the vendor folder size.
6767

68+
Installing Previous Versions
69+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70+
71+
For example, you may want to install v4.4.8 after v4.5.0 has been released.
72+
73+
In that case, specify the version in the command:
74+
75+
.. code-block:: console
76+
77+
composer create-project codeigniter4/appstarter:4.4.8 project-root
78+
79+
Then, open **composer.json** in your project root folder, and specify
80+
the framework version:
81+
82+
.. code-block:: text
83+
84+
"require": {
85+
...
86+
"codeigniter4/framework": "4.4.8"
87+
},
88+
89+
Then, run the ``composer update`` command.
90+
91+
.. note:: When you use a fixed version number like ``"codeigniter4/framework": "4.4.8"``
92+
in your **composer.json**, ``composer update`` command will not update the
93+
framework to the latest version. See `Writing Version Constraints`_ for how to specify the version.
94+
95+
.. _Writing Version Constraints: https://getcomposer.org/doc/articles/versions.md#writing-version-constraints
96+
6897
Initial Configuration
6998
---------------------
7099

@@ -82,7 +111,29 @@ Whenever there is a new release, then from the command line in your project root
82111
83112
composer update
84113
85-
Read the :doc:`upgrade instructions <upgrading>`, and check Breaking Changes and Enhancements.
114+
Read the :doc:`upgrade instructions <upgrading>` and :doc:`change log <../changelogs/index>`,
115+
and check Breaking Changes and Enhancements.
116+
117+
Upgrading to a Specified Version
118+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119+
120+
For example, you may want to upgrade from v4.4.7 to v4.4.8 after v4.5.0 has been released.
121+
122+
In that case, open **composer.json** in your project root folder, and specify
123+
the framework version:
124+
125+
.. code-block:: text
126+
127+
"require": {
128+
...
129+
"codeigniter4/framework": "4.4.8"
130+
},
131+
132+
Then, run the ``composer update`` command.
133+
134+
.. note:: When you use a fixed version number like ``"codeigniter4/framework": "4.4.8"``
135+
in your **composer.json**, ``composer update`` command will not update the
136+
framework to the latest version. See `Writing Version Constraints`_ for how to specify the version.
86137

87138
Pros
88139
----
@@ -215,7 +266,25 @@ Whenever there is a new release, then from the command line in your project root
215266
216267
composer update
217268
218-
Read the :doc:`upgrade instructions <upgrading>`, and check Breaking Changes and Enhancements.
269+
Read the :doc:`upgrade instructions <upgrading>` and :doc:`change log <../changelogs/index>`,
270+
and check Breaking Changes and Enhancements.
271+
272+
Upgrading to a Specified Version
273+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
274+
275+
For example, you may want to upgrade from v4.4.7 to v4.4.8 after v4.5.0 has been released.
276+
277+
In that case, open **composer.json** in your project root folder, and specify
278+
the framework version:
279+
280+
.. code-block:: text
281+
282+
"require": {
283+
...
284+
"codeigniter4/framework": "4.4.8"
285+
},
286+
287+
Then, run the ``composer update`` command.
219288

220289
Pros
221290
----

user_guide_src/source/installation/installing_manual.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Upgrading
4242

4343
Download a new copy of the framework, and then replace the **system** folder.
4444

45-
Read the :doc:`upgrade instructions <upgrading>`, and check Breaking Changes and Enhancements.
45+
Read the :doc:`upgrade instructions <upgrading>` and :doc:`change log <../changelogs/index>`,
46+
and check Breaking Changes and Enhancements.
4647

4748
Pros
4849
====

0 commit comments

Comments
 (0)