Remove usage of deprecated FeedsAnnotationFactory

Created on 15 June 2024, 13 days ago
Updated 16 June 2024, 12 days ago

Problem/Motivation

The FeedsTarget plugin "paragraphs" uses annotation to specify the services being used in the constructor. This relies on FeedsAnnotationFactory to work, but FeedsAnnotationFactory has been deprecated for more than 4 years now and is about to removed.

When it gets removed, it will cause fatal errors for users that use both Feeds and Paragraphs and when they use the FeedsTarget plugin "paragraphs" in mappings:

TypeError: Drupal\paragraphs\Feeds\Target\Paragraphs::__construct(): Argument #4 ($entity_type_manager) must be of type Drupal\Core\Entity\EntityTypeManagerInterface, Drupal\Core\Session\AccountProxy given, called in /Users/youri/Sites/drupal/modules/d8/wip/feeds8/feeds/src/Feeds/Target/Text.php on line 55 in Drupal\paragraphs\Feeds\Target\Paragraphs->__construct() (line 47 of /Users/youri/Sites/drupal/modules/d8/wip/paragraphs/src/Feeds/Target/Paragraphs.php).

Steps to reproduce

  1. Add a paragraphs field to an entity type, for example to "node".
  2. Add a feed type, select the entity type and bundle that the paragraphs field is on
  3. On the mapping page, map to a paragraphs field.
  4. Apply the changes from πŸ“Œ Remove deprecated FeedsAnnotationFactory class Needs review to Feeds (in which the FeedsAnnotationFactory gets removed).

Proposed resolution

Remove the service references from the annotation and inject the services by implementing ContainerFactoryPluginInterface instead.

See also the Feeds change record β†’ .

Note: πŸ› Adding a 'Paragraphs' field to a Feed's mapping throws error RTBC has tests for the Feeds integration, you might want to resolve that issue first.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands MegaChriz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024