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.
Several functions in the ingredient.module file can be converted to services:
These three should probably go in the same service:
- ingredient_quantity_from_decimal()
- ingredient_greatest_common_divisor()
- ingredient_quantity_from_fraction()
We don't currently use ingredient_unit_fuzzymatch(), but its functionality is really useful for anyone attempting to do recipe imports. So I want to leave it in the module as a service.
Comment | File | Size | Author |
---|---|---|---|
#9 | 3156825-9.patch | 24.48 KB | dcam |
Comments
Comment #2
nitesh624Comment #3
nitesh624Comment #4
nitesh624Comment #5
nitesh624Comment #6
nitesh624Comment #7
nitesh624Fix coding standard warning in last patch
Comment #8
dcam CreditAttribution: dcam commentedThank you @nitesh624! I'm sorry that I didn't get to this patch sooner. The last few months have been rough for me. I made a few minor changes, mostly just re-adding the old functions and deprecating them rather than removing them entirely.
Comment #9
dcam CreditAttribution: dcam commentedI wrote the wrong service here.
Comment #11
dcam CreditAttribution: dcam commented