By benjifisher on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
3.x
Introduced in version:
3.0.0-rc20
Issue links:
Description:
The MigrationHelper class now uses dependency injection (DI) to access the plugin manager for migration source plugins. Therefore, calling the constructor without providing the plugin manager is deprecated in Inline Entity Form 3.0.0 and will be an error in 4.0.0.
The class is now available as a service, which is the easiest way to inject the plugin manager.
Before Inline Entity Form 3.0.0-rc20
$helper = new MigrationHelper(); or $helper = \Drupal::classResolver(MigrationHelper::class);
Inline Entity Form 3.0.0-rc20 or later
In procedural code: $helper = \Drupal::service('inline_entity_form.migration_helper').
In object-oriented code (or in procedural code when the container is available): $helper = $container->get('inline_entity_form.migration_helper');
Impacts:
Module developers