Problem/Motivation
In #3073275: Mapping to books I have been working on a new service called "feeds.entity_finder". Its implementation duplicates some code found in the FeedsTarget plugins "entity_reference" and "config_entity_reference". There's also no test coverage for that new service in that issue, hence why the code for that issue hasn't been committed yet.
So let's create a spin-off issue, by implementing the Entity finder service separately from the book target. And let the entity reference targets make use of this new service.
Proposed resolution
Create a new service called "feeds.entity_finder". Refactor the FeedsTarget plugins "entity_reference", "file", "config_entity_reference" and "user_role" to make use of this new service.
Remaining tasks
Add the service "feeds.entity_finder".Refactor FeedsTarget plugins.Update the unit tests for these targets.Update the kernel tests for these targets.- Review
User interface changes
None.
API changes
The implementation of some FeedsTarget plugins will change. This could have effect on plugins that extend these FeedsTarget plugins.
Data model changes
None.
Issue fork feeds-3206365
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
megachrizComment #4
megachrizIn the issue fork I resolved all coding tasks listed in "Remaining tasks".
Let's see if this causes any issues on the tests. And if it doesn't introduce new coding standards violations.
Comment #5
megachrizComment #7
irinaz commentedWhat would be a good feed configuration to test this issue, for example, do I need to have books module enabled? do I need to test this issue with csv import or other imports (xml, etc.) need to be tested too?
Comment #8
irinaz commentedWorks with mapping by Name, needs testing by UUID, Term ID and description.
Comment #9
irinaz commentedI tested this branch on a live site with various importers and it did not break anything :)
Comment #10
irinaz commentedComment #12
megachrizThanks for testing! Merged.
Comment #13
irinaz commentedIf I am pulling branch 8.x-3.x from Gitlab (https://git.drupalcode.org/project/feeds/) will it have this commit or no? Can I get branch https://www.drupal.org/project/feeds/releases/8.x-3.x-dev from Gitlab - I do not see branch 8.x-3.x-dev listed in branches or tags. Thanks!