diff --git a/developer_manual/app_development/dependency_management.rst b/developer_manual/app_development/dependency_management.rst new file mode 100644 index 000000000..9a9881cef --- /dev/null +++ b/developer_manual/app_development/dependency_management.rst @@ -0,0 +1,18 @@ +.. _Dependencymanagement: + +===================== +Dependency management +===================== + +It's possible to build a Nextcloud app with existing software packages. + + +Back-end +-------- + +You can add 3rd party packages with `Composer`_. Composer will download the specified packages to a directory of your choise, typically to ``/vendor``. In order to benefit from Composer's autoloader, you'll want to add a ``require_once`` to the ``register`` method of your ``Application`` class in the :ref:`bootstrapping` code of your app. + +.. note:: Be careful with which packages you add to an app. Php can not load two version of the same class twice, hence there can be conflicts between Nextcloud Server and an app or between two or more apps if they ship the same library. So try to keep the number of libraries to a minimum. + + +.. _Composer: https://getcomposer.org/ diff --git a/developer_manual/app_development/index.rst b/developer_manual/app_development/index.rst index a849e19e4..7a969fe7e 100644 --- a/developer_manual/app_development/index.rst +++ b/developer_manual/app_development/index.rst @@ -10,4 +10,4 @@ App development bootstrap info init - logging + dependency_management