- 🇮🇳India narendraR Jaipur, India
I am also facing similar problem where I need to convert a contributed module ( https://www.drupal.org/project/acquia_cms_event → ) functionality as recipe. This module creates an Event content type and related configuration are stored in config/optional folder.
What should be the approach to convert it to a Recipe? - 🇺🇸United States thejimbirch Cape Cod, Massachusetts
We are slowly identifying this as a top issue.
- 🇩🇪Germany jurgenhaas Gottmadingen
I may be wrong with this, but in the context of an installation profile, the
config/optional
doesn't really make much sense. The installation profile is deterministic as it fully controls what's installed and what not. In other words, the installation profile knows exactly what's available and therefore doesn't actually need the optional configuration. That's different for modules, as they can't tell the context in which they get installed. So, if modules come with optional configuration, that makes sense to me.A recipe, on the other hand, is declarative and describes exactly what it requires and applies that in total to the Drupal site.
Thinking outside the box, do we really require optional configuration with properly structure recipes that depend upon each other?
- 🇨🇦Canada b_sharpe
I would agree with #7. A recipe doesn't have optional config, it's either there or it's not. Module config is not going away nor should required/optional config be converted to a recipe for it (IMO) as the module is saying "Do this always, and if this other thing exist during install, also apply that". A recipe on the other hand could install this same module as well as whatever it requires to get it's optional config to go along with (among other things).
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
I agree with #7 and #8. Recipes are declarative and should not leave anything to be optional.
The recipe author, to #4's question should decide whether they want the functionality or not, and create their recipes as needed.
I would like to close this issue as Work's as designed, but I feel like we should document how to deal with optional config in modules and installation profiles in the recipe author guide in the docs.
- Status changed to Closed: works as designed
2 months ago 2:07pm 14 October 2024 - Merge request !167Adds more details in the install and config sections regarding optional configs → (Merged) created by thejimbirch
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Updated the Recipe Author Guide.
https://git.drupalcode.org/project/distributions_recipes/-/blob/1.0.x/do...
Automatically closed - issue fixed for 2 weeks with no activity.