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

  1. Add the service "feeds.entity_finder".
  2. Refactor FeedsTarget plugins.
  3. Update the unit tests for these targets.
  4. Update the kernel tests for these targets.
  5. 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

Command icon 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

MegaChriz created an issue. See original summary.

megachriz’s picture

Assigned: Unassigned » megachriz

megachriz’s picture

Issue summary: View changes
Status: Active » Needs review

In 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.

megachriz’s picture

Related issues: +#3073275: Mapping to books

shaal made their first commit to this issue’s fork.

irinaz’s picture

What 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?

irinaz’s picture

Works with mapping by Name, needs testing by UUID, Term ID and description.

irinaz’s picture

I tested this branch on a live site with various importers and it did not break anything :)

irinaz’s picture

Status: Needs review » Reviewed & tested by the community

  • MegaChriz committed cdf3fa3 on 8.x-3.x
    Issue #3206365 by MegaChriz, irinaz: Added an EntityFinder service and...
megachriz’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing! Merged.

irinaz’s picture

If 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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.