diff --git a/core/lib/Drupal/Core/TypedData/TypedData.php b/core/lib/Drupal/Core/TypedData/TypedData.php
index a266daa..9329b2f 100644
--- a/core/lib/Drupal/Core/TypedData/TypedData.php
+++ b/core/lib/Drupal/Core/TypedData/TypedData.php
@@ -199,4 +199,23 @@ public function getPropertyPath() {
   public function getParent() {
     return $this->parent;
   }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __sleep() {
+    $vars = get_object_vars($this);
+    // Prevent services from being serialized. static::getStringTranslation()
+    // and static::getTypedDataManager() lazy-load them after $this has been
+    // unserialized.
+    // @todo Replace this with
+    //   \Drupal\Core\DependencyInjection\DependencySerializationTrait before
+    //   Drupal 9.0.0. We cannot use that now, because child classes already use
+    //   it and PHP 5 would consider that conflicts.
+    unset($vars['stringTranslation']);
+    unset($vars['typedDataManager']);
+
+    return array_keys($vars);
+  }
+
 }
