Require `config_export` annotation for config entity types and improve ConfigEntityType::getPropertiesToExport()

Created on 14 February 2020, almost 5 years ago
Updated 14 March 2024, 9 months ago

Problem/Motivation

Now that the config schema fallback has been removed from Drupal 9 we can improve how the 'config_export' annotation property is handled.

In Drupal 9 it required in order to export a configuration entity - this makes it basically always required - so we should change it to be. We should throw an earlier exception that the one thrown in \Drupal\Core\Config\Entity\ConfigEntityBase::toArray() - maybe we can do something in discovery.

Also the \Drupal\Core\Config\Entity\ConfigEntityType::getPropertiesToExport() no longer needs the ID argument at all so we should deprecate that.

Plus once $this->config_export is required the logic can be made simpler.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
Configuration entityΒ  β†’

Last updated 3 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
  • API change

    Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024