Is this module deprecated by the new core's recipes?

Created on 30 August 2024, 7 months ago
Updated 3 September 2024, 7 months ago

Problem/Motivation

Just wondering what if some of the features/usecases of this module aren't covered by the new Recipes, to help me understand what's the better developer workflow for composable, general-purpose functionalities. Thanks.

💬 Support request
Status

Needs review

Version

1.1

Component

Documentation

Created by

🇮🇹Italy kopeboy Milan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kopeboy
  • Status changed to Needs review 7 months ago
  • 🇳🇱Netherlands kingdutch

    Hey kopeboy,

    Good question!

    This module is definitely not deprecated with the introduction of recipes. It was actually created at a time that Recipes was already pretty usable. Though there way be some overlap in problems that it solves, the primary goals of both projects are different.

    Recipes are intended as a way for site builders to quickly apply common configuration to their site. For example to be able to add an event functionality to your website, or to get started quickly with a blog that has commenting functionality.

    Config Modify is a much lower-level tool that's aimed at module developers. The shortest way I could describe this module is "partial optional configuration". Within Drupal, a module can use the config/optional module to say "If some criteria matches" (e.g. the views module is enabled) then also install this config. The problem with config/optional is that it only works on whole config objects (e.g. the view itself). At Open Social we often had a need to make partial configuration changes. For example "if module X is enabled then modify this view with a single field". This previously required writing code in hook_modules_installed and hook_install to be order agnostic, but can now be easily described in a YAML file.

    The problem we solved in Config Modify is very specific to the type of application that we're building. In most cases for Drupal you'll likely want to leave the choice of "if both these modules are enabled add this field" to the site builder themselves, because some may not want it. However, in the case of a Drupal-based product, that flexibility is much more limited and Config Modify provides us with a good way of ensuring that if 2 separate features are enabled the integration is also provided to make them work together.

    So in summary the Recipe's initiative is a powerful site builder tool to let them determine what configuration and functionality should be present. The Config Modify module is a developer tool to let multiple modules/features be integrated if they are enabled at the same time.

    I hope that answers your question!

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇮🇹Italy kopeboy Milan

    Thanks @kingdutch, much clearer now!

Production build 0.71.5 2024