From e33ca32d6e9b76bc273f45ff66e4c2c7aa861093 Mon Sep 17 00:00:00 2001 From: Tyler Trout Date: Thu, 7 Sep 2023 14:45:50 -0400 Subject: [PATCH 1/2] Updated with database column type override info Added information to override database column types with the yml configuration syntax. --- en/02_Developer_Guides/05_Extending/01_Extensions.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/en/02_Developer_Guides/05_Extending/01_Extensions.md b/en/02_Developer_Guides/05_Extending/01_Extensions.md index 59485552f..60b7b7f76 100644 --- a/en/02_Developer_Guides/05_Extending/01_Extensions.md +++ b/en/02_Developer_Guides/05_Extending/01_Extensions.md @@ -149,9 +149,15 @@ App\Extensions\MyDataClassConfigExtension: ``` [notice] -Note that the value for `key1` in the `my_configuration_property` array way _not_ overridden by the extension class. Configuration declared in an extension class is merged into the base class as a lower priority than the base class itself. Where there is any collision between configuration declared on the base class and on the extension class, the base class configuration is used. +Note that the value for `key1` in the `my_configuration_property` array was _not_ overridden by the extension class. Configuration declared in an extension class is merged into the base class as a lower priority than the base class itself. Where there is any collision between the configuration declared on the base class and on the extension class, the base class configuration is used. To workaround this, use the .yml configuration because $db, $has_one, etc are ultimately just configuration properties. [/notice] +```yml +App\Data\MyDataClass: + my_configuration_property: + key1: 'is overridden' +``` + See [Configuration API](/developer_guides/configuration/configuration/) for more information about configuration properties. ## Adding Database Fields From 949791ee113444c800b3c00cfea3e8a117479f82 Mon Sep 17 00:00:00 2001 From: Tyler Trout Date: Mon, 11 Sep 2023 10:06:07 -0400 Subject: [PATCH 2/2] Update en/02_Developer_Guides/05_Extending/01_Extensions.md Co-authored-by: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> --- en/02_Developer_Guides/05_Extending/01_Extensions.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/en/02_Developer_Guides/05_Extending/01_Extensions.md b/en/02_Developer_Guides/05_Extending/01_Extensions.md index 60b7b7f76..231052693 100644 --- a/en/02_Developer_Guides/05_Extending/01_Extensions.md +++ b/en/02_Developer_Guides/05_Extending/01_Extensions.md @@ -149,14 +149,16 @@ App\Extensions\MyDataClassConfigExtension: ``` [notice] -Note that the value for `key1` in the `my_configuration_property` array was _not_ overridden by the extension class. Configuration declared in an extension class is merged into the base class as a lower priority than the base class itself. Where there is any collision between the configuration declared on the base class and on the extension class, the base class configuration is used. To workaround this, use the .yml configuration because $db, $has_one, etc are ultimately just configuration properties. -[/notice] +Note that the value for `key1` in the `my_configuration_property` array was _not_ overridden by the extension class. Configuration declared in an extension class is merged into the base class as a lower priority than the base class itself. Where there is any collision between the configuration declared on the base class and on the extension class, the base class configuration is used. + +If you need to override values, you should do so using the [yml configuration API](/developer_guides/configuration/configuration). ```yml App\Data\MyDataClass: my_configuration_property: key1: 'is overridden' ``` +[/notice] See [Configuration API](/developer_guides/configuration/configuration/) for more information about configuration properties.