diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php b/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php
index 01fb6c9..5c8bf6a 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php
@@ -53,7 +53,7 @@ function setUp() {
     // text format.
     $this->adminUser = $this->drupalCreateUser(array(
       'administer blocks',
-      filter_permission_name($full_html_format),
+      $full_html_format->getPermissionName(),
       'access administration pages',
     ));
     $this->drupalLogin($this->adminUser);
diff --git a/core/modules/ckeditor/ckeditor.api.php b/core/modules/ckeditor/ckeditor.api.php
index 3f08460..5a295ec 100644
--- a/core/modules/ckeditor/ckeditor.api.php
+++ b/core/modules/ckeditor/ckeditor.api.php
@@ -47,7 +47,7 @@ function hook_ckeditor_plugin_info_alter(array &$plugins) {
  * @param $editor
  *   The text editor object as returned by editor_load(), for which these files
  *   are being loaded. Based on this information, it is possible to load the
- *   corresponding text format object as returned by filter_format_load().
+ *   corresponding text format object.
  *
  * @see _ckeditor_theme_css()
  */
diff --git a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
index 1183f80..47b74e7 100644
--- a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
+++ b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php
@@ -64,7 +64,7 @@ public function id() {
    * Overrides Drupal\Core\Entity\Entity::label().
    */
   public function label($langcode = NULL) {
-    $format = filter_format_load($this->format);
+    $format = entity_load('filter_format', $this->format);
     return $format->name;
   }
 
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index ebb1dbb..28dcffe 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -5,10 +5,12 @@
  * Framework for handling the filtering of content.
  */
 
+use Drupal\Component\Utility\String;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Language\Language;
+use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Template\Attribute;
-use Drupal\filter\Entity\FilterFormat;
+use Drupal\filter\FilterFormatInterface;
 
 /**
  * Non-HTML markup language filters that generate HTML.
@@ -125,7 +127,7 @@ function filter_menu() {
     'type' => MENU_SUGGESTED_ITEM,
     'route_name' => 'filter_tips_all',
   );
-  $items['filter/tips/%filter_format'] = array(
+  $items['filter/tips/%'] = array(
     'title' => 'Compose tips',
     'route_name' => 'filter_tips',
   );
@@ -155,43 +157,6 @@ function filter_menu() {
 }
 
 /**
- * Loads a text format object from the database.
- *
- * @param $format_id
- *   The format ID.
- *
- * @return
- *   A fully-populated text format object, if the requested format exists and
- *   is enabled. If the format does not exist, or exists in the database but
- *   has been marked as disabled, NULL is returned.
- *
- * @see filter_format_exists()
- *
- * @todo Use entity_load().
- */
-function filter_format_load($format_id) {
-  $formats = filter_formats();
-  return isset($formats[$format_id]) ? $formats[$format_id] : NULL;
-}
-
-/**
- * Determines if a text format exists.
- *
- * @param $format_id
- *   The ID of the text format to check.
- *
- * @return
- *   TRUE if the text format exists, FALSE otherwise. Note that for disabled
- *   formats filter_format_exists() will return TRUE while filter_format_load()
- *   will return FALSE.
- *
- * @see filter_format_load()
- */
-function filter_format_exists($format_id) {
-  return entity_load('filter_format', $format_id);
-}
-
-/**
  * Implements hook_permission().
  */
 function filter_permission() {
@@ -206,14 +171,14 @@ function filter_permission() {
   // Generate permissions for each text format. Warn the administrator that any
   // of them are potentially unsafe.
   foreach (filter_formats() as $format) {
-    $permission = filter_permission_name($format);
+    $permission = $format->getPermissionName();
     if (!empty($permission)) {
       // Only link to the text format configuration page if the user who is
       // viewing this will have access to that page.
-      $format_name_replacement = user_access('administer filters') ? l($format->name, 'admin/config/content/formats/manage/' . $format->format) : drupal_placeholder($format->name);
+      $format_name_replacement = l($format->label(), 'admin/config/content/formats/manage/' . $format->id());
       $perms[$permission] = array(
         'title' => t("Use the !text_format text format", array('!text_format' => $format_name_replacement,)),
-        'description' => drupal_placeholder(t('Warning: This permission may have security implications depending on how the text format is configured.')),
+        'description' => String::placeholder(t('Warning: This permission may have security implications depending on how the text format is configured.')),
       );
     }
   }
@@ -221,70 +186,52 @@ function filter_permission() {
 }
 
 /**
- * Returns the machine-readable permission name for a provided text format.
+ * Retrieves a list of enabled text formats, ordered by weight.
  *
- * @param $format
- *   An object representing a text format.
- *
- * @return
- *   The machine-readable permission name, or FALSE if the provided text format
- *   is malformed or is the fallback format (which is available to all users).
- */
-function filter_permission_name($format) {
-  if (isset($format->format) && $format->format != filter_fallback_format()) {
-    return 'use text format ' . $format->format;
-  }
-  return FALSE;
-}
-
-/**
- * Retrieves a list of text formats, ordered by weight.
- *
- * @param $account
+ * @param \Drupal\Core\Session\AccountInterface|null $account
  *   (optional) If provided, only those formats that are allowed for this user
- *   account will be returned. All formats will be returned otherwise. Defaults
- *   to NULL.
+ *   account will be returned. All enabled formats will be returned otherwise.
+ *   Defaults to NULL.
  *
- * @return
+ * @return \Drupal\filter\FilterFormatInterface[]
  *   An array of text format objects, keyed by the format ID and ordered by
  *   weight.
  *
  * @see filter_formats_reset()
  */
-function filter_formats($account = NULL) {
-  $language_interface = language(Language::TYPE_INTERFACE);
+function filter_formats(AccountInterface $account = NULL) {
   $formats = &drupal_static(__FUNCTION__, array());
 
   // All available formats are cached for performance.
   if (!isset($formats['all'])) {
-    if ($cache = cache()->get("filter_formats:{$language_interface->id}")) {
+    $language_interface = Drupal::languageManager()->getLanguage(Language::TYPE_INTERFACE);
+    if ($cache = Drupal::cache()->get("filter_formats:{$language_interface->id}")) {
       $formats['all'] = $cache->data;
     }
     else {
-      $filter_formats = entity_load_multiple('filter_format');
-      $formats['all'] = array();
-      foreach ($filter_formats as $format_name => $filter_format) {
-        if ($filter_format->status()) {
-          $formats['all'][$format_name] = $filter_format;
-        }
-      }
+      $formats['all'] = Drupal::entityManager()->getStorageController('filter_format')->loadByProperties(array('status' => '1'));
       uasort($formats['all'], 'Drupal\Core\Config\Entity\ConfigEntityBase::sort');
-
-      cache()->set("filter_formats:{$language_interface->id}", $formats['all'], CacheBackendInterface::CACHE_PERMANENT, array('filter_formats' => TRUE));
+      Drupal::cache()->set("filter_formats:{$language_interface->id}", $formats['all'], CacheBackendInterface::CACHE_PERMANENT, array('filter_formats' => TRUE));
     }
   }
 
+  // If no user was specified, return all formats.
+  if (!isset($account)) {
+    return $formats['all'];
+  }
+
   // Build a list of user-specific formats.
-  if (isset($account) && !isset($formats['user'][$account->id()])) {
-    $formats['user'][$account->id()] = array();
+  $account_id = $account->id();
+  if (!isset($formats['user'][$account_id])) {
+    $formats['user'][$account_id] = array();
     foreach ($formats['all'] as $format) {
-      if (filter_access($format, $account)) {
-        $formats['user'][$account->id()][$format->format] = $format;
+      if ($format->access('view', $account)) {
+        $formats['user'][$account_id][$format->format] = $format;
       }
     }
   }
 
-  return isset($account) ? $formats['user'][$account->id()] : $formats['all'];
+  return $formats['user'][$account_id];
 }
 
 /**
@@ -294,27 +241,25 @@ function filter_formats($account = NULL) {
  */
 function filter_formats_reset() {
   cache()->deleteTags(array('filter_formats' => TRUE));
-  cache()->delete('filter_list_format');
-  drupal_static_reset('filter_list_format');
   drupal_static_reset('filter_formats');
 }
 
 /**
  * Retrieves a list of roles that are allowed to use a given text format.
  *
- * @param $format
+ * @param \Drupal\filter\FilterFormatInterface $format
  *   An object representing the text format.
  *
- * @return
+ * @return array
  *   An array of role names, keyed by role ID.
  */
-function filter_get_roles_by_format($format) {
+function filter_get_roles_by_format(FilterFormatInterface $format) {
   // Handle the fallback format upfront (all roles have access to this format).
-  if ($format->format == filter_fallback_format()) {
+  if ($format->isFallbackFormat()) {
     return user_role_names();
   }
   // Do not list any roles if the permission does not exist.
-  $permission = filter_permission_name($format);
+  $permission = $format->getPermissionName();
   return !empty($permission) ? user_role_names(FALSE, $permission) : array();
 }
 
@@ -324,7 +269,7 @@ function filter_get_roles_by_format($format) {
  * @param $rid
  *   The user role ID to retrieve text formats for.
  *
- * @return
+ * @return \Drupal\filter\FilterFormatInterface[]
  *   An array of text format objects that are allowed for the role, keyed by
  *   the text format ID and ordered by weight.
  */
@@ -333,7 +278,7 @@ function filter_get_formats_by_role($rid) {
   foreach (filter_formats() as $format) {
     $roles = filter_get_roles_by_format($format);
     if (isset($roles[$rid])) {
-      $formats[$format->format] = $format;
+      $formats[$format->id()] = $format;
     }
   }
   return $formats;
@@ -355,16 +300,16 @@ function filter_get_formats_by_role($rid) {
  * returned by filter_fallback_format() should be used, since that is intended
  * to be a safe, consistent format that is always available to all users.
  *
- * @param $account
+ * @param \Drupal\Core\Session\AccountInterface|null $account
  *   (optional) The user account to check. Defaults to the currently logged-in
  *   user. Defaults to NULL.
  *
- * @return
+ * @return string
  *   The ID of the user's default text format.
  *
  * @see filter_fallback_format()
  */
-function filter_default_format($account = NULL) {
+function filter_default_format(AccountInterface $account = NULL) {
   global $user;
   if (!isset($account)) {
     $account = $user;
@@ -390,10 +335,12 @@ function filter_default_format($account = NULL) {
 function filter_get_filter_types_by_format($format_id) {
   $filter_types = array();
 
-  $filters = filter_list_format($format_id);
-  foreach ($filters as $filter) {
-    if ($filter->status) {
-      $filter_types[] = $filter->getType();
+  if ($format_id) {
+    $filters = entity_load('filter_format', $format_id)->filters();
+    foreach ($filters as $filter) {
+      if ($filter->status) {
+        $filter_types[] = $filter->getType();
+      }
     }
   }
 
@@ -420,7 +367,7 @@ function filter_get_filter_types_by_format($format_id) {
  *   FALSE means there are no HTML restrictions.
  */
 function filter_get_html_restrictions_by_format($format_id) {
-  $format = filter_format_load($format_id);
+  $format = entity_load('filter_format', $format_id);
 
   // Ignore filters that are disabled or don't have HTML restrictions.
   $filters = array_filter($format->filters()->getAll(), function($filter) {
@@ -594,69 +541,23 @@ function filter_fallback_format() {
  * process can be cached. A text format may allow caching depending on the
  * filters enabled.
  *
- * @param $format_id
+ * @param string $format_id
  *   The text format ID to check.
  *
- * @return
+ * @return bool
  *   TRUE if the given text format allows caching, FALSE otherwise.
  */
 function filter_format_allowcache($format_id) {
-  $format = filter_format_load($format_id);
+  $format = $format_id ? entity_load('filter_format', $format_id) : FALSE;
   return !empty($format->cache);
 }
 
 /**
- * Retrieves a list of filters for a given text format.
- *
- * Note that this function returns all associated filters regardless of whether
- * they are enabled or disabled. All functions working with the filter
- * information outside of filter administration should test for $filter->status
- * before performing actions with the filter.
- *
- * @param $format_id
- *   The format ID to retrieve filters for.
- *
- * @return
- *   An array of filter objects associated to the given text format, keyed by
- *   filter name.
- *
- * @todo Change this function to only return enabled filters. Code that needs to
- *   access disabled filters is not regular runtime code and thus can work with
- *   the FilterFormat::filters().
- */
-function filter_list_format($format_id) {
-  $filters = &drupal_static(__FUNCTION__, array());
-
-  if (!isset($filters['all'])) {
-    if ($cache = cache()->get('filter_list_format')) {
-      $filters['all'] = $cache->data;
-    }
-    else {
-      $filters['all'] = array();
-      $filter_formats = filter_formats();
-      foreach ($filter_formats as $filter_format) {
-        // This loop must not instantiate the actual filter plugins, since the
-        // filter bag would be duplicated for each filter plugin instance upon
-        // unserialization of the cache item.
-        $filters['all'][$filter_format->id()] = $filter_format->filters();
-      }
-      cache()->set('filter_list_format', $filters['all']);
-    }
-  }
-
-  if (!isset($filters[$format_id]) && isset($filters['all'][$format_id])) {
-    $filters[$format_id] = $filters['all'][$format_id];
-  }
-
-  return isset($filters[$format_id]) ? $filters[$format_id] : array();
-}
-
-/**
  * Runs all the enabled filters on a piece of text.
  *
  * Note: Because filters can inject JavaScript or execute PHP code, security is
  * vital here. When a user supplies a text format, you should validate it using
- * filter_access() before accepting/using it. This is normally done in the
+ * $format->access() before accepting/using it. This is normally done in the
  * validation stage of the Form API. You should for example never make a
  * preview of content in a disallowed format.
  *
@@ -690,7 +591,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE,
     $format_id = filter_fallback_format();
   }
   // If the requested text format does not exist, the text cannot be filtered.
-  if (!$format = filter_format_load($format_id)) {
+  if (!$format = entity_load('filter_format', $format_id)) {
     watchdog('filter', 'Missing text format: %format.', array('%format' => $format_id), WATCHDOG_ALERT);
     return '';
   }
@@ -720,7 +621,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE,
   $text = str_replace(array("\r\n", "\r"), "\n", $text);
 
   // Get a complete list of filters, ordered properly.
-  $filters = filter_list_format($format->format);
+  $filters = $format->filters();
 
   // Give filters the chance to escape HTML-like data such as code or formulas.
   foreach ($filters as $filter) {
@@ -749,7 +650,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE,
   // automatically flushed when the text format is updated.
   // @see \Drupal\filter\Entity\FilterFormat::save()
   if ($cache) {
-    cache('filter')->set($cache_id, $text, CacheBackendInterface::CACHE_PERMANENT, array('filter_format' => $format->format));
+    cache('filter')->set($cache_id, $text, CacheBackendInterface::CACHE_PERMANENT, array('filter_format' => $format->id()));
   }
 
   return $text;
@@ -852,9 +753,10 @@ function filter_process_format($element) {
     '#attributes' => array('class' => array('filter-guidelines')),
     '#weight' => 20,
   );
+  $options = array();
   foreach ($formats as $format) {
-    $options[$format->format] = $format->name;
-    $element['format']['guidelines'][$format->format] = array(
+    $options[$format->id()] = $format->label();
+    $element['format']['guidelines'][$format->id()] = array(
       '#theme' => 'filter_guidelines',
       '#format' => $format,
     );
@@ -962,44 +864,16 @@ function theme_text_format_wrapper($variables) {
 }
 
 /**
- * Checks if a user has access to a particular text format.
- *
- * @param $format
- *   An object representing the text format.
- * @param $account
- *   (optional) The user account to check access for; if omitted, the currently
- *   logged-in user is used. Defaults to NULL.
- *
- * @return
- *   Boolean TRUE if the user is allowed to access the given format.
- */
-function filter_access($format, $account = NULL) {
-  global $user;
-  if (!isset($account)) {
-    $account = $user;
-  }
-  // Handle special cases up front. All users have access to the fallback
-  // format.
-  if ($format->format == filter_fallback_format()) {
-    return TRUE;
-  }
-  // Check the permission if one exists; otherwise, we have a non-existent
-  // format so we return FALSE.
-  $permission = filter_permission_name($format);
-  return !empty($permission) && user_access($permission, $account);
-}
-
-/**
  * Retrieves the filter tips.
  *
- * @param $format_id
+ * @param string $format_id
  *   The ID of the text format for which to retrieve tips, or -1 to return tips
  *   for all formats accessible to the current user.
- * @param $long
+ * @param bool $long
  *   (optional) Boolean indicating whether the long form of tips should be
  *   returned. Defaults to FALSE.
  *
- * @return
+ * @return array
  *   An associative array of filtering tips, keyed by filter name. Each
  *   filtering tip is an associative array with elements:
  *   - tip: Tip text.
@@ -1018,12 +892,11 @@ function _filter_tips($format_id, $long = FALSE) {
   }
 
   foreach ($formats as $format) {
-    $filters = filter_list_format($format->format);
-    foreach ($filters as $name => $filter) {
+    foreach ($format->filters() as $name => $filter) {
       if ($filter->status) {
         $tip = $filter->tips($long);
         if (isset($tip)) {
-          $tips[$format->name][$name] = array('tip' => $tip, 'id' => $name);
+          $tips[$format->label()][$name] = array('tip' => $tip, 'id' => $name);
         }
       }
     }
diff --git a/core/modules/filter/filter.routing.yml b/core/modules/filter/filter.routing.yml
index 5442fb0..2260177 100644
--- a/core/modules/filter/filter.routing.yml
+++ b/core/modules/filter/filter.routing.yml
@@ -10,7 +10,7 @@ filter_tips:
   defaults:
     _content: '\Drupal\filter\Controller\FilterController::filterTips'
   requirements:
-    _filter_access: 'TRUE'
+    _entity_access: 'filter_format.view'
 
 filter_admin_overview:
   pattern: '/admin/config/content/formats'
@@ -38,5 +38,8 @@ filter_admin_disable:
   pattern: '/admin/config/content/formats/manage/{filter_format}/disable'
   defaults:
     _entity_form: 'filter_format.disable'
+  options:
+     _access_mode: 'ALL'
   requirements:
     _filter_disable_format_access: 'TRUE'
+    _permission: 'administer filters'
diff --git a/core/modules/filter/filter.services.yml b/core/modules/filter/filter.services.yml
index 6c523ab..ac2029f 100644
--- a/core/modules/filter/filter.services.yml
+++ b/core/modules/filter/filter.services.yml
@@ -10,10 +10,6 @@ services:
     class: Drupal\filter\Access\FormatDisableCheck
     tags:
       - { name: access_check }
-  access_check.filter_access:
-    class: Drupal\filter\Access\FilterAccessCheck
-    tags:
-      - { name: access_check }
   plugin.manager.filter:
     class: Drupal\filter\FilterPluginManager
     arguments: ['@container.namespaces', '@cache.cache', '@language_manager', '@module_handler']
diff --git a/core/modules/filter/lib/Drupal/filter/Access/FilterAccessCheck.php b/core/modules/filter/lib/Drupal/filter/Access/FilterAccessCheck.php
deleted file mode 100644
index 25918e8..0000000
--- a/core/modules/filter/lib/Drupal/filter/Access/FilterAccessCheck.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Access\FilterAccessCheck.
- */
-
-namespace Drupal\filter\Access;
-
-use Drupal\Core\Access\StaticAccessCheckInterface;
-use Symfony\Component\Routing\Route;
-use Symfony\Component\HttpFoundation\Request;
-
-/**
- * Checks access for text formats.
- */
-class FilterAccessCheck implements StaticAccessCheckInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function appliesTo() {
-    return array('_filter_access');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function access(Route $route, Request $request) {
-    if ($format = $request->attributes->get('filter_format')) {
-      // Handle special cases up front. All users have access to the fallback
-      // format.
-      if ($format->format == filter_fallback_format()) {
-        return TRUE;
-      }
-
-      // Check the permission if one exists; otherwise, we have a non-existent
-      // format so we return FALSE.
-      $permission = filter_permission_name($format);
-      return !empty($permission) && user_access($permission);
-    }
-  }
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Access/FormatDisableCheck.php b/core/modules/filter/lib/Drupal/filter/Access/FormatDisableCheck.php
index 1f905bb..368aa97 100644
--- a/core/modules/filter/lib/Drupal/filter/Access/FormatDisableCheck.php
+++ b/core/modules/filter/lib/Drupal/filter/Access/FormatDisableCheck.php
@@ -24,14 +24,11 @@ public function appliesTo() {
   }
 
   /**
-   * Implements \Drupal\Core\Access\AccessCheckInterface::access().
+   * {@inheritdoc}
    */
   public function access(Route $route, Request $request) {
-    if ($format = $request->attributes->get('filter_format')) {
-      return user_access('administer filters') && ($format->format != filter_fallback_format());
-    }
-
-    return FALSE;
+    $format = $request->attributes->get('filter_format');
+    return ($format && !$format->isFallbackFormat()) ? static::ALLOW : static::DENY;
   }
 
 }
diff --git a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
index 7bc107d..71ca04d 100644
--- a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
+++ b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
@@ -239,7 +239,7 @@ public function postSave(EntityStorageControllerInterface $storage_controller, $
       // Note: user_role_change_permissions() triggers a call chain back into
       // filter_permission() and lastly filter_formats(), so its cache must be
       // reset upfront.
-      if (($roles = $this->get('roles')) && $permission = filter_permission_name($this)) {
+      if (($roles = $this->get('roles')) && $permission = $this->getPermissionName()) {
         foreach (user_roles() as $rid => $name) {
           $enabled = in_array($rid, $roles, TRUE);
           user_role_change_permissions($rid, array($permission => $enabled));
@@ -261,4 +261,11 @@ public function isFallbackFormat() {
     return $this->id() == $fallback_format;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getPermissionName() {
+    return !$this->isFallbackFormat() ? 'use text format ' . $this->id() : FALSE;
+  }
+
 }
diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php
index 1242b94..0d49189 100644
--- a/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php
+++ b/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php
@@ -26,21 +26,21 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A
       return TRUE;
     }
 
-    if (user_access('administer filters', $account)) {
+    if ($operation != 'view' && $account->hasPermission('administer filters')) {
       return TRUE;
     }
 
     // Check the permission if one exists; otherwise, we have a non-existent
     // format so we return FALSE.
-    $permission = filter_permission_name($entity);
-    return !empty($permission) && user_access($permission, $account);
+    $permission = $entity->getPermissionName();
+    return !empty($permission) && $account->hasPermission($permission);
   }
 
   /**
    * {@inheritdoc}
    */
   protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
-    return user_access('administer filters', $account);
+    return $account->hasPermission('administer filters');
   }
 
 }
diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php
index d7da801..bd42969 100644
--- a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php
+++ b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php
@@ -78,7 +78,7 @@ public function form(array $form, array &$form_state) {
       '#default_value' => $format->id(),
       '#maxlength' => 255,
       '#machine_name' => array(
-        'exists' => 'filter_format_exists',
+        'exists' => array($this, 'exists'),
         'source' => array('name'),
       ),
       '#disabled' => !$format->isNew(),
@@ -197,6 +197,22 @@ public function form(array $form, array &$form_state) {
   }
 
   /**
+   * Determines if the format already exists.
+   *
+   * @param string $format_id
+   *   The format ID
+   *
+   * @return bool
+   *   TRUE if the format exists, FALSE otherwise.
+   */
+  public function exists($format_id) {
+    return (bool) $this->queryFactory
+      ->get('filter_format')
+      ->condition('format', $format_id)
+      ->execute();
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function validate(array $form, array &$form_state) {
@@ -241,7 +257,7 @@ public function submit(array $form, array &$form_state) {
     $format->save();
 
     // Save user permissions.
-    if ($permission = filter_permission_name($format)) {
+    if ($permission = $format->getPermissionName()) {
       foreach ($form_state['values']['roles'] as $rid => $enabled) {
         user_role_change_permissions($rid, array($permission => $enabled));
       }
diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php b/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php
index 7517c44..77fad0c 100644
--- a/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php
+++ b/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php
@@ -49,4 +49,13 @@ public function setFilterConfig($instance_id, array $configuration);
    */
   public function isFallbackFormat();
 
+  /**
+   * Returns the machine-readable permission name for the text format.
+   *
+   * @return string|bool
+   *   The machine-readable permission name, or FALSE if the text format is
+   *   malformed or is the fallback format (which is available to all users).
+   */
+  public function getPermissionName();
+
 }
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
index 003f82b..58873a0 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
@@ -198,7 +198,7 @@ function testTypedDataAPI() {
     $this->assertTrue($data instanceof AllowedValuesInterface, 'Typed data object implements \Drupal\Core\TypedData\AllowedValuesInterface');
 
     $filtered_html_user = $this->createUser(array('uid' => 2), array(
-      filter_permission_name(filter_format_load('filtered_html')),
+      entity_load('filter_format', 'filtered_html')->getPermissionName(),
     ));
 
     // Test with anonymous user.
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
index 5f3f6fd..0788fb5 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
@@ -34,14 +34,14 @@ function setUp() {
     parent::setUp();
 
     // Create users.
-    $basic_html_format = filter_format_load('basic_html');
-    $restricted_html_format = filter_format_load('restricted_html');
-    $full_html_format = filter_format_load('full_html');
+    $basic_html_format = entity_load('filter_format', 'basic_html');
+    $restricted_html_format = entity_load('filter_format', 'restricted_html');
+    $full_html_format = entity_load('filter_format', 'full_html');
     $this->admin_user = $this->drupalCreateUser(array(
       'administer filters',
-      filter_permission_name($basic_html_format),
-      filter_permission_name($restricted_html_format),
-      filter_permission_name($full_html_format),
+      $basic_html_format->getPermissionName(),
+      $restricted_html_format->getPermissionName(),
+      $full_html_format->getPermissionName(),
     ));
 
     $this->web_user = $this->drupalCreateUser(array('create page content', 'edit own page content'));
@@ -143,8 +143,9 @@ function testFilterAdmin() {
     $this->assertResponse(403, 'The fallback format cannot be disabled.');
 
     // Verify access permissions to Full HTML format.
-    $this->assertTrue(filter_access(filter_format_load($full), $this->admin_user), 'Admin user may use Full HTML.');
-    $this->assertFalse(filter_access(filter_format_load($full), $this->web_user), 'Web user may not use Full HTML.');
+    $full_format = entity_load('filter_format', $full);
+    $this->assertTrue($full_format->access('view', $this->admin_user), 'Admin user may use Full HTML.');
+    $this->assertFalse($full_format->access('view', $this->web_user), 'Web user may not use Full HTML.');
 
     // Add an additional tag.
     $edit = array();
@@ -199,7 +200,7 @@ function testFilterAdmin() {
     $this->assertRaw(t('Added text format %format.', array('%format' => $edit['name'])), 'New filter created.');
 
     filter_formats_reset();
-    $format = filter_format_load($edit['format']);
+    $format = entity_load('filter_format', $edit['format']);
     $this->assertNotNull($format, 'Format found in database.');
     $this->drupalGet('admin/config/content/formats/manage/' . $format->format);
     $this->assertFieldByName('roles[' . DRUPAL_AUTHENTICATED_RID . ']', '', 'Role found.');
@@ -212,7 +213,7 @@ function testFilterAdmin() {
     $this->assertRaw(t('Disabled text format %format.', array('%format' => $edit['name'])), 'Format successfully disabled.');
 
     // Allow authenticated users on full HTML.
-    $format = filter_format_load($full);
+    $format = entity_load('filter_format', $full);
     $edit = array();
     $edit['roles[' . DRUPAL_ANONYMOUS_RID . ']'] = 0;
     $edit['roles[' . DRUPAL_AUTHENTICATED_RID . ']'] = 1;
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterCrudTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterCrudTest.php
index 15ae75c..9bf71d2 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterCrudTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterCrudTest.php
@@ -39,7 +39,6 @@ function testTextFormatCrud() {
     $format->name = 'Empty format';
     $format->save();
     $this->verifyTextFormat($format);
-    $this->verifyFilters($format);
 
     // Add another text format specifying all possible properties.
     $format = entity_create('filter_format', array());
@@ -53,7 +52,6 @@ function testTextFormatCrud() {
     ));
     $format->save();
     $this->verifyTextFormat($format);
-    $this->verifyFilters($format);
 
     // Alter some text format properties and save again.
     $format->name = 'Altered format';
@@ -65,7 +63,6 @@ function testTextFormatCrud() {
     ));
     $format->save();
     $this->verifyTextFormat($format);
-    $this->verifyFilters($format);
 
     // Add a uncacheable filter and save again.
     $format->setFilterConfig('filter_test_uncacheable', array(
@@ -73,7 +70,6 @@ function testTextFormatCrud() {
     ));
     $format->save();
     $this->verifyTextFormat($format);
-    $this->verifyFilters($format);
 
     // Disable the text format.
     $format->disable()->save();
@@ -89,8 +85,8 @@ function verifyTextFormat($format) {
     $t_args = array('%format' => $format->name);
     $default_langcode = language_default()->id;
 
-    // Verify filter_format_load().
-    $filter_format = filter_format_load($format->format);
+    // Verify the loaded filter has all properties.
+    $filter_format = entity_load('filter_format', $format->format);
     $this->assertEqual($filter_format->format, $format->format, format_string('filter_format_load: Proper format id for text format %format.', $t_args));
     $this->assertEqual($filter_format->name, $format->name, format_string('filter_format_load: Proper title for text format %format.', $t_args));
     $this->assertEqual($filter_format->cache, $format->cache, format_string('filter_format_load: Proper cache indicator for text format %format.', $t_args));
@@ -99,9 +95,8 @@ function verifyTextFormat($format) {
     $this->assertEqual($format->langcode, $default_langcode, format_string('filter_format_load: Proper language code for text format %format.', $t_args));
 
     // Verify the 'cache' text format property according to enabled filters.
-    $filters = filter_list_format($filter_format->format);
     $cacheable = TRUE;
-    foreach ($filters as $name => $filter) {
+    foreach ($format->filters() as $name => $filter) {
       // If this filter is not cacheable, update $cacheable accordingly, so we
       // can verify $format->cache after iterating over all filters.
       if ($filter->status && !$filter->cache) {
@@ -112,25 +107,4 @@ function verifyTextFormat($format) {
     $this->assertEqual($filter_format->cache, $cacheable, 'Text format contains proper cache property.');
   }
 
-  /**
-   * Verifies that filters are properly stored for a text format.
-   */
-  function verifyFilters($format) {
-    $filters = filter_list_format($format->format);
-    $format_filters = $format->filters();
-    foreach ($filters as $name => $filter) {
-      $t_args = array('%format' => $format->name, '%filter' => $name);
-
-      // Verify that filter status is properly stored.
-      $this->assertEqual($filter->status, $format_filters->get($name)->status, format_string('filter_list_format: Proper status for %filter in text format %format.', $t_args));
-
-      // Verify that filter settings were properly stored.
-      $this->assertEqual($filter->settings, $format_filters->get($name)->settings, format_string('filter_list_format: Proper filter settings for %filter in text format %format.', $t_args));
-
-      // Verify that each filter has a module name assigned.
-      $this->assertTrue(!empty($filter->module), format_string('filter_list_format: Proper module name for %filter in text format %format.', $t_args));
-    }
-    $this->assertEqual(count($filters), count($format_filters), 'filter_list_format: All filters for the format are present.');
-  }
-
 }
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php
index 4490b5a..ef25d64 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php
@@ -41,7 +41,7 @@ function setUp() {
    */
   function testInstallation() {
     // Verify that the format was installed correctly.
-    $format = filter_format_load('filter_test');
+    $format = entity_load('filter_format', 'filter_test');
     $this->assertTrue((bool) $format);
     $this->assertEqual($format->id(), 'filter_test');
     $this->assertEqual($format->label(), 'Test format');
@@ -82,7 +82,7 @@ function testInstallation() {
    */
   function testUpdateRoles() {
     // Verify role permissions declared in default config.
-    $format = filter_format_load('filter_test');
+    $format = entity_load('filter_format', 'filter_test');
     $this->assertEqual(array_keys(filter_get_roles_by_format($format)), array(
       DRUPAL_ANONYMOUS_RID,
       DRUPAL_AUTHENTICATED_RID,
@@ -95,7 +95,7 @@ function testUpdateRoles() {
     $format->save();
 
     // Verify that roles have not been updated.
-    $format = filter_format_load('filter_test');
+    $format = entity_load('filter_format', 'filter_test');
     $this->assertEqual(array_keys(filter_get_roles_by_format($format)), array(
       DRUPAL_ANONYMOUS_RID,
       DRUPAL_AUTHENTICATED_RID,
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultFormatTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultFormatTest.php
index 5df2a5e..fbf1a78 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultFormatTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultFormatTest.php
@@ -37,11 +37,12 @@ function testDefaultTextFormats() {
       );
       $this->drupalPost('admin/config/content/formats/add', $edit, t('Save configuration'));
       $this->resetFilterCaches();
-      $formats[] = filter_format_load($edit['format']);
+      $formats[] = entity_load('filter_format', $edit['format']);
     }
     list($first_format, $second_format) = $formats;
-    $first_user = $this->drupalCreateUser(array(filter_permission_name($first_format), filter_permission_name($second_format)));
-    $second_user = $this->drupalCreateUser(array(filter_permission_name($second_format)));
+    $second_format_permission = $second_format->getPermissionName();
+    $first_user = $this->drupalCreateUser(array($first_format->getPermissionName(), $second_format_permission));
+    $second_user = $this->drupalCreateUser(array($second_format_permission));
 
     // Adjust the weights so that the first and second formats (in that order)
     // are the two lowest weighted formats available to any user.
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php
index cfc5fdb..b99b8ce 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterFormatAccessTest.php
@@ -88,7 +88,7 @@ function setUp() {
       );
       $this->drupalPost('admin/config/content/formats/add', $edit, t('Save configuration'));
       $this->resetFilterCaches();
-      $formats[] = filter_format_load($edit['format']);
+      $formats[] = entity_load('filter_format', $edit['format']);
     }
     list($this->allowed_format, $this->second_allowed_format, $this->disallowed_format) = $formats;
     $this->drupalLogout();
@@ -97,8 +97,8 @@ function setUp() {
     $this->web_user = $this->drupalCreateUser(array(
       'create page content',
       'edit any page content',
-      filter_permission_name($this->allowed_format),
-      filter_permission_name($this->second_allowed_format),
+      $this->allowed_format->getPermissionName(),
+      $this->second_allowed_format->getPermissionName(),
     ));
 
     // Create an administrative user who has access to use all three formats.
@@ -106,9 +106,9 @@ function setUp() {
       'administer filters',
       'create page content',
       'edit any page content',
-      filter_permission_name($this->allowed_format),
-      filter_permission_name($this->second_allowed_format),
-      filter_permission_name($this->disallowed_format),
+      $this->allowed_format->getPermissionName(),
+      $this->second_allowed_format->getPermissionName(),
+      $this->disallowed_format->getPermissionName(),
     ));
   }
 
@@ -118,9 +118,10 @@ function setUp() {
   function testFormatPermissions() {
     // Make sure that a regular user only has access to the text formats for
     // which they were granted access.
-    $this->assertTrue(filter_access($this->allowed_format, $this->web_user), 'A regular user has access to a text format they were granted access to.');
-    $this->assertFalse(filter_access($this->disallowed_format, $this->web_user), 'A regular user does not have access to a text format they were not granted access to.');
-    $this->assertTrue(filter_access(filter_format_load(filter_fallback_format()), $this->web_user), 'A regular user has access to the fallback format.');
+    $fallback_format = entity_load('filter_format', filter_fallback_format());
+    $this->assertTrue($this->allowed_format->access('view', $this->web_user), 'A regular user has access to a text format they were granted access to.');
+    $this->assertFalse($this->disallowed_format->access('view', $this->web_user), 'A regular user does not have access to a text format they were not granted access to.');
+    $this->assertTrue($fallback_format->access('view', $this->web_user), 'A regular user has access to the fallback format.');
 
     // Perform similar checks as above, but now against the entire list of
     // available formats for this user.
@@ -130,8 +131,8 @@ function testFormatPermissions() {
 
     // Make sure that a regular user only has permission to use the format
     // they were granted access to.
-    $this->assertTrue(user_access(filter_permission_name($this->allowed_format), $this->web_user), 'A regular user has permission to use the allowed text format.');
-    $this->assertFalse(user_access(filter_permission_name($this->disallowed_format), $this->web_user), 'A regular user does not have permission to use the disallowed text format.');
+    $this->assertTrue(user_access($this->allowed_format->getPermissionName(), $this->web_user), 'A regular user has permission to use the allowed text format.');
+    $this->assertFalse(user_access($this->disallowed_format->getPermissionName(), $this->web_user), 'A regular user does not have permission to use the disallowed text format.');
 
     // Make sure that the allowed format appears on the node form and that
     // the disallowed format does not.
@@ -192,7 +193,7 @@ function testFormatRoles() {
     $this->assertFalse(in_array($this->disallowed_format->format, array_keys(filter_get_formats_by_role($rid))), 'A text format which a role does not have access to does not appear in the list of formats available to that role.');
 
     // Check that the fallback format is always allowed.
-    $this->assertEqual(filter_get_roles_by_format(filter_format_load(filter_fallback_format())), user_role_names(), 'All roles have access to the fallback format.');
+    $this->assertEqual(filter_get_roles_by_format(entity_load('filter_format', filter_fallback_format())), user_role_names(), 'All roles have access to the fallback format.');
     $this->assertTrue(in_array(filter_fallback_format(), array_keys(filter_get_formats_by_role($rid))), 'The fallback format appears in the list of allowed formats for any role.');
   }
 
@@ -292,7 +293,7 @@ function testFormatWidgetPermissions() {
     $this->drupalPost('node/' . $node->id() . '/edit', $edit, t('Save'));
     $this->assertUrl('node/' . $node->id());
     foreach (filter_formats() as $format) {
-      if ($format->format != filter_fallback_format()) {
+      if (!$format->isFallbackFormat()) {
         $format->disable()->save();
       }
     }
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterHtmlImageSecureTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterHtmlImageSecureTest.php
index bea3e82..90aaf1c 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterHtmlImageSecureTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterHtmlImageSecureTest.php
@@ -61,7 +61,7 @@ function setUp() {
       'access comments',
       'post comments',
       'skip comment approval',
-      filter_permission_name($filtered_html_format),
+      $filtered_html_format->getPermissionName(),
     ));
     $this->drupalLogin($this->web_user);
 
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
index 2023434..7c8fd39 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
@@ -56,7 +56,7 @@ function setUp() {
     ));
     $filtered_html_format->save();
 
-    $filtered_html_permission = filter_permission_name($filtered_html_format);
+    $filtered_html_permission = $filtered_html_format->getPermissionName();
     user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array($filtered_html_permission));
 
     $this->admin_user = $this->drupalCreateUser(array('administer modules', 'administer filters', 'administer site configuration'));
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterSettingsTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterSettingsTest.php
index 1b6c173..a11db5d 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterSettingsTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterSettingsTest.php
@@ -62,7 +62,7 @@ function testFilterDefaults() {
     filter_formats_reset();
 
     // Verify that saved filter settings have not been changed.
-    foreach (filter_list_format($filter_defaults_format->format) as $name => $filter) {
+    foreach ($filter_defaults_format->filters() as $name => $filter) {
       $this->assertEqual($filter->weight, $saved_settings[$name]['weight'], format_string('@name filter weight %saved equals %previous', array(
         '@name' => $name,
         '%saved' => $filter->weight,
diff --git a/core/modules/php/lib/Drupal/php/Tests/PhpFilterTest.php b/core/modules/php/lib/Drupal/php/Tests/PhpFilterTest.php
index 9a7212a..49e03b2 100644
--- a/core/modules/php/lib/Drupal/php/Tests/PhpFilterTest.php
+++ b/core/modules/php/lib/Drupal/php/Tests/PhpFilterTest.php
@@ -26,7 +26,7 @@ public static function getInfo() {
    */
   function testPhpFilter() {
     // Log in as a user with permission to use the PHP code text format.
-    $php_code_permission = filter_permission_name(filter_format_load('php_code'));
+    $php_code_permission = entity_load('filter_format', 'php_code')->getPermissionName();
     $web_user = $this->drupalCreateUser(array('access content', 'create page content', 'edit own page content', $php_code_permission));
     $this->drupalLogin($web_user);
 
diff --git a/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php b/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php
index a8a875c..80649a0 100644
--- a/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php
+++ b/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php
@@ -35,11 +35,11 @@ function setUp() {
 
     // Verify that the PHP code text format was inserted.
     $php_format_id = 'php_code';
-    $this->php_code_format = filter_format_load($php_format_id);
+    $this->php_code_format = entity_load('filter_format', $php_format_id);
     $this->assertEqual($this->php_code_format->name, 'PHP code', 'PHP code text format was created.');
 
     // Verify that the format has the PHP code filter enabled.
-    $filters = filter_list_format($php_format_id);
+    $filters = $this->php_code_format->filters();
     $this->assertTrue($filters->get('php_code')->status, 'PHP code filter is enabled.');
 
     // Verify that the format exists on the administration page.
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
index e2d0d9f..0b0bb8d 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
@@ -38,10 +38,10 @@ function setUp() {
 
     // Create and log in an administrative user having access to the Full HTML
     // text format.
-    $full_html_format = filter_format_load('full_html');
+    $full_html_format = entity_load('filter_format', 'full_html');
     $permissions = array(
       'administer filters',
-      filter_permission_name($full_html_format),
+      $full_html_format->getPermissionName(),
       'administer permissions',
       'create page content',
       'skip comment approval',
diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
index fecc0b8..ba1383f 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
@@ -35,7 +35,7 @@ function setUp() {
     ));
     $filtered_html_format->save();
 
-    $filtered_html_permission = filter_permission_name($filtered_html_format);
+    $filtered_html_permission = $filtered_html_format->getPermissionName();
     user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array($filtered_html_permission));
   }
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilterFormatUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilterFormatUpgradePathTest.php
index c48cc72..4c082ee 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilterFormatUpgradePathTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilterFormatUpgradePathTest.php
@@ -41,16 +41,14 @@ public function testFilterFormatUpgrade() {
     $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
 
     // Checks that all the formats were upgraded
-    $one = filter_format_load('format_one');
+    $one = entity_load('filter_format', 'format_one');
     $this->assertTrue(!empty($one), 'Filter Format one was successfully upgraded');
-    $two = filter_format_load('format_two');
+    $two = entity_load('filter_format', 'format_two');
     $this->assertTrue(!empty($two), 'Filter Format two was successfully upgraded');
 
-    // Filter format 'Three' is disabled, and filter_format_load should return
-    // FALSE. However the entity should be accessible using entity_load.
-    $three_disabled = filter_format_load('format_three');
+    // Filter format 'Three' is disabled.
     $three_entity = entity_load('filter_format', 'format_three');
-    $this->assertTrue(empty($three_disabled) && !empty($three_entity), 'Filter Format three was successfully upgraded and it is disabled');
+    $this->assertFalse($three_entity->status(), 'Filter Format three was successfully upgraded and it is disabled');
 
     // Check the access to the text formats.
 
@@ -75,7 +73,7 @@ public function testFilterFormatUpgrade() {
     $this->assertNoFieldChecked('edit-5-use-text-format-format-two', 'Use text format format_two permission for role is set correctly.');
 
     // Check that the format has the missing filter.
-    $two = filter_format_load('format_two');
+    $two = entity_load('filter_format', 'format_two');
     $this->assertTrue($two->filters()->has('missing_filter'));
 
     // Try to use a filter format with a missing filter, this should not throw
@@ -88,7 +86,7 @@ public function testFilterFormatUpgrade() {
     $this->assertRaw(t('The %filter filter is missing, and will be removed once this format is saved.', array('%filter' => 'missing_filter')));
     $this->drupalPost(NULL, array(), t('Save configuration'));
     filter_formats_reset();
-    $two = filter_format_load('format_two');
+    $two = entity_load('filter_format', 'format_two');
     $this->assertFalse($two->filters()->has('missing_filter'));
   }
 
diff --git a/core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php b/core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php
index 4627fb5..e529bb3 100644
--- a/core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php
+++ b/core/modules/text/lib/Drupal/text/Tests/TextFieldTest.php
@@ -188,7 +188,7 @@ function _testTextfieldWidgetsFormatted($field_type, $widget_type) {
     // Disable all text formats besides the plain text fallback format.
     $this->drupalLogin($this->admin_user);
     foreach (filter_formats() as $format) {
-      if ($format->format != filter_fallback_format()) {
+      if (!$format->isFallbackFormat()) {
         $this->drupalPost('admin/config/content/formats/manage/' . $format->format . '/disable', array(), t('Disable'));
       }
     }
@@ -230,9 +230,9 @@ function _testTextfieldWidgetsFormatted($field_type, $widget_type) {
     $this->drupalPost('admin/config/content/formats/add', $edit, t('Save configuration'));
     filter_formats_reset();
     $this->checkPermissions(array(), TRUE);
-    $format = filter_format_load($edit['format']);
+    $format = entity_load('filter_format', $edit['format']);
     $format_id = $format->format;
-    $permission = filter_permission_name($format);
+    $permission = $format->getPermissionName();
     $roles = $this->web_user->getRoles();
     $rid = $roles[0];
     user_role_grant_permissions($rid, array($permission));
diff --git a/core/modules/text/text.module b/core/modules/text/text.module
index 0bb7427..c1acc6e 100644
--- a/core/modules/text/text.module
+++ b/core/modules/text/text.module
@@ -120,7 +120,7 @@ function text_summary($text, $format = NULL, $size = NULL) {
 
   // Retrieve the filters of the specified text format, if any.
   if (isset($format)) {
-    $filters = filter_list_format($format);
+    $filters = entity_load('filter_format', $format)->filters();
     // If the specified format does not exist, return nothing. $text is already
     // filtered text, but the remainder of this function will not be able to
     // ensure a sane and secure summary.
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php b/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php
index fe74aa1..5a8cd0e 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserSignatureTest.php
@@ -62,7 +62,7 @@ function setUp() {
     ));
     $this->full_html_format->save();
 
-    user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array(filter_permission_name($this->filtered_html_format)));
+    user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array($this->filtered_html_format->getPermissionName()));
     $this->checkPermissions(array(), TRUE);
 
     // Create regular and administrative users.
@@ -70,7 +70,7 @@ function setUp() {
 
     $admin_permissions = array('administer comments');
     foreach (filter_formats() as $format) {
-      if ($permission = filter_permission_name($format)) {
+      if ($permission = $format->getPermissionName()) {
         $admin_permissions[] = $permission;
       }
     }
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTextTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTextTest.php
index 8205798..1b27ef4 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTextTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTextTest.php
@@ -37,6 +37,7 @@ protected function setUp() {
     parent::setUp();
 
     $this->installConfig(array('system', 'filter'));
+    $this->installSchema('user', array('users'));
   }
 
   public function testAreaText() {
