Skip to content

Commit a512ea7

Browse files
authored
Merge pull request #11339 from nextcloud/bugfix/noid/mention-state-of-the-art
fix(developer): Mention state-of-the-art exclusion of unneeded files
2 parents 3ebfec9 + a1447b3 commit a512ea7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

developer_manual/app_development/dependency_management.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ Composer
1313

1414
You can add 3rd party php packages with `Composer`_. Composer will download the specified packages to a directory of your choice, 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<Bootstrapping>` code of your app.
1515

16+
Remove unneeded files from packages
17+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18+
19+
It is heavily recommended to remove files that are not required in production from the final packages.
20+
This especially, but not exclusively, refers to:
21+
22+
* Developer files, e.g. ``/Makefile``
23+
* CI workflows, e.g. ``/.github``
24+
* Test assets, e.g. ``/tests``
25+
* Configuration of development tools, e.g. ``/phpunit.xml``, ``/psalm.xml``
26+
* Git or other version control code, e.g. ``/.git``
27+
28+
You can check the `Server's .gitignore <https://github.com/nextcloud/3rdparty/blob/master/.gitignore>`_ file for more inspiration.
29+
1630
.. _app-composer-dependency-hell:
1731

1832
Dependency hell

0 commit comments

Comments
 (0)