Skip to content

Commit aed9aac

Browse files
committed
Document how to upgrade the dependencies
1 parent 5fbaa19 commit aed9aac

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

doc/manual/develop.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,28 @@ Loading development fixture data
187187
To debug failing Unit tests the fixtures can be loaded with:
188188
``./webapp/bin/console domjudge:load-development-data SampleSubmissionsFixture`` in the current database.
189189

190+
Installing, uppdating & upgrading dependencies
191+
-----------------------------------
192+
To manage the PHP dependencies start from ``/webapp``.
193+
194+
To require a new dependency/library:
195+
``composer require package/name`` or ``composer require package/name:version``, this is most often needed
196+
when a newer version is broken, is needed because you need a specific new feature or when you need a new library.
197+
198+
To update all dependencies:
199+
``composer update``, this is useful before a new contest when there is enough time to fix possible issues.
200+
201+
To update a single dependency:
202+
``composer update package/name`` and ``composer update -W package/name`` for either a single package upgrade or
203+
also the other requirements if needed. For the second case ``composer`` is allowed to update a dependency in case the
204+
dependency ``package/name`` requires a higher version.
205+
206+
When you expect a dependency to upgrade and it doesn't you can check on `Packagist`_ if a newer version exists
207+
and change the version in `composer.json`, or use `composer require package/name:version`` and rerun the commands above.
208+
190209
.. _CCS Contest API specification: https://ccs-specs.icpc.io/2021-11/contest_api
191210
.. _OpenAPI Specification ver. 3: https://swagger.io/specification/
192-
211+
.. _Packagist: https://packagist.org/
193212

194213
Additional developer documentation
195214
----------------------------------

0 commit comments

Comments
 (0)