diff --git a/src/Engine/ExpressionManager.php b/src/Engine/ExpressionManager.php
index e1d46bd..1aa1cdd 100644
--- a/src/Engine/ExpressionManager.php
+++ b/src/Engine/ExpressionManager.php
@@ -6,6 +6,7 @@ use Drupal\Component\Uuid\UuidInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Plugin\DefaultPluginManager;
 use Drupal\rules\Annotation\RulesExpression;
+use Drupal\rules\Context\ContextConfig;
 
 /**
  * Plugin manager for all Rules expressions.
@@ -46,33 +47,37 @@ class ExpressionManager extends DefaultPluginManager implements ExpressionManage
   /**
    * {@inheritdoc}
    */
-  public function createRule(array $configuration = []) {
-    return $this->createInstance('rules_rule', $configuration);
+  public function createRule(ContextConfig $configuration = NULL) {
+    $config_array = is_null($configuration) ? [] : $configuration->toArray();
+    return $this->createInstance('rules_rule', $config_array);
   }
 
   /**
    * {@inheritdoc}
    */
-  public function createActionSet(array $configuration = []) {
-    return $this->createInstance('rules_action_set', $configuration);
+  public function createActionSet(ContextConfig $configuration = NULL) {
+    $config_array = is_null($configuration) ? [] : $configuration->toArray();
+    return $this->createInstance('rules_action_set', $config_array);
   }
 
   /**
    * {@inheritdoc}
    */
-  public function createAction($id, array $configuration = []) {
+  public function createAction($id, ContextConfig $configuration = NULL) {
+    $config_array = is_null($configuration) ? [] : $configuration->toArray();
     return $this->createInstance('rules_action', [
       'action_id' => $id,
-    ] + $configuration);
+    ] + $config_array);
   }
 
   /**
    * {@inheritdoc}
    */
-  public function createCondition($id, array $configuration = []) {
+  public function createCondition($id, ContextConfig $configuration = NULL) {
+    $config_array = is_null($configuration) ? [] : $configuration->toArray();
     return $this->createInstance('rules_condition', [
       'condition_id' => $id,
-    ] + $configuration);
+    ] + $config_array);
   }
 
   /**
diff --git a/src/Engine/ExpressionManagerInterface.php b/src/Engine/ExpressionManagerInterface.php
index c294616..99f0742 100644
--- a/src/Engine/ExpressionManagerInterface.php
+++ b/src/Engine/ExpressionManagerInterface.php
@@ -3,6 +3,7 @@
 namespace Drupal\rules\Engine;
 
 use Drupal\Component\Plugin\PluginManagerInterface;
+use Drupal\rules\Context\ContextConfig;
 
 /**
  * Defines an interface for the expression plugin manager.
@@ -20,50 +21,50 @@ interface ExpressionManagerInterface extends PluginManagerInterface {
   /**
    * Creates a new rule.
    *
-   * @param array $configuration
-   *   The configuration array to create the plugin instance with.
+   * @param \Drupal\rules\Context\ContextConfig
+   *   (optional) The context configuration used to create the plugin instance.
    *
    * @return \Drupal\rules\Engine\RuleExpressionInterface
    *   The created rule.
    */
-  public function createRule(array $configuration = []);
+  public function createRule(ContextConfig $configuration = NULL);
 
   /**
    * Creates a new action set.
    *
-   * @param array $configuration
-   *   The configuration array to create the plugin instance with.
+   * @param \Drupal\rules\Context\ContextConfig
+   *   (optional) The context configuration used to create the plugin instance.
    *
    * @return \Drupal\rules\Plugin\RulesExpression\ActionSetExpression
    *   The created action set.
    */
-  public function createActionSet(array $configuration = []);
+  public function createActionSet(ContextConfig $configuration = NULL);
 
   /**
    * Creates a new action expression.
    *
    * @param string $id
    *   The action plugin id.
-   * @param array $configuration
-   *   Optional configuration settings.
+   * @param \Drupal\rules\Context\ContextConfig
+   *   (optional) The context configuration used to create the plugin instance.
    *
    * @return \Drupal\rules\Engine\ActionExpressionInterface
    *   The created action expression.
    */
-  public function createAction($id, array $configuration = []);
+  public function createAction($id, ContextConfig $configuration = NULL);
 
   /**
    * Creates a new condition expression.
    *
    * @param string $id
    *   The condition plugin id.
-   * @param array $configuration
-   *   Optional configuration settings.
+   * @param \Drupal\rules\Context\ContextConfig
+   *   (optional) The context configuration used to create the plugin instance.
    *
    * @return \Drupal\rules\Engine\ConditionExpressionInterface
    *   The created condition expression.
    */
