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.
Posted by xjm
Following #1668820: Concept, base class, and interface for Configurables (e.g., node types, image styles, vocabularies, views, etc), core provides an interface and base class to standardize CRUD and storage handling for user-defined configuration data objects. Configurable data differs from plain configuration in that configurables must invoke and and respond to hooks. (See the original issue for details.)
Sub-issues
- #1846172: Replace the actions API
- #1788104: Convert actions to plugin sub-system
- #1871696: Convert block instances to configuration entities to resolve architectural issues
- #111715: Convert node/content types into configuration
- #1779026: Convert Text Formats to Configuration System
- #1782244: Convert image styles $style array into ImageStyle (extends ConfigEntity)
- #1588422: Convert contact categories to configuration system
- #1552396: Convert vocabularies into configuration
- #1754246: Languages should be configuration entities
- #1497380: Convert shortcut sets to ConfigEntity
- #1814916: Convert menus into entities
- #1479454: Convert user roles to configurables
- #1735118: Convert Field API to CMI
- #1869600: Refactor RDF mappings to be inline with the new Entity Field API
- #1778410: Throw exception when RDF namespaces collide
- #2003892: Convert date formats to config entities
Note that all of the above issues should be added to the ConfigEntity change notice once it is complete.
Related issues
- #1872874: Remove the module name property from the role permission table
- #1872876: Turn role permission assignments into configuration.
- #1751274: Do not query user_roles directly
- #1775842: [meta] Convert all variables to state and/or config systems
- #1799600: Add test of sorting for configuration entities
- #1763974: Convert entity type info into plugins
- #916388: Convert menu links into entities
Comments
Comment #0.0
xjmUpdated issue summary.
Comment #1
catchECK makes entity types into configuration, which would make them ConfigEntity objects in 8.x. We'd need to sort out the dependencies between content and config entities to do that (a config entity can't be a config entity and there's no real need to dynamically define config entities either, or at least not as much), but it'd be cool to have the capability in core.
Comment #1.0
catchUpdated issue summary.
Comment #1.1
andypostAdded #1799600: Add test of sorting for configuration entities
Comment #1.2
andypostAdded #1757566: Convert user account e-mail templates to configuration system
Comment #1.3
andypostUpdated issue summary.
Comment #2
andypostSuppose we need to extend a list with
#916388: Convert menu links into entities
#1497380: Convert shortcut sets to ConfigEntity
Comment #3
tim.plunkett@andypost just update the issue summary, and stop editing your comment :)
Comment #3.0
tim.plunkettRemoved #916388: Convert menu links into entities because menu links will be content entities, not config.
Comment #4
podarok#2 injected into summary
Comment #4.0
podarokUpdated issue summary from http://drupal.org/node/1802750#comment-6596578
Comment #4.1
andypostAdded menu conversion issue
Comment #4.2
plachUpdated issue summary.
Comment #5
yched CreditAttribution: yched commentedOne remark :
Unless I'm very mistaken, the CMI files created by both the "convert image styles to ConfigEntities" & "convert contact categories to ConfigEntities" do not hold any uuid entry.
The CMI files created there bypass ConfigStorageController and use raw config() calls directly - which seems reasonable, but also skips uuid creation.
Similarly, it seems we skip the creation of the manifest files.
Since it seems that's a very easy mistake to make (we made it ourselves in #1852966: Rework entity display settings around EntityDisplay config entity so far), this kind of calls for a _config_update_create_structure() helper function of some kind ?
Comment #6
tim.plunkettComment #6.0
tim.plunkettMenu links is realted
Comment #6.1
tim.plunkettUpdated issue summary.
Comment #6.2
tim.plunkettUpdated issue summary.
Comment #6.3
catchAdding issues.
Comment #6.4
catchMore issues.
Comment #6.5
catchUpdated issue summary.
Comment #7
tim.plunkettWhy aren't date formats a ConfigEntity? Looking at admin/config/regional/date-time, it really looks like they should be.
Comment #8
catchThat was #1571632: Convert regional settings to configuration system - did that go in before config entities?
Comment #9
tim.plunkettThat started way before ConfigEntity, but went in after. I think it was good that it went in as is, but it shouldn't be too hard to convert over now, and it fits the pattern perfectly.
Comment #10
catchBumping this so it's independently critical from #1775842: [meta] Convert all variables to state and/or config systems. It'd be good to close the variables issue when we remove variable_*() but CMI's not really done until core configuration is either deployable (or explicitly marked as content/in limbo like path aliases might end up being).
Comment #11
catchComment #11.0
catchUpdated issue summary.
Comment #12
Gábor HojtsyWould converting actions make sense? (I think it would, not signing up for it :). Currently these are very custom DB stored thingies. In fact they are stored with their params as serialised blobs. Pretty scary. A side effect for this for D8MI is you can set a dsm() to go to the user or set an email action with a subject and body, but never translate it ever in any way. If only actions would be config entities, we could get rid of one more one-off core db stored thingie and get translation support for freeeeee!
Actions seem like a simple thing with aid, type (node, user, etc), callback, parameters (blob, AKA arbitrary data structure) and label. Currently action module has such code as:
Yeah. Could this just be an oversight that actions are not currently being worked on to become configurables? Is there some reason for them not to be ones?
Comment #13
Gábor HojtsyBTW two relevant issues for actions: #1788104: Convert actions to plugin sub-system and #1846172: Replace the actions API neither of which have been progressing lately. :/
Comment #13.0
Gábor HojtsyUpdated issue summary.
Comment #14
gddI've added both those issues to the summary
Comment #15
andypostA set of issues hangs on list controllers and forms
primary #1855402: Add generic weighting (tabledrag) support for config entities (DraggableListController) - holds configurables with weight
#1872870: Implement a RoleListController and RoleFormController
#1788542: Use EntityFormController and EntityListController for image styles
#1809376: Use EntityListController for image styles
#1891690: Use EntityListController for vocabularies
#1882552: Deprecate menu_list_system_menus() and menu_ui_get_menus()
#1882218: Remove static menu link creation for menus in menu_enable() and elsewhere
#1978112: Convert taxonomy admin path to follow other core entity patterns
Comment #15.0
andypostUpdated issue summary.
Comment #15.1
xjmRemoving myself from the author field so I can unfollow. --xjm
Comment #15.2
BerdirAction has an issue and is already in the list, added reference to related rdf mapping issue
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedI added #1869600: Refactor RDF mappings to be inline with the new Entity Field API.EDIT: Whoops, that one was already there. I meant to add #1778410: Throw exception when RDF namespaces collide.
Comment #16.0
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1869600, which converts the RDF mapping.
Comment #16.1
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1778410, which moves namespaces to a config entity.
Comment #16.2
alexpottAdd date formats
Comment #17
tim.plunkett#2042807: Convert search plugins to use a ConfigEntity and a PluginBag and #1778410: Throw exception when RDF namespaces collide are the only remaining issues, demoting this meta.
Comment #17.0
tim.plunkettFix url
Comment #18
tim.plunkettComment #19
andypostLet's close this because only 1 left #1751274: Do not query user_roles directly