Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / migrate_drupal / src / MigrateDrupalServiceProvider.php
diff --git a/web/core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php b/web/core/modules/migrate_drupal/src/MigrateDrupalServiceProvider.php
new file mode 100644 (file)
index 0000000..2ea8c23
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\migrate_drupal;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\DependencyInjection\ServiceProviderBase;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Alters container services.
+ */
+class MigrateDrupalServiceProvider extends ServiceProviderBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function alter(ContainerBuilder $container) {
+    parent::alter($container);
+
+    $container->getDefinition('plugin.manager.migration')
+      ->setClass(MigrationPluginManager::class)
+      ->addArgument(new Reference('plugin.manager.migrate.source'))
+      ->addArgument(new Reference('config.factory'));
+  }
+
+}