Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
There is very little documentation currently on how third-party settings work.
- ThirdPartySettingsInterface has only this high-level documentation:
Interface for configuration entities to store third party information.
A third party is a module that needs to store tightly coupled information to the configuration entity. For example, a module alters the node type form can use this to store its configuration so that it will be deployed with the node type.
- ConfigDependencyManager has the most thorough documentation on dependency management, but only mentions third-party settings in passing.
- The config dependency handbook page is not complete and does not mention third-party settings at all.
- The config schema handbook page has one example for third-party settings.
Proposed resolution
- Add a handbook page on third-party settings under https://www.drupal.org/docs/8/api/configuration-api
- Fill in missing docs on https://www.drupal.org/docs/8/api/configuration-api/configuration-entity...<
- Document how third-party dependencies are managed on that page as well.
- Add codebase documentation as appropriate.
Remaining tasks
TBD
Comments
Comment #2
xjmComment #6
gambryJust to chip in, currently core doesn't implement any mechanism to add custom dependencies from a third-party settings "setter" point of view. Only the setter module is added as dependency.
The only way to achieve this looks like to be if the config entity provides a way to its protected
DependencyTrait::addDependencies().
Comment #10
claudiu.cristea@gambry you are referring to this #3016895: 3rd party should be allowed to add config dependencies?