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.
Mark deprecated and fix comments in doc blocks
Comment | File | Size | Author |
---|---|---|---|
#8 | field_CUD-deprecate-1973324-8.patch | 8.51 KB | yched |
#8 | interdiff.txt | 6.77 KB | yched |
#7 | interdiff.txt | 5.43 KB | andypost |
#7 | 1973324-7.patch | 7.66 KB | andypost |
#1 | 1973324-1.patch | 7.44 KB | andypost |
Comments
Comment #1
andypostSeems enough, needs check for English
Comment #2
tstoecklerThat's actually not correct. Such fields and instances can be created by the default configuration of modules, which is actually the preferred way. I have *no* idea how to phrase that, though. :-)
Same issue here: I think it would be safer to simply say: "When creating a field, additional indexes can be specified or the default indexes can be modified." (and somehow bring the "risk" part into the mix)
This should be "... when updating the field entity."
I would phrase this as "... is invoked during the [creation|deletion] of a field [instance] entity to ask ..."
Comment #3
swentel CreditAttribution: swentel commentedI wouldn't bother for now since we're going to delete them anyway :)
Comment #4
andypost@swentel so which comments are needed? We need this asap to stop growing tests with old approach
Comment #5
swentel CreditAttribution: swentel commentedHmm, right, good point, I'll have a look at noon.
Comment #6
swentel CreditAttribution: swentel commentedYeah, just remove
'fields can only be created programmatically with field_create_field() and field_create_instance().
Additional indexes can be specified, at own risk, which modify the default indexes ..
I'd leave out 'entity', just 'field is updated' is enough imo. Same with other comments when 'entity' is used.
Comment #7
andypostSo tried to address both suggestions
Comment #8
yched CreditAttribution: yched commentedA couple fixes.
Why not keep "Such fields can only be created programmatically." ?
Nut fully clear IMO, and "their" is blurry.
Proposal:
"Individual field definitions can specify additional indexes or modify, at their own risk, the default indexes specified for the field type. Some storage engines might not support indexes."
+ Wow, the phpdocs for hook_field_[CUD]_(field|instance)() have grown very inconsistent over time.
I know we want to get rid of those eventually, but at least bringing some sanity.
+ Fixed a couple typos / 80 chars / missing words.
Comment #9
swentel CreditAttribution: swentel commentedSweet!
Comment #10
swentel CreditAttribution: swentel commentedNicer title for the commit log
Comment #11
catchCommitted/pushed to 8.x, thanks!