Problem/Motivation
There are some functions in .module file that are not needed any more or are things solved in a different way in D8.
Proposed resolution
- Kill relation_type_load() and replace all it's usages with an appropriate call to a function on the entity class or storage controller.
- Kill relation_load() and replace all it's usages with an appropriate call to a function on the entity class or storage controller.
- Kill relation_uri() and relation_type_uri() and remove them from entity annotations.
- Kill relation_views_api()
- Kill relaton_insert() and replace it's usages with Relation::create(); $relation->save() two-liner.
Comment | File | Size | Author |
---|---|---|---|
#14 | relation_module_clean_up-2697871-14.patch | 22.78 KB | mbovan |
#8 | relation_module_clean_up-2697871-8-interdiff.txt | 517 bytes | mbovan |
#8 | relation_module_clean_up-2697871-8.patch | 22.86 KB | mbovan |
#5 | relation_module_clean_up-2697871-5.patch | 23.16 KB | mbovan |
Comments
Comment #2
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedComment #3
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedComment #4
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedComment #5
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedFixed the points from the issue sumarry and while touching
relation.module
did some additional cleaning. (documentation, imports, function calls etc)Comment #6
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedCreated a cleaning followup in CRM core #2700915: Remove usages of removed relation functions
Comment #7
CTaPByK CreditAttribution: CTaPByK at MD Systems GmbH commentedI think you forgot here to delete entities, you just load multiple, after that take storage and delete entities.
Comment #8
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedRight. I reverted the change as there is a similar issue for deprecated functions #2697831: Remove usages of deprecated functions
Comment #9
CTaPByK CreditAttribution: CTaPByK at MD Systems GmbH commentedYes there is a bunch of deprecated functions, so we need follow up for this. Patch is now looks good to me, but we must wait for tests to be committed to be sure this is RTBC.
Comment #14
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedRerolled.
Comment #15
CTaPByK CreditAttribution: CTaPByK at MD Systems GmbH commentedLooks ok.
Comment #17
mikran CreditAttribution: mikran at Mediamaisteri Oy commentedThanks, committed