From 19dbaae60c8840ca5fb127b079c84c68574ed0d6 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Fri, 12 Feb 2021 10:35:11 +0100 Subject: [PATCH] Adding best practices --- README.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.rst b/README.rst index ba6fa370..6940f5b5 100644 --- a/README.rst +++ b/README.rst @@ -34,3 +34,21 @@ automatically merged when the following conditions are met (in that order): .. _`Symfony Flex`: https://github.com/symfony/flex .. _`Symfony recipes`: https://github.com/symfony/recipes .. _`documentation`: https://github.com/symfony/recipes + +Best practices +-------------- + +1. A recipe for a bundle should not contain all the default config. A good +recipe only contains suggestion config for an application. That is config that needs +to be configured but no real default value exists. + +2. No recipe should modify other bundle's configuration. The only exception is when +a recipe append to a collection. + +3. No config should be "copied from package". That makes the recipes impossible +to maintain and to assure their quality. + +4. Most Symfony bundles do not need a recipe. A bundle without config or routes +will be installed by Flex with no recipe required. + +5. If environment variables are used, they must be provided to the bundle's config.