From 69e031942b4cf5d2d88baa0e2d1209b8c3fe87f4 Mon Sep 17 00:00:00 2001 From: Gabor Horn Date: Sun, 19 Dec 2021 19:01:22 +0100 Subject: [PATCH 1/2] Add information to file based plugin configuration. --- plugin-settings.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin-settings.md b/plugin-settings.md index 52cae47e..477a6bb3 100644 --- a/plugin-settings.md +++ b/plugin-settings.md @@ -169,7 +169,9 @@ Use the `Config` class for accessing the configuration values defined in the con $maxItems = Config::get('acme.demo::maxItems', 50); -A plugin configuration can be overridden by the application by creating a configuration file `config/author/plugin/config.php`, for example `config/acme/todo/config.php`, or `config/acme/todo/dev/config.php` for different environment. Inside the overridden configuration file you can return only values you want to override: +A plugin configuration can be overridden by the application by creating a configuration file `config/author/plugin/config.php`, for example `config/acme/todo/config.php`, or `config/acme/todo/dev/config.php` for different environment. Please note, you need to provide an original configuration in the plugin for the override to work - even an empty array there will work, if you expect all the configuration come from the `config/author/plugin/config.php` file. + +Inside the overridden configuration file you can return only values you want to override: Date: Sun, 19 Dec 2021 19:54:11 -0600 Subject: [PATCH 2/2] Update plugin-settings.md --- plugin-settings.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin-settings.md b/plugin-settings.md index 477a6bb3..59dedcde 100644 --- a/plugin-settings.md +++ b/plugin-settings.md @@ -169,7 +169,9 @@ Use the `Config` class for accessing the configuration values defined in the con $maxItems = Config::get('acme.demo::maxItems', 50); -A plugin configuration can be overridden by the application by creating a configuration file `config/author/plugin/config.php`, for example `config/acme/todo/config.php`, or `config/acme/todo/dev/config.php` for different environment. Please note, you need to provide an original configuration in the plugin for the override to work - even an empty array there will work, if you expect all the configuration come from the `config/author/plugin/config.php` file. +A plugin configuration can be overridden by the application by creating a configuration file `config/author/plugin/config.php`, for example `config/acme/todo/config.php`, or `config/acme/todo/dev/config.php` for an environment specific override (in this case `dev`). + +> **NOTE:** In order for the config override to work, the plugin must contain a default config file (i.e. `plugins/author/plugin/config/config.php`. Even if you expect all configuration to come from the project override instead of the default configuration file it is still **highly** recommended that a default configuration file is provided as a form of documentation as to what configuration options are available to be modified on the project level. Inside the overridden configuration file you can return only values you want to override: