Change record status: 
Project: 
Introduced in branch: 
8.0.x
Description: 

Configuration entity properties to export can now be determined by the config_export annotation property. Previously the configuration entity's schema was used to do this.

The ConfigEntityBase properties uuid, langcode, status, dependencies, and third_party_settings are added by default.

Example configuration entity annotation including the config_export property:

/**
 * Defines the Date Format configuration entity class.
 *
 * @ConfigEntityType(
 *   id = "date_format",
 *   label = @Translation("Date format"),
 *   handlers = {
 *     "access" = "Drupal\system\DateFormatAccessControlHandler",
 *   },
 *   entity_keys = {
 *     "id" = "id",
 *     "label" = "label"
 *   },
 *   admin_permission = "administer site configuration",
 *   list_cache_tags = { "rendered" },
 *   config_export = {
 *     "id",
 *     "label",
 *     "locked",
 *     "pattern",
 *   }
 * )
 */

If the annotation is not present, configuration schema is used as a fallback mechanism. Note that using schema is not performant. If the configuration entity has to converted to an array as part of cold cache response then using the annotation is highly recommended.

Additionally the config_export can map camel case class properties to snake case config keys. For example:

 *   config_export = {
 *     "myProperty" = "my_property",
 *   }
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done