diff --git a/src/Form/ConfirmAction.php b/src/Form/ConfirmAction.php
index 16938bb..3831fbc 100644
--- a/src/Form/ConfirmAction.php
+++ b/src/Form/ConfirmAction.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\views_bulk_operations\Form;
 
+use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\TempStore\PrivateTempStoreFactory;
@@ -17,6 +18,11 @@ class ConfirmAction extends FormBase {
 
   use ViewsBulkOperationsFormTrait;
 
+  // We need this if we want to keep the readonly in constructor property
+  // promotion and not have errors in plugins that use AJAX in their
+  // buildConfigurationForm() method.
+  use DependencySerializationTrait;
+
   /**
    * Constructor.
    *
