diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index f4cade9..4ce18d0 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -32,6 +32,9 @@ * - Configuration schema changes: adding/removing/renaming a config key, * changing the expected data type or value structure, changing dependencies, * etc. + * - Configuration changes: sometimes even though the configuration schema + * does not change, you may still need to update configuration to be + * compatible with new code. * - Database schema changes: adding, changing, or removing a database table or * field; moving stored data to different fields or tables; changing the * format of stored data. @@ -519,13 +522,18 @@ function hook_install_tasks_alter(&$tasks, $install_state) { * * Because of these reasons, you'll need to use care in writing your update * function. Some things to think about: - * - Never assume that the database or configuration schema is the same when - * the update will run as it is when you wrote the update function. So, - * when saving configuration, use the $has_trusted_data = TRUE parameter so - * that schema is ignored, and when updating a database table or field, put - * the schema information you want to update to directly into your function - * instead of calling your hook_schema() function to retrieve it (this is - * one case where the right thing to do is copy and paste the code). + * - Never assume that the database schema is the same when the update will run + * as it is when you wrote the update function. So, when updating a database + * table or field, put the schema information you want to update to directly + * into your function instead of calling your hook_schema() function to + * retrieve it (this is one case where the right thing to do is copy and paste + * the code). + * - Never assume that the configuration schema is the same when the update will + * run as it is when you wrote the update function. So, when saving + * configuration, use the $has_trusted_data = TRUE parameter so that schema is + * ignored, and make sure that the configuration data you are saving matches + * the configuration schema at the time when you write the update function + * (later updates may change it again to match new schema changes). * - Be careful about API functions and especially CRUD operations that you use * in your update function. If they invoke hooks or use services, they may * not behave as expected, and it may actually not be appropriate to use the