Change record status: 
Project: 
Introduced in branch: 
8.x-2.x
Introduced in version: 
8.x-2.4
Description: 

All functions in *.module files have been deprecated and will be removed from Recipe version 3.0.0.

Drupal Core is moving toward deprecating .module files. Most Core files have their entire contents deprecated now before the release of Drupal 12. It's likely that .module file support will be removed in Drupal 13.

Large-scale changes to the Recipe .module files were already being made due to OOP hooks ahead of the Drupal 12 upgrade. So the opportunity was taken to move and deprecate their entire contents. Most of the non-hook functions existed to support hook functions anyway. A list of deprecated non-hook functions follows:

  • ingredient_is_page() - No replacement
  • ingredient_quantity_from_decimal() - Use \Drupal::service('ingredient.quantity')->getQuantityFromDecimal()
  • ingredient_quantity_from_fraction() - Use \Drupal::service('ingredient.quantity')->getQuantityFromFraction()
  • ingredient_unit_fuzzymatch() - Use \Drupal::service('ingredient.fuzzymatch')->getUnitFuzzymatch()
  • recipe_form_node_type_form_builder() - Use RecipeHooks::buildNodeTypeForm()
  • recipe_build_total_time() - No replacement
  • recipe_build_yield() - No replacement
  • recipe_duration_iso8601() - Use \Drupal\recipe\Utility\Rdf::iso8601Duration()

Hooks are not covered by the Drupal backward compatibility policy.

Impacts: 
Module developers