This class, and it's sole instantiation in FeedsPluginManager is marked to be removed in Feeds 3.0.

To-Do

  • Delete src/Plugin/Type/FeedsAnnotationFactory.php from the repo
  • Remove instantiation in src/Plugin/Type/FeedsPluginManager.php, line 61
  • Delete arguments array in tests/src/Kernel/Feeds/Processor/EntityProcessorBaseTest.php lines 79 to 82

Issue fork feeds-3136615

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

jcnventura’s picture

Issue summary: View changes
andypost’s picture

Issue tags: +Novice
megachriz’s picture

I wonder though when it is a good time to remove it. It has only be deprecated since about half a year now. Maybe when Drupal 8.8 support stops? (Assuming Feeds won’t reach a stable D8 release this year - I’m planning to update the roadmap as right now I’ve only planned a few issues ahead)

andypost’s picture

megachriz’s picture

@andypost
What’s actually being deprecated is to use annotation for declaring dependencies on services in Feeds plugins:

 *   arguments = {
 *     "@file.usage",
 *     "@entity_type.manager",
 *     "@stream_wrapper_manager"
 *   },

See https://www.drupal.org/node/3097376

So I don’t expect any direct usage of the class itself in contrib code.

jcnventura’s picture

@MegaChriz, Can you check tests/src/Kernel/Feeds/Processor/EntityProcessorBaseTest.php lines 79 to 82 if that test is not somehow building this annotation in code?

megachriz’s picture

@jcnventura
Thanks for pointing me at that. This should be removed from \Drupal\Tests\feeds\Kernel\Feeds\Processor\EntityProcessorBaseTest:

'arguments' => [
  '@entity_type.manager',
  '@entity_type.bundle.info',
],
sahana _n’s picture

Status: Active » Needs review
StatusFileSize
new2.52 KB

Deleted src/Plugin/Type/FeedsAnnotationFactory.php from the repo and removed

'arguments' => [
  '@entity_type.manager',
  '@entity_type.bundle.info',
],

From \Drupal\Tests\feeds\Kernel\Feeds\Processor\EntityProcessorBaseTest:
Please review the patch.

Status: Needs review » Needs work
megachriz’s picture

Status: Needs work » Postponed

Setting this to "Postponed" as changing this now I think is too early.

jcnventura’s picture

Issue summary: View changes

And the patch is incomplete.. It only contains 2 out of the 3 items in the checklist in the summary,

megachriz’s picture

Marking this issue as a stable release blocker.

Alina Basarabeanu made their first commit to this issue’s fork.

alina.basarabeanu’s picture

Status: Postponed » Needs review

Pull request created for all the changes.
The upgrade status is complaining about this deprecated class.

megachriz’s picture

I did not remove it yet, because the implementation of Paragraphs has not yet been adjusted to work without the deprecated class:
https://git.drupalcode.org/project/paragraphs/-/blob/8.x-1.x/src/Feeds/T...

Should I remove it now and then create a new release, then people who have Paragraphs installed probably will get a fatal error on the mapping page.

alina.basarabeanu’s picture

Maybe you should create a new issue for the Paragraphs project to warn them about the removal.

megachriz’s picture

I've updated the MR and I created an issue for Paragraphs: #3454863: Remove usage of deprecated FeedsAnnotationFactory.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Yes this has had a deprecation notice for some time. Time to let it go!

megachriz’s picture

Status: Reviewed & tested by the community » Fixed

The FeedsAnnotationFactory has now been removed!

Status: Fixed » Closed (fixed)

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