From a1447b3efe3119e1aa616480d33e5434d16e37c2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 1 Dec 2023 12:50:15 +0100 Subject: [PATCH] fix(developer): Mention state-of-the-art exclusion of unneeded files Signed-off-by: Joas Schilling --- .../app_development/dependency_management.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/developer_manual/app_development/dependency_management.rst b/developer_manual/app_development/dependency_management.rst index 9af7b3066..e3df8d800 100644 --- a/developer_manual/app_development/dependency_management.rst +++ b/developer_manual/app_development/dependency_management.rst @@ -13,6 +13,20 @@ Composer 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` code of your app. +Remove unneeded files from packages +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is heavily recommended to remove files that are not required in production from the final packages. +This especially, but not exclusively, refers to: + +* Developer files, e.g. ``/Makefile`` +* CI workflows, e.g. ``/.github`` +* Test assets, e.g. ``/tests`` +* Configuration of development tools, e.g. ``/phpunit.xml``, ``/psalm.xml`` +* Git or other version control code, e.g. ``/.git`` + +You can check the `Server's .gitignore `_ file for more inspiration. + .. _app-composer-dependency-hell: Dependency hell