-  public function createCondition($id, array $configuration = []);
+  public function createCondition($id, ContextConfig $configuration = NULL);
 
   /**
    * Creates a new 'and' condition container.
diff --git a/tests/src/Unit/Integration/Engine/ExpressionSerializationTest.php b/tests/src/Unit/Integration/Engine/ExpressionSerializationTest.php
index 712acb1..e0a961f 100644
--- a/tests/src/Unit/Integration/Engine/ExpressionSerializationTest.php
+++ b/tests/src/Unit/Integration/Engine/ExpressionSerializationTest.php
@@ -19,7 +19,7 @@ class ExpressionSerializationTest extends RulesIntegrationTestBase {
   public function testActionExpressionSerialization() {
     $action = $this->rulesExpressionManager
       ->createAction('rules_test_string', ContextConfig::create()
-        ->setValue('text', 'test')->toArray()
+        ->setValue('text', 'test')
       );
     $serialized_expression = serialize($action);
     $action = unserialize($serialized_expression);
@@ -34,7 +34,7 @@ class ExpressionSerializationTest extends RulesIntegrationTestBase {
    */
   public function testConditionExpressionSerialization() {
     $condition = $this->rulesExpressionManager
-      ->createCondition('rules_test_false', []);
+      ->createCondition('rules_test_false');
     $serialized_expression = serialize($condition);
     $condition = unserialize($serialized_expression);
     $result = $condition->execute();
@@ -79,7 +79,7 @@ class ExpressionSerializationTest extends RulesIntegrationTestBase {
     $expression->addAction('rules_test_string', ContextConfig::create()
       ->setValue('text', 'test'));
     $condition = $this->rulesExpressionManager
-      ->createCondition('rules_test_false', []);
+      ->createCondition('rules_test_false');
     $condition->negate(TRUE);
     $expression->addExpressionObject($condition);
 
diff --git a/tests/src/Unit/Integration/Engine/IntegrityCheckTest.php b/tests/src/Unit/Integration/Engine/IntegrityCheckTest.php
index a33fb10..f13f193 100644
--- a/tests/src/Unit/Integration/Engine/IntegrityCheckTest.php
+++ b/tests/src/Unit/Integration/Engine/IntegrityCheckTest.php
@@ -37,7 +37,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
     $rule = $this->rulesExpressionManager->createRule();
     $action = $this->rulesExpressionManager->createAction('rules_entity_save', ContextConfig::create()
       ->map('entity', 'unknown_variable')
-      ->toArray()
     );
     $rule->addExpressionObject($action);
 
@@ -62,7 +61,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
       ->map('entity', 'unknown_variable_1'));
     $second_action = $this->rulesExpressionManager->createAction('rules_entity_save', ContextConfig::create()
       ->map('entity', 'unknown_variable_2')
-      ->toArray()
     );
     $rule->addExpressionObject($second_action);
 
@@ -147,7 +145,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
     // The condition provides a "provided_text" variable.
     $condition = $this->rulesExpressionManager->createCondition('rules_test_provider', ContextConfig::create()
       ->provideAs('provided_text', 'invalid_näme')
-      ->toArray()
     );
     $rule->addExpressionObject($condition);
 
@@ -172,7 +169,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
       // violation.
       ->map('type', 'variable_1')
       ->setValue('entity_id', 1)
-      ->toArray()
     );
     $rule->addExpressionObject($action);
 
@@ -198,7 +194,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
       // trigger the violation.
       ->setValue('data', 'some value')
       ->setValue('value', 'some new value')
-      ->toArray()
     );
     $rule->addExpressionObject($action);
 
@@ -222,7 +217,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
     // violation.
     $condition = $this->rulesExpressionManager->createCondition('rules_test_string_condition', ContextConfig::create()
       ->map('text', 'list_variable')
-      ->toArray()
     );
     $rule->addExpressionObject($condition);
 
@@ -248,7 +242,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
     $condition = $this->rulesExpressionManager->createCondition('rules_node_is_of_type', ContextConfig::create()
       ->map('node', 'node')
       ->map('types', 'node')
-      ->toArray()
     );
     $rule->addExpressionObject($condition);
 
@@ -274,7 +267,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
     $condition = $this->rulesExpressionManager->createCondition('rules_node_is_of_type', ContextConfig::create()
       ->map('node', 'list_variable')
       ->map('types', 'list_variable')
-      ->toArray()
     );
     $rule->addExpressionObject($condition);
 
@@ -323,7 +315,6 @@ class IntegrityCheckTest extends RulesEntityIntegrationTestBase {
     // The most inner action will trigger a violation for an unknown variable.
     $action = $this->rulesExpressionManager->createAction('rules_entity_save', ContextConfig::create()
       ->map('entity', 'unknown_variable')
-      ->toArray()
     );
     $action_set->addExpressionObject($action);
     $rule->addExpressionObject($action_set);
