diff -u b/core/modules/block/src/BlockViewBuilder.php b/core/modules/block/src/BlockViewBuilder.php
--- b/core/modules/block/src/BlockViewBuilder.php
+++ b/core/modules/block/src/BlockViewBuilder.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\block;
 
+use Drupal\block\Entity\Block;
 use Drupal\Core\Block\MainContentBlockPluginInterface;
 use Drupal\Core\Block\TitleBlockPluginInterface;
 use Drupal\Core\Cache\Cache;
only in patch2:
unchanged:
--- a/core/modules/config/tests/config_test/config_test.module
+++ b/core/modules/config/tests/config_test/config_test.module
@@ -25,17 +25,6 @@ function config_test_entity_type_alter(array &$entity_types) {
   // all the duration of the test session.
   $entity_types['config_test']->set('translatable', \Drupal::service('state')->get('config_test.translatable'));
 
-  // Create a clone of config_test that does not have a status.
-  $entity_types['config_test_no_status'] = clone $entity_types['config_test'];
-  $config_test_no_status = &$entity_types['config_test_no_status'];
-  $config_test_no_status->setLinkTemplate('edit-form', '/admin/structure/config_test/manage/{config_test_no_status}');
-  $config_test_no_status->setLinkTemplate('delete-form', '/admin/structure/config_test/manage/{config_test_no_status}/delete');
-
-  $keys = $config_test_no_status->getKeys();
-  unset($keys['status']);
-  $config_test_no_status->set('id', 'config_test_no_status');
-  $config_test_no_status->set('entity_keys', $keys);
-  $config_test_no_status->set('config_prefix', 'no_status');
   if (\Drupal::service('state')->get('config_test.lookup_keys', FALSE)) {
     $entity_types['config_test']->set('lookup_keys', ['uuid', 'style']);
   }
only in patch2:
unchanged:
--- /dev/null
+++ b/core/modules/config/tests/config_test/src/Entity/ConfigTestNoStatus.php
@@ -0,0 +1,163 @@
+<?php
+
+namespace Drupal\config_test\Entity;
+
+use Drupal\Core\Config\Entity\ConfigEntityBase;
+use Drupal\config_test\ConfigTestInterface;
+use Drupal\Core\Config\Entity\ConfigEntityInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
+
+/**
+ * Defines the ConfigTest configuration entity.
+ *
+ * @ConfigEntityType(
+ *   id = "config_test_no_status",
+ *   label = @Translation("Test configuration"),
+ *   handlers = {
+ *     "storage" = "Drupal\config_test\ConfigTestStorage",
+ *     "list_builder" = "Drupal\config_test\ConfigTestListBuilder",
+ *     "form" = {
+ *       "default" = "Drupal\config_test\ConfigTestForm",
+ *       "delete" = "Drupal\Core\Entity\EntityDeleteForm"
+ *     },
+ *     "access" = "Drupal\config_test_no_status\ConfigTestAccessControlHandler"
+ *   },
+ *   config_prefix = "dynamic",
+ *   entity_keys = {
+ *     "id" = "id",
+ *     "label" = "label"
+ *   },
+ *   links = {
+ *     "edit-form" = "/admin/structure/config_test_no_status/manage/{config_test_no_status}",
+ *     "delete-form" = "/admin/structure/config_test_no_status/manage/{config_test_no_status}/delete",
+ *     "enable" = "/admin/structure/config_test_no_status/manage/{config_test_no_status}/enable",
+ *     "disable" = "/admin/structure/config_test_no_status/manage/{config_test_no_status}/disable",
+ *     "collection" = "/admin/structure/config_test_no_status",
+ *   }
+ * )
+ */
+class ConfigTestNoStatus extends ConfigEntityBase implements ConfigTestInterface {
+
+  /**
+   * The machine name for the configuration entity.
+   *
+   * @var string
+   */
+  protected $id;
+
+  /**
+   * The human-readable name of the configuration entity.
+   *
+   * @var string
+   */
+  public $label;
+
+  /**
+   * The weight of the configuration entity.
+   *
+   * @var int
+   */
+  public $weight = 0;
+
+  /**
+   * The image style to use.
+   *
+   * @var string
+   */
+  public $style;
+
+  /**
+   * A protected property of the configuration entity.
+   *
+   * @var string
+   */
+  protected $protected_property;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
+    \Drupal::state()->set('config_entity_sort', TRUE);
+    return parent::sort($a, $b);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function postSave(EntityStorageInterface $storage, $update = TRUE) {
+    // Used to test secondary writes during config sync.
+    if ($this->id() == 'primary') {
+      $secondary = $storage->create(array(
+        'id' => 'secondary',
+        'label' => 'Secondary Default',
+      ));
+      $secondary->save();
+    }
+    if ($this->id() == 'deleter') {
+      $deletee = $storage->load('deletee');
+      $deletee->delete();
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function postDelete(EntityStorageInterface $storage, array $entities) {
+    parent::postDelete($storage, $entities);
+    foreach ($entities as $entity) {
+      if ($entity->id() == 'deleter') {
+        $deletee = $storage->load('deletee');
+        $deletee->delete();
+      }
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function onDependencyRemoval(array $dependencies) {
+    // Record which entities have this method called on.
+    $called = \Drupal::state()->get('config_test_no_status.on_dependency_removal_called', []);
+    $called[] = $this->id();
+    \Drupal::state()->set('config_test_no_status.on_dependency_removal_called', $called);
+
+    $changed = parent::onDependencyRemoval($dependencies);
+    if (!isset($this->dependencies['enforced']['config'])) {
+      return $changed;
+    }
+    $fix_deps = \Drupal::state()->get('config_test_no_status.fix_dependencies', array());
+    foreach ($dependencies['config'] as $entity) {
+      if (in_array($entity->getConfigDependencyName(), $fix_deps)) {
+        $key = array_search($entity->getConfigDependencyName(), $this->dependencies['enforced']['config']);
+        if ($key !== FALSE) {
+          $changed = TRUE;
+          unset($this->dependencies['enforced']['config'][$key]);
+        }
+      }
+    }
+    return $changed;
+  }
+
+  /**
+   * Sets the enforced dependencies.
+   *
+   * @param array $dependencies
+   *   A config dependency array.
+   *
+   * @return $this
+   *
+   * @see \Drupal\Core\Config\Entity\ConfigDependencyManager
+   */
+  public function setEnforcedDependencies(array $dependencies) {
+    $this->dependencies['enforced'] = $dependencies;
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function isInstallable() {
+    return $this->id != 'isinstallable' || \Drupal::state()->get('config_test_no_status.isinstallable');
+  }
+
+}
