Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / Plugin / DMU / Converter / HookFieldAttachDeleteBundle.php
diff --git a/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/HookFieldAttachDeleteBundle.php b/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/HookFieldAttachDeleteBundle.php
new file mode 100644 (file)
index 0000000..e8f567f
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter;
+
+use Drupal\drupalmoduleupgrader\ConverterBase;
+use Drupal\drupalmoduleupgrader\TargetInterface;
+use Pharborist\DocCommentNode;
+
+/**
+ * @Converter(
+ *  id = "hook_field_attach_delete_bundle",
+ *  description = @Translation("Adds a FIXME notice to hook_field_attach_delete_bundle()."),
+ *  hook = "hook_field_attach_delete_bundle",
+ *  fixme = @Translation("@FIXME
+hook_field_attach_delete_bundle() has been renamed to hook_entity_bundle_delete(),
+and it no longer accepts an $instances argument. This cannot be converted
+automatically because it's likely to affect the hook's logic, so you'll need to
+modify this function manually.
+
+For more information, see https://www.drupal.org/node/1964766.
+")
+ * )
+ */
+class HookFieldAttachDeleteBundle extends ConverterBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function convert(TargetInterface $target) {
+    $hook = $target
+      ->getIndexer('function')
+      ->get($this->pluginDefinition['hook'])
+      ->before(DocCommentNode::create($this->pluginDefinition['fixme']));
+
+    $target->save($hook);
+  }
+
+}