diff --git a/src/BulkUpdateFields.php b/src/BulkUpdateFields.php
index b30a743..d0e3f11 100644
--- a/src/BulkUpdateFields.php
+++ b/src/BulkUpdateFields.php
@@ -69,7 +69,7 @@ class BulkUpdateFields {
     else {
       $message = t('Finished with an error.');
     }
-    drupal_set_message($message);
+    \Drupal::messenger()->addStatus($message);
   }
 
 }
diff --git a/src/Form/BulkUpdateFieldsForm.php b/src/Form/BulkUpdateFieldsForm.php
index 0d2b4bf..043e1f5 100644
--- a/src/Form/BulkUpdateFieldsForm.php
+++ b/src/Form/BulkUpdateFieldsForm.php
@@ -135,7 +135,7 @@ class BulkUpdateFieldsForm extends FormBase implements FormInterface {
         if (method_exists($this, 'updateFields')) {
           $return_verify = $this->updateFields();
         }
-        drupal_set_message($return_verify);
+        $this->messenger()->addStatus($return_verify);
         $this->routeBuilder->rebuild();
         break;
     }
@@ -208,10 +208,10 @@ class BulkUpdateFieldsForm extends FormBase implements FormInterface {
             if ($field = $entity->getFieldDefinition($field_name)) {
               // TODO Dates fields are incorrect due to TODOs below.
               if ($field->getType() == 'datetime') {
-                drupal_set_message($this->t('Cannot update field @field_name. Date field types are not yet updatable.',
+                $this->messenger()->addError($this->t('Cannot update field @field_name. Date field types are not yet updatable.',
                   [
                     '@field_name' => $field_name,
-                  ]), 'error');
+                  ]));
                 continue;
               }
               // TODO
@@ -237,7 +237,7 @@ class BulkUpdateFieldsForm extends FormBase implements FormInterface {
 
         break;
     }
-    drupal_set_message($this->t('This module is experiemental. PLEASE do not use on production databases without prior testing and a complete database dump.'), 'warning');
+    $this->messenger()->addWarning($this->t('This module is experiemental. PLEASE do not use on production databases without prior testing and a complete database dump.'));
     $form['actions']['submit'] = [
       '#type' => 'submit',
       '#value' => $submit_label,
