diff --git a/.htaccess b/.htaccess
index f4024c6..47d0f5b 100644
--- a/.htaccess
+++ b/.htaccess
@@ -2,6 +2,9 @@
 # Apache/PHP/Drupal settings:
 #
 
+php_value auto_prepend_file /Users/catch/xhprof/header.php
+php_value auto_append_file /Users/catch/xhprof/footer.php
+
 # Protect files and directories from prying eyes.
 <FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
   <IfModule mod_authz_core.c>
diff --git a/core/core.services.yml b/core/core.services.yml
index 62a0f3e..2229e08 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -1450,7 +1450,7 @@ services:
     arguments: [ '@state' ]
   asset.css.collection_optimizer:
     class: Drupal\Core\Asset\CssCollectionOptimizer
-    arguments: [ '@asset.css.collection_grouper', '@asset.css.optimizer', '@asset.css.dumper', '@state' ]
+    arguments: [ '@asset.css.collection_grouper', '@asset.css.optimizer', '@theme.manager' ]
   asset.css.optimizer:
     class: Drupal\Core\Asset\CssOptimizer
   asset.css.collection_grouper:
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 5cd3ce8..03af03b 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -15,7 +15,6 @@
 use Drupal\Component\Utility\UrlHelper;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Render\Markup;
-use Drupal\Core\Render\Renderer;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
 use Drupal\Core\PhpStorage\PhpStorageFactory;
 use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
@@ -578,7 +577,7 @@ function drupal_process_states(&$elements) {
   // element available, setting #attributes does not make sense, but a wrapper
   // is available, so setting #wrapper_attributes makes it work.
   $key = ($elements['#type'] == 'item') ? '#wrapper_attributes' : '#attributes';
-  $elements[$key]['data-drupal-states'] = JSON::encode($elements['#states']);
+  $elements[$key]['data-drupal-states'] = Json::encode($elements['#states']);
 }
 
 /**
@@ -1271,7 +1270,7 @@ function drupal_get_updaters() {
   if (!isset($updaters)) {
     $updaters = \Drupal::moduleHandler()->invokeAll('updater_info');
     \Drupal::moduleHandler()->alter('updater_info', $updaters);
-    uasort($updaters, array('Drupal\Component\Utility\SortArray', 'sortByWeightElement'));
+    uasort($updaters, array(SortArray::class, 'sortByWeightElement'));
   }
   return $updaters;
 }
@@ -1291,7 +1290,7 @@ function drupal_get_filetransfer_info() {
   if (!isset($info)) {
     $info = \Drupal::moduleHandler()->invokeAll('filetransfer_info');
     \Drupal::moduleHandler()->alter('filetransfer_info', $info);
-    uasort($info, array('Drupal\Component\Utility\SortArray', 'sortByWeightElement'));
+    uasort($info, array(SortArray::class, 'sortByWeightElement'));
   }
   return $info;
 }
diff --git a/core/lib/Drupal/Core/Asset/AssetDumper.php b/core/lib/Drupal/Core/Asset/AssetDumper.php
index 0504fa4..ed563c0 100644
--- a/core/lib/Drupal/Core/Asset/AssetDumper.php
+++ b/core/lib/Drupal/Core/Asset/AssetDumper.php
@@ -21,13 +21,16 @@ class AssetDumper implements AssetDumperInterface {
    * the aggregated contents of the files in $data. This forces proxies and
    * browsers to download new CSS when the CSS changes.
    */
-  public function dump($data, $file_extension) {
-    // Prefix filename to prevent blocking by firewalls which reject files
-    // starting with "ad*".
-    $filename = $file_extension. '_' . Crypt::hashBase64($data) . '.' . $file_extension;
-    // Create the css/ or js/ path within the files folder.
+  public function dump($data, $file_extension, $uri = NULL) {
     $path = 'public://' . $file_extension;
-    $uri = $path . '/' . $filename;
+    if (!isset($uri)) {
+      // Prefix filename to prevent blocking by firewalls which reject files
+      // starting with "ad*".
+      $filename = $file_extension . '_' . $group . '_' . Crypt::hashBase64($data) . '.' . $file_extension;
+      // Create the css/ or js/ path within the files folder.
+      $path = 'public://' . $file_extension;
+      $uri = $path . '/' . $filename;
+    }
     // Create the CSS or JS file.
     file_prepare_directory($path, FILE_CREATE_DIRECTORY);
     if (!file_exists($uri) && !file_unmanaged_save_data($data, $uri, FILE_EXISTS_REPLACE)) {
diff --git a/core/lib/Drupal/Core/Asset/AssetDumperInterface.php b/core/lib/Drupal/Core/Asset/AssetDumperInterface.php
index 5f70aa6..8b997eb 100644
--- a/core/lib/Drupal/Core/Asset/AssetDumperInterface.php
+++ b/core/lib/Drupal/Core/Asset/AssetDumperInterface.php
@@ -19,9 +19,12 @@
    * @param string $file_extension
    *   The file extension of this asset.
    *
+   * @param string $uri
+   *   (optional) The file URI to write to.
+   *
    * @return string
    *   An URI to access the dumped asset.
    */
-  public function dump($data, $file_extension);
+  public function dump($data, $file_extension, $uri);
 
 }
diff --git a/core/lib/Drupal/Core/Asset/AssetResolver.php b/core/lib/Drupal/Core/Asset/AssetResolver.php
index 742cb2c..c05e5f6 100644
--- a/core/lib/Drupal/Core/Asset/AssetResolver.php
+++ b/core/lib/Drupal/Core/Asset/AssetResolver.php
@@ -122,7 +122,24 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) {
     if ($cached = $this->cache->get($cid)) {
       return $cached->data;
     }
+    else {
+      $css = $this->getCssFromLibraries($libraries_to_load, $optimize);
+    }
+    if ($optimize) {
+      $css = \Drupal::service('asset.css.collection_optimizer')->optimize($css);
+    }
+    $this->cache->set($cid, $css, CacheBackendInterface::CACHE_PERMANENT, ['library_info']);
+
+    return $css;
+
+  }
 
+  /**
+   * Get css assets based on a list of libraries.
+   * @todo: interface.
+   */
+  public function getCssFromLibraries($libraries, $optimize) {
+    $theme_info = $this->themeManager->getActiveTheme();
     $css = [];
     $default_options = [
       'type' => 'file',
@@ -133,7 +150,7 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) {
       'browsers' => [],
     ];
 
-    foreach ($libraries_to_load as $library) {
+    foreach ($libraries as $library) {
       list($extension, $name) = explode('/', $library, 2);
       $definition = $this->libraryDiscovery->getLibraryByName($extension, $name);
       if (isset($definition['css'])) {
@@ -152,6 +169,7 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) {
           // Always add a tiny value to the weight, to conserve the insertion
           // order.
           $options['weight'] += count($css) / 1000;
+          $options['library'] = $library;
 
           // CSS files are being keyed by the full path.
           $css[$options['data']] = $options;
@@ -176,11 +194,6 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) {
       }
     }
 
-    if ($optimize) {
-      $css = \Drupal::service('asset.css.collection_optimizer')->optimize($css);
-    }
-    $this->cache->set($cid, $css, CacheBackendInterface::CACHE_PERMANENT, ['library_info']);
-
     return $css;
   }
 
diff --git a/core/lib/Drupal/Core/Asset/CssCollectionOptimizer.php b/core/lib/Drupal/Core/Asset/CssCollectionOptimizer.php
index 6cfca51..1c20033 100644
--- a/core/lib/Drupal/Core/Asset/CssCollectionOptimizer.php
+++ b/core/lib/Drupal/Core/Asset/CssCollectionOptimizer.php
@@ -8,6 +8,8 @@
 namespace Drupal\Core\Asset;
 
 use Drupal\Core\State\StateInterface;
+use \Drupal\Component\Utility\UrlHelper;
+use \Drupal\Core\Theme\ThemeManagerInterface;
 
 /**
  * Optimizes CSS assets.
@@ -29,18 +31,11 @@ class CssCollectionOptimizer implements AssetCollectionOptimizerInterface {
   protected $optimizer;
 
   /**
-   * An asset dumper.
+   * The theme manager.
    *
-   * @var \Drupal\Core\Asset\AssetDumper
+   * @var \Drupal\Core\Theme\ThemeManagerInterface
    */
-  protected $dumper;
-
-  /**
-   * The state key/value store.
-   *
-   * @var \Drupal\Core\State\StateInterface
-   */
-  protected $state;
+   protected $themeManager;
 
   /**
    * Constructs a CssCollectionOptimizer.
@@ -49,16 +44,11 @@ class CssCollectionOptimizer implements AssetCollectionOptimizerInterface {
    *   The grouper for CSS assets.
    * @param \Drupal\Core\Asset\AssetOptimizerInterface
    *   The optimizer for a single CSS asset.
-   * @param \Drupal\Core\Asset\AssetDumperInterface
-   *   The dumper for optimized CSS assets.
-   * @param \Drupal\Core\State\StateInterface
-   *   The state key/value store.
    */
-  public function __construct(AssetCollectionGrouperInterface $grouper, AssetOptimizerInterface $optimizer, AssetDumperInterface $dumper, StateInterface $state) {
+  public function __construct(AssetCollectionGrouperInterface $grouper, AssetOptimizerInterface $optimizer, ThemeManagerInterface $theme_manager) {
     $this->grouper = $grouper;
     $this->optimizer = $optimizer;
-    $this->dumper = $dumper;
-    $this->state = $state;
+    $this->themeManager = $theme_manager;
   }
 
   /**
@@ -78,15 +68,10 @@ public function __construct(AssetCollectionGrouperInterface $grouper, AssetOptim
   public function optimize(array $css_assets) {
     // Group the assets.
     $css_groups = $this->grouper->group($css_assets);
+    $key = $this->generateHash($css_groups);
 
-    // Now optimize (concatenate + minify) and dump each asset group, unless
-    // that was already done, in which case it should appear in
-    // drupal_css_cache_files.
-    // Drupal contrib can override this default CSS aggregator to keep the same
-    // grouping, optimizing and dumping, but change the strategy that is used to
-    // determine when the aggregate should be rebuilt (e.g. mtime, HTTPS …).
-    $map = $this->state->get('drupal_css_cache_files') ?: array();
     $css_assets = array();
+    $libraries = [];
     foreach ($css_groups as $order => $css_group) {
       // We have to return a single asset, not a group of assets. It is now up
       // to one of the pieces of code in the switch statement below to set the
@@ -101,38 +86,13 @@ public function optimize(array $css_assets) {
             $uri = $css_group['items'][0]['data'];
             $css_assets[$order]['data'] = $uri;
           }
-          // Preprocess (aggregate), unless the aggregate file already exists.
           else {
-            $key = $this->generateHash($css_group);
-            $uri = '';
-            if (isset($map[$key])) {
-              $uri = $map[$key];
-            }
-            if (empty($uri) || !file_exists($uri)) {
-              // Optimize each asset within the group.
-              $data = '';
-              foreach ($css_group['items'] as $css_asset) {
-                $data .= $this->optimizer->optimize($css_asset);
-              }
-              // Per the W3C specification at
-              // http://www.w3.org/TR/REC-CSS2/cascade.html#at-import, @import
-              // rules must precede any other style, so we move those to the
-              // top.
-              $regexp = '/@import[^;]+;/i';
-              preg_match_all($regexp, $data, $matches);
-              $data = preg_replace($regexp, '', $data);
-              $data = implode('', $matches[0]) . $data;
-              // Dump the optimized CSS for this group into an aggregate file.
-              $uri = $this->dumper->dump($data, 'css');
-              // Set the URI for this group's aggregate file.
-              $css_assets[$order]['data'] = $uri;
-              // Persist the URI for this aggregate file.
-              $map[$key] = $uri;
-              $this->state->set('drupal_css_cache_files', $map);
-            }
-            else {
-              // Use the persisted URI for the optimized CSS file.
-              $css_assets[$order]['data'] = $uri;
+            // To reproduce the full context of assets outside of the request,
+            // we must know the entire set of libraries used to generate all CSS
+            // groups, whether or not files in a group are from a particular
+            // library or not.
+            foreach ($css_group['items'] as $css_asset) {
+              $libraries[$css_asset['library']] = $css_asset['library'];
             }
             $css_assets[$order]['preprocessed'] = TRUE;
           }
@@ -156,6 +116,21 @@ public function optimize(array $css_assets) {
           break;
       }
     }
+    // Generate a URL for the group, but do not process it inline, this is
+    // done by \Drupal\system\controller\CssAssetController
+    $minimal_set = \Drupal::service('library.dependency_resolver')->getMinimalRepresentativeSubset($libraries);
+
+    foreach ($css_assets as $order => $css_asset) {
+      if (!empty($css_asset['preprocessed'])) {
+        $filename = 'css' . '_' . $order . '_' . $key . '.' . 'css';
+        // Create the css/ or js/ path within the files folder.
+        $path = 'public://' . 'css';
+        $uri = $path . '/' . $filename;
+        $theme_name = $this->themeManager->getActiveTheme()->getName();
+        $query = UrlHelper::buildQuery(['libraries' => $minimal_set, 'theme' => $theme_name]);
+        $css_assets[$order]['data'] = file_create_url($uri) . '?' . $query;
+      }
+    }
 
     return $css_assets;
   }
@@ -170,11 +145,13 @@ public function optimize(array $css_assets) {
    *   A hash to uniquely identify the given group of CSS assets.
    */
   protected function generateHash(array $css_group) {
-    $css_data = array();
-    foreach ($css_group['items'] as $css_file) {
-      $css_data[] = $css_file['data'];
+    $normalized = $css_group;
+    foreach ($normalized as $order => $group) {
+      foreach ($group['items'] as $key => $asset) {
+        unset($normalized[$order]['items'][$key]['weight']);
+      }
     }
-    return hash('sha256', serialize($css_data));
+    return hash('sha256', serialize($normalized));
   }
 
   /**
@@ -188,8 +165,6 @@ public function getAll() {
    * {@inheritdoc}
    */
   public function deleteAll() {
-    $this->state->delete('drupal_css_cache_files');
-
     $delete_stale = function($uri) {
       // Default stale file threshold is 30 days.
       if (REQUEST_TIME - filemtime($uri) > \Drupal::config('system.performance')->get('stale_file_threshold')) {
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 676546c..d42c550 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -8,7 +8,6 @@
 namespace Drupal\Core;
 
 use Drupal\Component\FileCache\FileCacheFactory;
-use Drupal\Component\Utility\Crypt;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Utility\UrlHelper;
 use Drupal\Core\Config\BootstrapConfigStorageFactory;
diff --git a/core/lib/Drupal/Core/Entity/entity.api.php b/core/lib/Drupal/Core/Entity/entity.api.php
index 064ef01..ca1835e 100644
--- a/core/lib/Drupal/Core/Entity/entity.api.php
+++ b/core/lib/Drupal/Core/Entity/entity.api.php
@@ -5,7 +5,6 @@
  * Hooks and documentation related to entities.
  */
 
-use Drupal\Core\Entity\FieldableEntityInterface;
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Entity\ContentEntityInterface;
 use Drupal\Core\Entity\DynamicallyFieldableEntityStorageInterface;
diff --git a/core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php
index 0aef10c..ce56970 100644
--- a/core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php
@@ -8,7 +8,6 @@
 namespace Drupal\Core\EventSubscriber;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
-use Drupal\Core\Path\AliasManagerInterface;
 use Drupal\Core\Routing\RedirectDestinationInterface;
 use Psr\Log\LoggerInterface;
 use Symfony\Component\HttpFoundation\Response;
diff --git a/core/lib/Drupal/Core/Field/BaseFieldDefinition.php b/core/lib/Drupal/Core/Field/BaseFieldDefinition.php
index 1032438..37eaefc 100644
--- a/core/lib/Drupal/Core/Field/BaseFieldDefinition.php
+++ b/core/lib/Drupal/Core/Field/BaseFieldDefinition.php
@@ -515,7 +515,7 @@ public function getOptionsProvider($property_name, FieldableEntityInterface $ent
     // If the field item class implements the interface, create an orphaned
     // runtime item object, so that it can be used as the options provider
     // without modifying the entity being worked on.
-    if (is_subclass_of($this->getFieldItemClass(), '\Drupal\Core\TypedData\OptionsProviderInterface')) {
+    if (is_subclass_of($this->getFieldItemClass(), OptionsProviderInterface::class)) {
       $items = $entity->get($this->getName());
       return \Drupal::service('plugin.manager.field.field_type')->createFieldItem($items, 0);
     }
diff --git a/core/lib/Drupal/Core/Render/Element/Fieldset.php b/core/lib/Drupal/Core/Render/Element/Fieldset.php
index 417fb9f..3b7b46b 100644
--- a/core/lib/Drupal/Core/Render/Element/Fieldset.php
+++ b/core/lib/Drupal/Core/Render/Element/Fieldset.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\Render\Element;
 
-use Drupal\Core\Render\Element;
-
 /**
  * Provides a render element for a group of form elements.
  *
diff --git a/core/lib/Drupal/Core/Render/Element/Form.php b/core/lib/Drupal/Core/Render/Element/Form.php
index 3b38646..84df256 100644
--- a/core/lib/Drupal/Core/Render/Element/Form.php
+++ b/core/lib/Drupal/Core/Render/Element/Form.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\Render\Element;
 
-use Drupal\Core\Render\Element;
-
 /**
  * Provides a render element for a form.
  *
diff --git a/core/lib/Drupal/Core/Render/Element/HtmlTag.php b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
index d30b429..bd7e238 100644
--- a/core/lib/Drupal/Core/Render/Element/HtmlTag.php
+++ b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
@@ -28,7 +28,7 @@
  * Usage example:
  * @code
  * $build['hello'] = [
- *   '#type' => 'html_tag'
+ *   '#type' => 'html_tag',
  *   '#tag' => 'p',
  *   '#value' => $this->t('Hello World'),
  * ];
diff --git a/core/lib/Drupal/Core/Render/Element/Pager.php b/core/lib/Drupal/Core/Render/Element/Pager.php
index 72c98a9..7bb1afa 100644
--- a/core/lib/Drupal/Core/Render/Element/Pager.php
+++ b/core/lib/Drupal/Core/Render/Element/Pager.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\Render\Element;
 
-use Drupal\Core\Render\Element;
-
 /**
  * Provides a render element for a pager.
  *
diff --git a/core/lib/Drupal/Core/Render/Element/Textarea.php b/core/lib/Drupal/Core/Render/Element/Textarea.php
index efeebcd..c6b5f3f 100644
--- a/core/lib/Drupal/Core/Render/Element/Textarea.php
+++ b/core/lib/Drupal/Core/Render/Element/Textarea.php
@@ -8,7 +8,6 @@
 namespace Drupal\Core\Render\Element;
 
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 
 /**
  * Provides a form element for input of multiple-line text.
diff --git a/core/lib/Drupal/Core/Routing/MatcherDumper.php b/core/lib/Drupal/Core/Routing/MatcherDumper.php
index 44e6e03..30943e4 100644
--- a/core/lib/Drupal/Core/Routing/MatcherDumper.php
+++ b/core/lib/Drupal/Core/Routing/MatcherDumper.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\Core\Routing;
 
-use Drupal\Core\Database\Query\Query;
 use Drupal\Core\Database\SchemaObjectExistsException;
 use Drupal\Core\State\StateInterface;
 use Symfony\Component\Routing\RouteCollection;
diff --git a/core/lib/Drupal/Core/TypedData/TypedDataInterface.php b/core/lib/Drupal/Core/TypedData/TypedDataInterface.php
index 34636ba..2243a04 100644
--- a/core/lib/Drupal/Core/TypedData/TypedDataInterface.php
+++ b/core/lib/Drupal/Core/TypedData/TypedDataInterface.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\TypedData;
 
-use Drupal\user;
-
 /**
  * Interface for typed data objects.
  *
diff --git a/core/modules/block/migration_templates/d6_block.yml b/core/modules/block/migration_templates/d6_block.yml
index 6ab2a4c..8be7539 100644
--- a/core/modules/block/migration_templates/d6_block.yml
+++ b/core/modules/block/migration_templates/d6_block.yml
@@ -74,7 +74,6 @@ process:
       help: help
       header: header
       footer: footer
-  label: title
   weight: weight
   settings:
     plugin: block_settings
@@ -82,6 +81,7 @@ process:
       - '@plugin'
       - delta
       - settings
+      - title
   visibility:
     plugin: block_visibility
     source:
diff --git a/core/modules/block/migration_templates/d7_block.yml b/core/modules/block/migration_templates/d7_block.yml
index 628bf71..32e8f5d 100755
--- a/core/modules/block/migration_templates/d7_block.yml
+++ b/core/modules/block/migration_templates/d7_block.yml
@@ -75,7 +75,6 @@ process:
       help: help
       header: header
       footer: footer
-  label: title
   weight: weight
   settings:
     plugin: block_settings
@@ -83,6 +82,7 @@ process:
       - '@plugin'
       - delta
       - settings
+      - title
   visibility:
     plugin: block_visibility
     source:
diff --git a/core/modules/block/src/Plugin/migrate/process/BlockSettings.php b/core/modules/block/src/Plugin/migrate/process/BlockSettings.php
index ac36054..818ef49 100644
--- a/core/modules/block/src/Plugin/migrate/process/BlockSettings.php
+++ b/core/modules/block/src/Plugin/migrate/process/BlockSettings.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\block\Plugin\migrate\process;
 
+use Drupal\block\BlockInterface;
 use Drupal\migrate\MigrateExecutableInterface;
 use Drupal\migrate\ProcessPluginBase;
 use Drupal\migrate\Row;
@@ -24,8 +25,15 @@ class BlockSettings extends ProcessPluginBase {
    * Set the block configuration.
    */
   public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
-    list($plugin, $delta, $old_settings) = $value;
+    list($plugin, $delta, $old_settings, $title) = $value;
     $settings = array();
+    $settings['label'] = $title;
+    if ($title) {
+      $settings['label_display'] = BlockInterface::BLOCK_LABEL_VISIBLE;
+    }
+    else {
+      $settings['label_display'] = '0';
+    }
     switch ($plugin) {
       case 'aggregator_feed_block':
         list(, $id) = explode('-', $delta);
diff --git a/core/modules/block/src/Tests/Migrate/d6/MigrateBlockTest.php b/core/modules/block/src/Tests/Migrate/d6/MigrateBlockTest.php
index b5d4fa5..874723f 100644
--- a/core/modules/block/src/Tests/Migrate/d6/MigrateBlockTest.php
+++ b/core/modules/block/src/Tests/Migrate/d6/MigrateBlockTest.php
@@ -69,14 +69,22 @@ protected function setUp() {
    *   The theme.
    * @param string $weight
    *   The block weight.
+   * @param string $label
+   *   The block label.
+   * @param string $label_display
+   *   The block label display setting.
    */
-  public function assertEntity($id, $visibility, $region, $theme, $weight) {
+  public function assertEntity($id, $visibility, $region, $theme, $weight, $label, $label_display) {
     $block = Block::load($id);
     $this->assertTrue($block instanceof Block);
     $this->assertIdentical($visibility, $block->getVisibility());
     $this->assertIdentical($region, $block->getRegion());
     $this->assertIdentical($theme, $block->getTheme());
     $this->assertIdentical($weight, $block->getWeight());
+
+    $config = $this->config('block.block.' . $id);
+    $this->assertIdentical($label, $config->get('settings.label'));
+    $this->assertIdentical($label_display, $config->get('settings.label_display'));
   }
 
   /**
@@ -91,10 +99,10 @@ public function testBlockMigration() {
     $visibility['request_path']['id'] = 'request_path';
     $visibility['request_path']['negate'] = TRUE;
     $visibility['request_path']['pages'] = "<front>\n/node/1\n/blog/*";
-    $this->assertEntity('user', $visibility, 'sidebar_first', 'bartik', 0);
+    $this->assertEntity('user', $visibility, 'sidebar_first', 'bartik', 0, '', '0');
 
     $visibility = [];
-    $this->assertEntity('user_1', $visibility, 'sidebar_first', 'bartik', 0);
+    $this->assertEntity('user_1', $visibility, 'sidebar_first', 'bartik', 0, '', '0');
 
     $visibility['user_role']['id'] = 'user_role';
     $roles['authenticated'] = 'authenticated';
@@ -102,7 +110,7 @@ public function testBlockMigration() {
     $context_mapping['user'] = '@user.current_user_context:current_user';
     $visibility['user_role']['context_mapping'] = $context_mapping;
     $visibility['user_role']['negate'] = FALSE;
-    $this->assertEntity('user_2', $visibility, 'sidebar_second', 'bartik', -9);
+    $this->assertEntity('user_2', $visibility, 'sidebar_second', 'bartik', -9, '', '0');
 
     $visibility = [];
     $visibility['user_role']['id'] = 'user_role';
@@ -112,32 +120,32 @@ public function testBlockMigration() {
     $context_mapping['user'] = '@user.current_user_context:current_user';
     $visibility['user_role']['context_mapping'] = $context_mapping;
     $visibility['user_role']['negate'] = FALSE;
-    $this->assertEntity('user_3', $visibility, 'sidebar_second', 'bartik', -6);
+    $this->assertEntity('user_3', $visibility, 'sidebar_second', 'bartik', -6, '', '0');
 
     // Check system block
     $visibility = [];
     $visibility['request_path']['id'] = 'request_path';
     $visibility['request_path']['negate'] = TRUE;
     $visibility['request_path']['pages'] = '/node/1';
-    $this->assertEntity('system', $visibility, 'footer', 'bartik', -5);
+    $this->assertEntity('system', $visibility, 'footer', 'bartik', -5, '', '0');
 
     // Check menu blocks
     $visibility = [];
-    $this->assertEntity('menu', $visibility, 'header', 'bartik', -5);
+    $this->assertEntity('menu', $visibility, 'header', 'bartik', -5, '', '0');
 
     // Check custom blocks
     $visibility['request_path']['id'] = 'request_path';
     $visibility['request_path']['negate'] = FALSE;
     $visibility['request_path']['pages'] = '<front>';
-    $this->assertEntity('block', $visibility, 'content', 'bartik', 0);
+    $this->assertEntity('block', $visibility, 'content', 'bartik', 0, 'Static Block', 'visible');
 
     $visibility['request_path']['id'] = 'request_path';
     $visibility['request_path']['negate'] = FALSE;
     $visibility['request_path']['pages'] = '/node';
-    $this->assertEntity('block_1', $visibility, 'sidebar_second', 'bluemarine', -4);
+    $this->assertEntity('block_1', $visibility, 'sidebar_second', 'bluemarine', -4, 'Another Static Block', 'visible');
 
     $visibility = [];
-    $this->assertEntity('block_2', $visibility, 'right', 'test_theme', -7);
+    $this->assertEntity('block_2', $visibility, 'right', 'test_theme', -7, '', '0');
 
     // Custom block with php code is not migrated.
     $block = Block::load('block_3');
diff --git a/core/modules/block/src/Tests/Migrate/d7/MigrateBlockTest.php b/core/modules/block/src/Tests/Migrate/d7/MigrateBlockTest.php
index cecf468..f14f3fc 100644
--- a/core/modules/block/src/Tests/Migrate/d7/MigrateBlockTest.php
+++ b/core/modules/block/src/Tests/Migrate/d7/MigrateBlockTest.php
@@ -77,8 +77,13 @@ protected function setUp() {
    *   The theme.
    * @param string $weight
    *   The block weight.
+   * @param string $label
+   *   The block label.
+   * @param string $label_display
+   *   The block label display setting.
+
    */
-  public function assertEntity($id, $plugin_id, array $roles, $pages, $region, $theme, $weight) {
+  public function assertEntity($id, $plugin_id, array $roles, $pages, $region, $theme, $weight, $label, $label_display) {
     $block = Block::load($id);
     $this->assertTrue($block instanceof Block);
     /** @var \Drupal\block\BlockInterface $block */
@@ -96,24 +101,28 @@ public function assertEntity($id, $plugin_id, array $roles, $pages, $region, $th
     $this->assertIdentical($region, $block->getRegion());
     $this->assertIdentical($theme, $block->getTheme());
     $this->assertIdentical($weight, $block->getWeight());
+
+    $config = $this->config('block.block.' . $id);
+    $this->assertIdentical($label, $config->get('settings.label'));
+    $this->assertIdentical($label_display, $config->get('settings.label_display'));
   }
 
   /**
    * Tests the block migration.
    */
   public function testBlockMigration() {
-    $this->assertEntity('bartik_system_main', 'system_main_block', [], '', 'content', 'bartik', 0);
-    $this->assertEntity('bartik_search_form', 'search_form_block', [], '', 'sidebar_first', 'bartik', -1);
-    $this->assertEntity('bartik_user_login', 'user_login_block', [], '', 'sidebar_first', 'bartik', 0);
-    $this->assertEntity('bartik_system_powered-by', 'system_powered_by_block', [], '', 'footer', 'bartik', 10);
-    $this->assertEntity('seven_system_main', 'system_main_block', [], '', 'content', 'seven', 0);
-    $this->assertEntity('seven_user_login', 'user_login_block', [], '', 'content', 'seven', 10);
+    $this->assertEntity('bartik_system_main', 'system_main_block', [], '', 'content', 'bartik', 0, '', '0');
+    $this->assertEntity('bartik_search_form', 'search_form_block', [], '', 'sidebar_first', 'bartik', -1, '', '0');
+    $this->assertEntity('bartik_user_login', 'user_login_block', [], '', 'sidebar_first', 'bartik', 0, '', '0');
+    $this->assertEntity('bartik_system_powered-by', 'system_powered_by_block', [], '', 'footer', 'bartik', 10, '', '0');
+    $this->assertEntity('seven_system_main', 'system_main_block', [], '', 'content', 'seven', 0, '', '0');
+    $this->assertEntity('seven_user_login', 'user_login_block', [], '', 'content', 'seven', 10, '', '0');
 
     // The d7_custom_block migration should have migrated a block containing a
     // mildly amusing limerick. We'll need its UUID to determine
     // bartik_block_1's plugin ID.
     $uuid = BlockContent::load(1)->uuid();
-    $this->assertEntity('bartik_block_1', 'block_content:' . $uuid, ['authenticated'], '', 'highlighted', 'bartik', 0);
+    $this->assertEntity('bartik_block_1', 'block_content:' . $uuid, ['authenticated'], '', 'highlighted', 'bartik', 0, 'Mildly amusing limerick of the day', 'visible');
 
     // Assert that disabled blocks (or enabled blocks whose plugin IDs could
     // be resolved) did not migrate.
diff --git a/core/modules/book/book.services.yml b/core/modules/book/book.services.yml
index 06affbb..73c9484 100644
--- a/core/modules/book/book.services.yml
+++ b/core/modules/book/book.services.yml
@@ -1,7 +1,7 @@
 services:
   book.breadcrumb:
     class: Drupal\book\BookBreadcrumbBuilder
-    arguments: ['@entity.manager', '@access_manager', '@current_user']
+    arguments: ['@entity.manager', '@current_user']
     tags:
       - { name: breadcrumb_builder, priority: 701 }
   book.manager:
diff --git a/core/modules/book/src/BookBreadcrumbBuilder.php b/core/modules/book/src/BookBreadcrumbBuilder.php
index 2fc237c..5ca1c0d 100644
--- a/core/modules/book/src/BookBreadcrumbBuilder.php
+++ b/core/modules/book/src/BookBreadcrumbBuilder.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\book;
 
-use Drupal\Core\Access\AccessManagerInterface;
 use Drupal\Core\Breadcrumb\Breadcrumb;
 use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
@@ -31,13 +30,6 @@ class BookBreadcrumbBuilder implements BreadcrumbBuilderInterface {
   protected $nodeStorage;
 
   /**
-   * The access manager.
-   *
-   * @var \Drupal\Core\Access\AccessManagerInterface
-   */
-  protected $accessManager;
-
-  /**
    * The current user account.
    *
    * @var \Drupal\Core\Session\AccountInterface
@@ -49,14 +41,11 @@ class BookBreadcrumbBuilder implements BreadcrumbBuilderInterface {
    *
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
    *   The entity manager service.
-   * @param \Drupal\Core\Access\AccessManagerInterface $access_manager
-   *   The access manager.
    * @param \Drupal\Core\Session\AccountInterface $account
    *   The current user account.
    */
-  public function __construct(EntityManagerInterface $entity_manager, AccessManagerInterface $access_manager, AccountInterface $account) {
+  public function __construct(EntityManagerInterface $entity_manager, AccountInterface $account) {
     $this->nodeStorage = $entity_manager->getStorage('node');
-    $this->accessManager = $access_manager;
     $this->account = $account;
   }
 
diff --git a/core/modules/comment/src/CommentViewBuilder.php b/core/modules/comment/src/CommentViewBuilder.php
index 9b47b7c..ed8a4b2 100644
--- a/core/modules/comment/src/CommentViewBuilder.php
+++ b/core/modules/comment/src/CommentViewBuilder.php
@@ -13,7 +13,6 @@
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\EntityViewBuilder;
 use Drupal\Core\Language\LanguageManagerInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Session\AccountInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
diff --git a/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php
index 220b645..de1d346 100644
--- a/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php
+++ b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php
@@ -12,7 +12,6 @@
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Routing\UrlGeneratorTrait;
 use Drupal\Core\TypedData\DataDefinition;
 use Drupal\Core\Field\FieldItemBase;
diff --git a/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php b/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php
index 7ebbc83..3bd373d 100644
--- a/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php
+++ b/core/modules/comment/src/Plugin/migrate/destination/EntityComment.php
@@ -13,7 +13,6 @@
 use Drupal\Core\Field\FieldTypePluginManagerInterface;
 use Drupal\Core\State\StateInterface;
 use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\MigrateException;
 use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
 use Drupal\migrate\Row;
 use Symfony\Component\DependencyInjection\ContainerInterface;
diff --git a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php
index 3b9cb97..50882d9 100644
--- a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php
+++ b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php
@@ -11,7 +11,6 @@
 use Drupal\comment\CommentInterface;
 use Drupal\system\Tests\Entity\EntityUnitTestBase;
 use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\RequestStack;
 use Symfony\Component\HttpFoundation\Session\Session;
 use Drupal\comment\Entity\Comment;
 use Drupal\entity_test\Entity\EntityTest;
@@ -44,7 +43,7 @@ protected function setUp() {
     $request = Request::create('/');
     $request->setSession($session);
 
-    /** @var RequestStack $stack */
+    /** @var \Symfony\Component\HttpFoundation\RequestStack $stack */
     $stack = $this->container->get('request_stack');
     $stack->pop();
     $stack->push($request);
diff --git a/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideTest.php b/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideTest.php
index e559d80..58d6d55 100644
--- a/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideTest.php
+++ b/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\config\Tests;
 
-use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\config_override_test\Cache\PirateDayCacheContext;
 use Drupal\simpletest\KernelTestBase;
 
@@ -68,7 +67,7 @@ public function testConfigEntityOverride() {
     // Load the User login block and check that its cacheability metadata is
     // overridden correctly. This verifies that the metadata is correctly
     // applied to config entities.
-    /** @var EntityManagerInterface $entity_manager */
+    /** @var \Drupal\Core\Entity\EntityManagerInterface $entity_manager */
     $entity_manager = $this->container->get('entity.manager');
     $block = $entity_manager->getStorage('block')->load('call_to_action');
 
diff --git a/core/modules/config/src/Tests/ConfigFormOverrideTest.php b/core/modules/config/src/Tests/ConfigFormOverrideTest.php
index 14726c5..be1e9df 100644
--- a/core/modules/config/src/Tests/ConfigFormOverrideTest.php
+++ b/core/modules/config/src/Tests/ConfigFormOverrideTest.php
@@ -35,7 +35,7 @@ public function testFormsWithOverrides() {
     // Test that everything on the form is the same, but that the override
     // worked for the actual site name.
     $this->drupalGet('admin/config/system/site-information');
-    $this->assertTitle('Site information | ' . $overridden_name);
+    $this->assertTitle('Basic site settings | ' . $overridden_name);
     $elements = $this->xpath('//input[@name="site_name"]');
     $this->assertIdentical((string) $elements[0]['value'], 'Drupal');
 
@@ -44,7 +44,7 @@ public function testFormsWithOverrides() {
       'site_name' => 'Custom site name',
     );
     $this->drupalPostForm('admin/config/system/site-information', $edit, t('Save configuration'));
-    $this->assertTitle('Site information | ' . $overridden_name);
+    $this->assertTitle('Basic site settings | ' . $overridden_name);
     $elements = $this->xpath('//input[@name="site_name"]');
     $this->assertIdentical((string) $elements[0]['value'], $edit['site_name']);
   }
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index f139178..436f92b 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -14,7 +14,6 @@
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
-use Drupal\field\FieldConfigInterface;
 
 /**
  * Implements hook_help().
diff --git a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
index 320180f..02b4ced 100644
--- a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
+++ b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
@@ -10,7 +10,6 @@
 use Drupal\Component\Serialization\Json;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\node\Entity\NodeType;
 use Drupal\simpletest\WebTestBase;
 use Drupal\field\Entity\FieldStorageConfig;
 
@@ -31,7 +30,7 @@ class ContentTranslationContextualLinksTest extends WebTestBase {
   /**
    * The content type being tested.
    *
-   * @var NodeType
+   * @var \Drupal\node\Entity\NodeType
    */
   protected $contentType;
 
diff --git a/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php b/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php
index 63689a1..4b1b291 100644
--- a/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php
+++ b/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php
@@ -12,7 +12,6 @@
 use Drupal\Core\Cache\CacheableResponseInterface;
 use Drupal\Core\PageCache\RequestPolicyInterface;
 use Drupal\Core\PageCache\ResponsePolicyInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Render\RenderCacheInterface;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
diff --git a/core/modules/editor/src/Tests/EditorLoadingTest.php b/core/modules/editor/src/Tests/EditorLoadingTest.php
index 1511711..e6f3f55 100644
--- a/core/modules/editor/src/Tests/EditorLoadingTest.php
+++ b/core/modules/editor/src/Tests/EditorLoadingTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\editor\Tests;
 
-use Drupal\Core\Entity\Entity;
 use Drupal\editor\Entity\Editor;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
diff --git a/core/modules/field/src/Entity/FieldStorageConfig.php b/core/modules/field/src/Entity/FieldStorageConfig.php
index eaf14c6..a2117f8 100644
--- a/core/modules/field/src/Entity/FieldStorageConfig.php
+++ b/core/modules/field/src/Entity/FieldStorageConfig.php
@@ -15,7 +15,6 @@
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\Core\TypedData\OptionsProviderInterface;
 use Drupal\field\FieldStorageConfigInterface;
-use Drupal\field\Entity\FieldStorageConfig;
 
 /**
  * Defines the Field storage configuration entity.
@@ -650,7 +649,7 @@ public function getOptionsProvider($property_name, FieldableEntityInterface $ent
     // If the field item class implements the interface, create an orphaned
     // runtime item object, so that it can be used as the options provider
     // without modifying the entity being worked on.
-    if (is_subclass_of($this->getFieldItemClass(), '\Drupal\Core\TypedData\OptionsProviderInterface')) {
+    if (is_subclass_of($this->getFieldItemClass(), OptionsProviderInterface::class)) {
       $items = $entity->get($this->getName());
       return \Drupal::service('plugin.manager.field.field_type')->createFieldItem($items, 0);
     }
diff --git a/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
index 0d8c4b9..3376046 100644
--- a/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
+++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\Component\Utility\Unicode;
 use Drupal\field\Entity\FieldConfig;
-use Drupal\Core\Entity\Entity;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\field_ui\Tests\FieldUiTestTrait;
 use Drupal\node\Entity\Node;
diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module
index 2b1d06f..9c994d6 100644
--- a/core/modules/field/tests/modules/field_test/field_test.module
+++ b/core/modules/field/tests/modules/field_test/field_test.module
@@ -15,7 +15,6 @@
 
 use Drupal\field\FieldStorageConfigInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\field\Entity\FieldStorageConfig;
 
 require_once __DIR__ . '/field_test.entity.inc';
 require_once __DIR__ . '/field_test.field.inc';
diff --git a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
index 73479d1..0f7610f 100644
--- a/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/BulkDeleteTest.php
@@ -10,7 +10,6 @@
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Bulk delete storages and fields, and clean up afterwards.
diff --git a/core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php b/core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php
index 62fb2c3..ce95093 100644
--- a/core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php
+++ b/core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests exposing field definitions for configurable fields.
diff --git a/core/modules/field/tests/src/Kernel/DisplayApiTest.php b/core/modules/field/tests/src/Kernel/DisplayApiTest.php
index 71373c4..66bf1e9 100644
--- a/core/modules/field/tests/src/Kernel/DisplayApiTest.php
+++ b/core/modules/field/tests/src/Kernel/DisplayApiTest.php
@@ -11,7 +11,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests the field display API.
diff --git a/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php b/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
index 6ee13af..53fbd65 100644
--- a/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\Core\Form\FormState;
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests other Field API functions.
diff --git a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
index b9a4e45..2270edb 100644
--- a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php
@@ -9,7 +9,6 @@
 use Drupal\Component\Utility\Unicode;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests storage-related Field Attach API functions.
diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php
index 6959225..6dc35f4 100644
--- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php
@@ -13,7 +13,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\field\Entity\FieldConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Create field entities by attaching fields to entities.
diff --git a/core/modules/field/tests/src/Kernel/FieldDataCountTest.php b/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
index 4f9e4bc..5098bce 100644
--- a/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldDataCountTest.php
@@ -11,7 +11,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests counting field data records and the hasData() method on
diff --git a/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php b/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
index e22b1f3..e47b67d 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportChangeTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\Tests\field\Kernel;
 
 use Drupal\field\Entity\FieldConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Update field storage and fields during config change method invocation.
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
index ca3ef45..6b13207 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php
@@ -10,7 +10,6 @@
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Delete field storages and fields during config delete method invocation.
diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
index 6e96fc5..b1ba7a4 100644
--- a/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php
@@ -10,7 +10,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Delete field storages and fields during config synchronization and uninstall
diff --git a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
index 1548af8..7558eb0 100644
--- a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php
@@ -13,7 +13,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests field storage create, read, update, and delete.
diff --git a/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php b/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
index 76afec4..4961f19 100644
--- a/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
+++ b/core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php
@@ -10,7 +10,6 @@
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests the field type manager.
diff --git a/core/modules/field/tests/src/Kernel/FormatterPluginManagerTest.php b/core/modules/field/tests/src/Kernel/FormatterPluginManagerTest.php
index 88edb05..791689d 100644
--- a/core/modules/field/tests/src/Kernel/FormatterPluginManagerTest.php
+++ b/core/modules/field/tests/src/Kernel/FormatterPluginManagerTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\Tests\field\Kernel;
 
 use Drupal\Core\Field\BaseFieldDefinition;
-use Drupal\Core\Field\FormatterPluginManager;
 
 /**
  * Tests the field formatter plugin manager.
@@ -23,7 +22,7 @@ class FormatterPluginManagerTest extends FieldKernelTestBase {
    * @see \Drupal\field\Tests\WidgetPluginManagerTest::testNotApplicableFallback()
    */
   public function testNotApplicableFallback() {
-    /** @var FormatterPluginManager $formatter_plugin_manager */
+    /** @var \Drupal\Core\Field\FormatterPluginManager $formatter_plugin_manager */
     $formatter_plugin_manager = \Drupal::service('plugin.manager.field.formatter');
 
     $base_field_definition = BaseFieldDefinition::create('test_field')
diff --git a/core/modules/field/tests/src/Kernel/ShapeItemTest.php b/core/modules/field/tests/src/Kernel/ShapeItemTest.php
index ce96c82..38d3571 100644
--- a/core/modules/field/tests/src/Kernel/ShapeItemTest.php
+++ b/core/modules/field/tests/src/Kernel/ShapeItemTest.php
@@ -12,7 +12,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests the new entity API for the shape field type.
diff --git a/core/modules/field/tests/src/Kernel/TestItemTest.php b/core/modules/field/tests/src/Kernel/TestItemTest.php
index 71ba07b..4a4fc0d 100644
--- a/core/modules/field/tests/src/Kernel/TestItemTest.php
+++ b/core/modules/field/tests/src/Kernel/TestItemTest.php
@@ -13,7 +13,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests the new entity API for the test field type.
diff --git a/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php b/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
index b98471c..6c36f05 100644
--- a/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
+++ b/core/modules/field/tests/src/Kernel/TestItemWithDependenciesTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests the new entity API for the test field with dependencies type.
diff --git a/core/modules/field/tests/src/Kernel/TranslationTest.php b/core/modules/field/tests/src/Kernel/TranslationTest.php
index 3a11b85..3d31a12 100644
--- a/core/modules/field/tests/src/Kernel/TranslationTest.php
+++ b/core/modules/field/tests/src/Kernel/TranslationTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\Component\Utility\Unicode;
 use Drupal\field\Entity\FieldConfig;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\field\Entity\FieldStorageConfig;
 
diff --git a/core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php b/core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php
index 564f4fa..2cd9404 100644
--- a/core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php
+++ b/core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Tests\field\Kernel;
 use Drupal\Core\Field\BaseFieldDefinition;
-use Drupal\Core\Field\WidgetPluginManager;
-use Drupal\Tests\field\Kernel\FieldKernelTestBase;
 
 /**
  * Tests the field widget manager.
@@ -33,7 +31,7 @@ function testWidgetDefinitionAlter() {
    * @see \Drupal\field\Tests\FormatterPluginManagerTest::testNotApplicableFallback()
    */
   public function testNotApplicableFallback() {
-    /** @var WidgetPluginManager $widget_plugin_manager */
+    /** @var \Drupal\Core\Field\WidgetPluginManager $widget_plugin_manager */
     $widget_plugin_manager = \Drupal::service('plugin.manager.field.widget');
 
     $base_field_definition = BaseFieldDefinition::create('test_field')
diff --git a/core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php b/core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php
index 51d5540..9632bb8 100644
--- a/core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php
+++ b/core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\Tests\field\Unit;
 
-use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\simpletest\AssertHelperTrait;
 use Drupal\Tests\UnitTestCase;
 
diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module
index 597be4f..1517e5f 100644
--- a/core/modules/field_ui/field_ui.module
+++ b/core/modules/field_ui/field_ui.module
@@ -5,10 +5,8 @@
  * Allows administrators to attach custom fields to fieldable types.
  */
 
-use Drupal\Component\Utility\Html;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Entity\EntityViewModeInterface;
 use Drupal\Core\Entity\EntityFormModeInterface;
diff --git a/core/modules/field_ui/src/Form/EntityDisplayFormBase.php b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php
index e0b622a..f949190 100644
--- a/core/modules/field_ui/src/Form/EntityDisplayFormBase.php
+++ b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php
@@ -9,7 +9,6 @@
 
 use Drupal\Component\Plugin\Factory\DefaultFactory;
 use Drupal\Component\Plugin\PluginManagerBase;
-use Drupal\Component\Utility\Html;
 use Drupal\Core\Entity\EntityForm;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
@@ -17,7 +16,6 @@
 use Drupal\Core\Field\FieldTypePluginManagerInterface;
 use Drupal\Core\Field\PluginSettingsInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\field_ui\Element\FieldUiTable;
 use Drupal\field_ui\FieldUI;
diff --git a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
index 9b120c6..20b957b 100644
--- a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
+++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
@@ -9,7 +9,6 @@
 
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Field\FieldDefinitionInterface;
-use Drupal\Core\Field\FieldFilteredMarkup;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\Core\Field\WidgetBase;
diff --git a/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php b/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php
index c9a3fb1..8afbb06 100644
--- a/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php
+++ b/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\file\Tests;
 
 use Drupal\file\Entity\File;
-use Drupal\node\Entity\Node;
 
 /**
  * Uploads files to translated nodes.
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 71068b6..d42c81a 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -8,7 +8,6 @@
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Cache\Cache;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Template\Attribute;
diff --git a/core/modules/filter/src/FilterProcessResult.php b/core/modules/filter/src/FilterProcessResult.php
index 8fa963f..3d60c32 100644
--- a/core/modules/filter/src/FilterProcessResult.php
+++ b/core/modules/filter/src/FilterProcessResult.php
@@ -10,7 +10,6 @@
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\UrlHelper;
 use Drupal\Core\Render\BubbleableMetadata;
-use Drupal\Core\Template\Attribute;
 
 /**
  * Used to return values from a text filter plugin's processing method.
diff --git a/core/modules/image/src/Controller/ImageStyleDownloadController.php b/core/modules/image/src/Controller/ImageStyleDownloadController.php
index 4deea44..eda399a 100644
--- a/core/modules/image/src/Controller/ImageStyleDownloadController.php
+++ b/core/modules/image/src/Controller/ImageStyleDownloadController.php
@@ -12,7 +12,6 @@
 use Drupal\Core\Lock\LockBackendInterface;
 use Drupal\image\ImageStyleInterface;
 use Drupal\system\FileDownloadController;
-use Psr\Log\LoggerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\BinaryFileResponse;
 use Symfony\Component\HttpFoundation\Request;
diff --git a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
index 7d70e29..cf2b34e 100644
--- a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
+++ b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\image\Plugin\Field\FieldWidget;
 
-use Drupal\Core\Field\FieldFilteredMarkup;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Form\FormStateInterface;
diff --git a/core/modules/language/src/Element/LanguageConfiguration.php b/core/modules/language/src/Element/LanguageConfiguration.php
index 2fad091..74d36aa 100644
--- a/core/modules/language/src/Element/LanguageConfiguration.php
+++ b/core/modules/language/src/Element/LanguageConfiguration.php
@@ -10,7 +10,6 @@
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Render\Element\FormElement;
-use Drupal\language\Entity\ContentLanguageSettings;
 
 /**
  * Provides language element configuration.
@@ -41,7 +40,7 @@ public static function processLanguageConfiguration(&$element, FormStateInterfac
     // Avoid validation failure since we are moving the '#options' key in the
     // nested 'language' select element.
     unset($element['#options']);
-    /** @var ContentLanguageSettings $default_config */
+    /** @var \Drupal\language\Entity\ContentLanguageSettings $default_config */
     $default_config = $element['#default_value'];
     $element['langcode'] = array(
       '#type' => 'select',
diff --git a/core/modules/language/src/LanguageListBuilder.php b/core/modules/language/src/LanguageListBuilder.php
index e6b279d..ecbf347 100644
--- a/core/modules/language/src/LanguageListBuilder.php
+++ b/core/modules/language/src/LanguageListBuilder.php
@@ -14,7 +14,6 @@
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
-use Drupal\Core\Render\Element;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
diff --git a/core/modules/language/src/Tests/LanguageLocaleListTest.php b/core/modules/language/src/Tests/LanguageLocaleListTest.php
index ca13172..b3946b1 100644
--- a/core/modules/language/src/Tests/LanguageLocaleListTest.php
+++ b/core/modules/language/src/Tests/LanguageLocaleListTest.php
@@ -8,8 +8,6 @@
 namespace Drupal\language\Tests;
 
 use Drupal\simpletest\WebTestBase;
-use Drupal\Core\Language\Language;
-use Drupal\Core\Language\LanguageInterface;
 
 /**
  * Adds a new language with translations and tests language list order.
diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc
index fcf98c3..72e8cfe 100644
--- a/core/modules/locale/locale.bulk.inc
+++ b/core/modules/locale/locale.bulk.inc
@@ -208,7 +208,7 @@ function locale_translate_batch_import($file, array $options, &$context) {
       // Update the seek and the number of items in the $options array().
       $options['seek'] = $context['sandbox']['parse_state']['seek'];
       $options['items'] = $context['sandbox']['parse_state']['chunk_size'];
-      $report = GetText::fileToDatabase($file, $options);
+      $report = Gettext::fileToDatabase($file, $options);
       // If not yet finished with reading, mark progress based on size and
       // position.
       if ($report['seek'] < filesize($file->uri)) {
diff --git a/core/modules/locale/locale.compare.inc b/core/modules/locale/locale.compare.inc
index 2aa6526..e24490c 100644
--- a/core/modules/locale/locale.compare.inc
+++ b/core/modules/locale/locale.compare.inc
@@ -5,7 +5,6 @@
  * The API for comparing project translation status with available translation.
  */
 
-use Drupal\Core\Cache;
 use Drupal\Core\Utility\ProjectInfo;
 
 /**
diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc
index d4776d5..9b2be23 100644
--- a/core/modules/locale/locale.pages.inc
+++ b/core/modules/locale/locale.pages.inc
@@ -6,7 +6,6 @@
  */
 
 use Drupal\Core\Url;
-use Drupal\Core\Render\Element;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 
 /**
diff --git a/core/modules/locale/src/SourceString.php b/core/modules/locale/src/SourceString.php
index 48266d2..04f37c6 100644
--- a/core/modules/locale/src/SourceString.php
+++ b/core/modules/locale/src/SourceString.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\locale;
 
-use Drupal\locale\LocaleString;
-
 /**
  * Defines the locale source string object.
  *
diff --git a/core/modules/locale/src/StreamWrapper/TranslationsStream.php b/core/modules/locale/src/StreamWrapper/TranslationsStream.php
index aa2f985..1333250 100644
--- a/core/modules/locale/src/StreamWrapper/TranslationsStream.php
+++ b/core/modules/locale/src/StreamWrapper/TranslationsStream.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\locale\StreamWrapper;
 
-use Drupal\Core\Annotation\StreamWrapper;
 use Drupal\Core\StreamWrapper\LocalStream;
 use Drupal\Core\StreamWrapper\StreamWrapperInterface;
 
diff --git a/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php b/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php
index e03f061..271d804 100644
--- a/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php
+++ b/core/modules/locale/src/Tests/LocaleConfigTranslationTest.php
@@ -8,7 +8,7 @@
 namespace Drupal\locale\Tests;
 
 use Drupal\simpletest\WebTestBase;
-use Drupal\core\language\languageInterface;
+use Drupal\Core\Language\LanguageInterface;
 
 /**
  * Tests translation of configuration strings.
diff --git a/core/modules/menu_link_content/src/Tests/Migrate/d7/MigrateMenuLinkTest.php b/core/modules/menu_link_content/src/Tests/Migrate/d7/MigrateMenuLinkTest.php
index b38118b..5664dda 100644
--- a/core/modules/menu_link_content/src/Tests/Migrate/d7/MigrateMenuLinkTest.php
+++ b/core/modules/menu_link_content/src/Tests/Migrate/d7/MigrateMenuLinkTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\Core\Database\Database;
 use Drupal\Core\Menu\MenuTreeParameters;
-use Drupal\Core\Url;
 use Drupal\menu_link_content\Entity\MenuLinkContent;
 use Drupal\menu_link_content\MenuLinkContentInterface;
 use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module
index d3ad899..463f8ca 100644
--- a/core/modules/menu_ui/menu_ui.module
+++ b/core/modules/menu_ui/menu_ui.module
@@ -15,7 +15,6 @@
 use Drupal\Core\Link;
 use Drupal\Core\Menu\MenuLinkInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\menu_link_content\Entity\MenuLinkContent;
 use Drupal\node\NodeTypeInterface;
diff --git a/core/modules/migrate/src/Tests/MigrateEmbeddedDataTest.php b/core/modules/migrate/src/Tests/MigrateEmbeddedDataTest.php
index 17d0499..aa003df 100644
--- a/core/modules/migrate/src/Tests/MigrateEmbeddedDataTest.php
+++ b/core/modules/migrate/src/Tests/MigrateEmbeddedDataTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\migrate\Tests;
 
 use Drupal\migrate\Entity\Migration;
-use Drupal\migrate\Row;
 use Drupal\simpletest\KernelTestBase;
 
 /**
@@ -51,7 +50,7 @@ public function testEmbeddedData() {
 
     // Validate the plugin returns the source data that was provided.
     $results = [];
-    /** @var Row $row */
+    /** @var \Drupal\migrate\Row $row */
     foreach ($source as $row) {
       $data_row = $row->getSource();
       // The "data" row returned by getSource() also includes all source
diff --git a/core/modules/migrate/src/Tests/MigrateEventsTest.php b/core/modules/migrate/src/Tests/MigrateEventsTest.php
index 6bafdaf..4157dec 100644
--- a/core/modules/migrate/src/Tests/MigrateEventsTest.php
+++ b/core/modules/migrate/src/Tests/MigrateEventsTest.php
@@ -14,7 +14,6 @@
 use Drupal\migrate\Event\MigratePostRowSaveEvent;
 use Drupal\migrate\Event\MigratePreRowSaveEvent;
 use Drupal\migrate\MigrateMessage;
-use Drupal\migrate\Entity\MigrationInterface;
 use Drupal\migrate\Event\MigrateEvents;
 use Drupal\migrate\MigrateExecutable;
 use Drupal\simpletest\KernelTestBase;
@@ -84,7 +83,7 @@ public function testMigrateEvents() {
 
     $migration = Migration::create($config);
 
-    /** @var MigrationInterface $migration */
+    /** @var \Drupal\migrate\Entity\MigrationInterface $migration */
     $executable = new MigrateExecutable($migration, new MigrateMessage());
     // As the import runs, events will be dispatched, recording the received
     // information in state.
diff --git a/core/modules/migrate/tests/src/Unit/process/MigrationTest.php b/core/modules/migrate/tests/src/Unit/process/MigrationTest.php
index 03d7bd9..74e5bec 100644
--- a/core/modules/migrate/tests/src/Unit/process/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/MigrationTest.php
@@ -10,7 +10,6 @@
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\migrate\Entity\MigrationInterface;
 use Drupal\migrate\Plugin\migrate\process\Migration;
-use Drupal\migrate\Plugin\migrate\source\SourcePluginBase;
 use Drupal\migrate\Plugin\MigrateDestinationInterface;
 use Drupal\migrate\Plugin\MigrateIdMapInterface;
 use Drupal\migrate\Plugin\MigratePluginManager;
diff --git a/core/modules/node/src/Tests/Migrate/d6/MigrateNodeBuilderTest.php b/core/modules/node/src/Tests/Migrate/d6/MigrateNodeBuilderTest.php
index 774d344..3411fcd 100644
--- a/core/modules/node/src/Tests/Migrate/d6/MigrateNodeBuilderTest.php
+++ b/core/modules/node/src/Tests/Migrate/d6/MigrateNodeBuilderTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\node\Tests\Migrate\d6;
 
-use Drupal\migrate\Entity\MigrationInterface;
 use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
 use Drupal\migrate\Entity\Migration;
 
@@ -17,7 +16,7 @@
 class MigrateNodeBuilderTest extends MigrateDrupal6TestBase {
 
   /**
-   * @var MigrationInterface[]
+   * @var \Drupal\migrate\Entity\MigrationInterface[]
    */
   protected $builtMigrations = [];
 
diff --git a/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTest.php b/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTest.php
index b25c270..febcf9e 100644
--- a/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTest.php
+++ b/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\migrate\Entity\Migration;
 use Drupal\Core\Database\Database;
-use Drupal\migrate\Entity\MigrationInterface;
 use Drupal\migrate\Plugin\MigrateIdMapInterface;
 use Drupal\node\Entity\Node;
 
diff --git a/core/modules/node/src/Tests/NodeTypeTest.php b/core/modules/node/src/Tests/NodeTypeTest.php
index 945c83f..8152cf5 100644
--- a/core/modules/node/src/Tests/NodeTypeTest.php
+++ b/core/modules/node/src/Tests/NodeTypeTest.php
@@ -10,7 +10,6 @@
 use Drupal\field\Entity\FieldConfig;
 use Drupal\node\Entity\NodeType;
 use Drupal\Core\Url;
-use Drupal\node\NodeTypeInterface;
 
 /**
  * Ensures that node type functions work correctly.
@@ -126,7 +125,7 @@ function testNodeTypeEditing() {
     $this->assertRaw('Body', 'Body field was found.');
 
     // Change the name through the API
-    /** @var NodeTypeInterface $node_type */
+    /** @var \Drupal\node\NodeTypeInterface $node_type */
     $node_type = NodeType::load('page');
     $node_type->set('name', 'NewBar');
     $node_type->save();
diff --git a/core/modules/options/tests/src/Kernel/OptionsFieldTest.php b/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
index 4eb5f1d..c1c04fe 100644
--- a/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
+++ b/core/modules/options/tests/src/Kernel/OptionsFieldTest.php
@@ -11,7 +11,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Tests\options\Kernel\OptionsFieldUnitTestBase;
 
 /**
  * Tests for the 'Options' field types.
diff --git a/core/modules/options/tests/src/Kernel/OptionsFormattersTest.php b/core/modules/options/tests/src/Kernel/OptionsFormattersTest.php
index 6e7ae11..53eb36d 100644
--- a/core/modules/options/tests/src/Kernel/OptionsFormattersTest.php
+++ b/core/modules/options/tests/src/Kernel/OptionsFormattersTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\Tests\options\Kernel;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\options\Kernel\OptionsFieldUnitTestBase;
 
 /**
  * Tests the Options field type formatters.
diff --git a/core/modules/path/path.module b/core/modules/path/path.module
index 24309b7..06efa7b 100644
--- a/core/modules/path/path.module
+++ b/core/modules/path/path.module
@@ -7,7 +7,6 @@
 
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
-use Drupal\Core\Field\FieldDefinition;
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
diff --git a/core/modules/rdf/tests/src/Kernel/Field/DateTimeFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/DateTimeFieldRdfaTest.php
index 33f6d1c..e128c74 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/DateTimeFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/DateTimeFieldRdfaTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 
 /**
  * Tests RDFa output by datetime field formatters.
diff --git a/core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php
index 346df36..3b57a81 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/EmailFieldRdfaTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 
 /**
  * Tests RDFa output by email field formatters.
diff --git a/core/modules/rdf/tests/src/Kernel/Field/EntityReferenceRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/EntityReferenceRdfaTest.php
index 47cf20b..27d2028 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/EntityReferenceRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/EntityReferenceRdfaTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\RoleInterface;
 
diff --git a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
index 8a28bad..fe338be 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaDatatypeCallbackTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 
 /**
  * Tests the RDFa output of a text field formatter with a datatype callback.
diff --git a/core/modules/rdf/tests/src/Kernel/Field/LinkFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/LinkFieldRdfaTest.php
index 405ba23..e65f271 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/LinkFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/LinkFieldRdfaTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 
 /**
  * Tests the placement of RDFa in link field formatters.
diff --git a/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php
index 31e66b0..52553a9 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 
 /**
  * Tests RDFa output by number field formatters.
diff --git a/core/modules/rdf/tests/src/Kernel/Field/StringFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/StringFieldRdfaTest.php
index 958af46..42da79b 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/StringFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/StringFieldRdfaTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 
 /**
  * Tests RDFa output by text field formatters.
diff --git a/core/modules/rdf/tests/src/Kernel/Field/TelephoneFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/TelephoneFieldRdfaTest.php
index eb88699..6f7bcae 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/TelephoneFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/TelephoneFieldRdfaTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 
 /**
  * Tests RDFa output by telephone field formatters.
diff --git a/core/modules/rdf/tests/src/Kernel/Field/TextFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/TextFieldRdfaTest.php
index 9a0a2cb..c8ad5e2 100644
--- a/core/modules/rdf/tests/src/Kernel/Field/TextFieldRdfaTest.php
+++ b/core/modules/rdf/tests/src/Kernel/Field/TextFieldRdfaTest.php
@@ -7,7 +7,6 @@
 namespace Drupal\Tests\rdf\Kernel\Field;
 
 use Drupal\entity_test\Entity\EntityTest;
-use Drupal\Tests\rdf\Kernel\Field\FieldRdfaTestBase;
 
 /**
  * Tests RDFa output by text field formatters.
diff --git a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
index 4b30b88..aa01d15 100644
--- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
+++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
@@ -13,7 +13,6 @@
 use Drupal\rest\Plugin\Type\ResourcePluginManager;
 use Drupal\rest\RequestHandler;
 use Drupal\rest\ResourceResponse;
-use Psr\Log\LoggerInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Routing\Route;
 
diff --git a/core/modules/search/src/Controller/SearchController.php b/core/modules/search/src/Controller/SearchController.php
index b3a379a..000ecf2 100644
--- a/core/modules/search/src/Controller/SearchController.php
+++ b/core/modules/search/src/Controller/SearchController.php
@@ -12,7 +12,6 @@
 use Drupal\Core\Render\RendererInterface;
 use Drupal\search\SearchPageInterface;
 use Drupal\search\SearchPageRepositoryInterface;
-use Psr\Log\LoggerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\Request;
 
diff --git a/core/modules/serialization/src/Tests/NormalizerTestBase.php b/core/modules/serialization/src/Tests/NormalizerTestBase.php
index db6a534..42c4bcc 100644
--- a/core/modules/serialization/src/Tests/NormalizerTestBase.php
+++ b/core/modules/serialization/src/Tests/NormalizerTestBase.php
@@ -30,7 +30,7 @@ protected function setUp() {
     \Drupal::moduleHandler()->invoke('rest', 'install');
 
     // Auto-create a field for testing.
-    FieldstorageConfig::create(array(
+    FieldStorageConfig::create(array(
       'entity_type' => 'entity_test_mulrev',
       'field_name' => 'field_test_text',
       'type' => 'text',
diff --git a/core/modules/simpletest/src/BrowserTestBase.php b/core/modules/simpletest/src/BrowserTestBase.php
index eab1c0f..dc933ac 100644
--- a/core/modules/simpletest/src/BrowserTestBase.php
+++ b/core/modules/simpletest/src/BrowserTestBase.php
@@ -9,7 +9,6 @@
 
 use Behat\Mink\Driver\GoutteDriver;
 use Behat\Mink\Element\Element;
-use Behat\Mink\Exception\Exception;
 use Behat\Mink\Mink;
 use Behat\Mink\Session;
 use Drupal\Component\Utility\SafeMarkup;
@@ -189,7 +188,7 @@
    *
    * @var string.
    */
-  protected $minkDefaultDriverClass = '\Behat\Mink\Driver\GoutteDriver';
+  protected $minkDefaultDriverClass = GoutteDriver::class;
 
   /*
    * Mink default driver params.
diff --git a/core/modules/simpletest/src/TestDiscovery.php b/core/modules/simpletest/src/TestDiscovery.php
index 3538934..fab8833 100644
--- a/core/modules/simpletest/src/TestDiscovery.php
+++ b/core/modules/simpletest/src/TestDiscovery.php
@@ -11,7 +11,6 @@
 use Doctrine\Common\Reflection\StaticReflectionParser;
 use Drupal\Component\Annotation\Reflection\MockFileFinder;
 use Drupal\Component\Utility\NestedArray;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Extension\ExtensionDiscovery;
 use Drupal\Core\Extension\ModuleHandlerInterface;
diff --git a/core/modules/system/src/Controller/CssAssetController.php b/core/modules/system/src/Controller/CssAssetController.php
new file mode 100644
index 0000000..e0f158a
--- /dev/null
+++ b/core/modules/system/src/Controller/CssAssetController.php
@@ -0,0 +1,274 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\image\Controller\ImageStyleDownloadController.
+ */
+
+namespace Drupal\system\Controller;
+
+use Drupal\Component\Utility\Crypt;
+use Drupal\Core\Asset\CssCollectionGrouper;
+use Drupal\Core\Asset\CssCollectionOptimizer;
+use Drupal\Core\Theme\ThemeInitializationInterface;
+use Drupal\Core\Theme\ThemeManagerInterface;
+use Drupal\system\FileDownloadController;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\HttpFoundation\BinaryFileResponse;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
+use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
+use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
+
+/**
+ * Defines a controller to serve image styles.
+ */
+class CssAssetController extends FileDownloadController {
+
+  /**
+   * The library dependency resolver.
+   *
+   * @var \Drupal\Core\Asset\LibraryDependencyResolverInterface
+   */
+  protected $libraryDependencyResolver;
+
+  /**
+   * The Asset Resolver.
+   *
+   * @var \Drupal\Core\Asset\AssetResolverInterface
+   */
+  protected $assetResolver;
+
+  /**
+   * The Theme Initialization.
+   *
+   * @var Drupal\Core\Theme\ThemeInitializationInterface;
+   */
+  protected $themeInitialization;
+
+  /**
+   * The theme manager.
+   *
+   * @var Drupal\Core\Theme\ThemeManagerInterface;
+   */
+  protected $themeManager;
+
+  /**
+   * The CSS collection grouper.
+   *
+   * @var Drupal\Core\Asset\CssCollectionGrouper
+   */
+  protected $grouper;
+
+  /**
+   * A CSS asset optimizer.
+   *
+   * @var \Drupal\Core\Asset\CssOptimizer
+   */
+  protected $optimizer;
+
+  /**
+   * An asset dumper.
+   *
+   * @var \Drupal\Core\Asset\AssetDumperInterface
+   */
+  protected $dumper;
+
+  /**
+   * Constructs a CssAssetController object.
+   *
+   * @param \Drupal\Core\Asset\LibraryDependencyResolverInterface
+   *    The library dependency resolver.
+   * @param \Drupal\Core\Asset\AssetResolverInterface
+   *   The Asset resolver.
+   * @param \Drupal\Core\Theme\ThemeInitializationInterface
+   *   The theme initializer.
+   * @param \Drupal\Core\Theme\ThemeManagerInterface
+   *   The theme manager.
+   * @param \Drupal\Core\Asset\AssetCollectionGrouperInterface
+   *   The grouper for CSS assets.
+   * @param \Drupal\Core\Asset\AssetOptimizerInterface
+   *   The optimizer for a single CSS asset.
+   * @param \Drupal\Core\Asset\AssetDumperInterface
+   *   The asset dumper.
+   */
+  public function __construct($library_dependency_resolver, $asset_resolver, $theme_initialization, $theme_manager, $grouper, $optimizer, $dumper) {
+    $this->libraryDependencyResolver = $library_dependency_resolver;
+    $this->assetResolver = $asset_resolver;
+    $this->themeInitialization = $theme_initialization;
+    $this->themeManager = $theme_manager;
+    $this->grouper = $grouper;
+    $this->optimizer = $optimizer;
+    $this->dumper = $dumper;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('library.dependency_resolver'),
+      $container->get('asset.resolver'),
+      $container->get('theme.initialization'),
+      $container->get('theme.manager'),
+      $container->get('asset.css.collection_grouper'),
+      $container->get('asset.css.optimizer'),
+      $container->get('asset.css.dumper')
+    );
+  }
+
+  /**
+   * Generates a derivative, given a style and image path.
+   *
+   * After generating an image, transfer it to the requesting agent.
+   *
+   * @param \Symfony\Component\HttpFoundation\Request $request
+   *   The request object.
+   * @param $file_name
+   *   The file to deliver.
+   *
+   * @return \Symfony\Component\HttpFoundation\BinaryFileResponse|\Symfony\Component\HttpFoundation\Response
+   *   The transferred file as response or some error response.
+   *
+   * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
+   *   Thrown when the user does not have access to the file.
+   * @throws \Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException
+   *   Thrown when the file is still being generated.
+   */
+  public function deliver(Request $request, $file_name) {
+    $theme = $request->query->get('theme');
+    $active_theme = $this->themeInitialization->initTheme($theme);
+    $this->themeManager->setActiveTheme($active_theme);
+    $libraries = $this->libraryDependencyResolver->getLibrariesWithDependencies($request->query->get('libraries'));
+    $css_assets = $this->assetResolver->getCssFromLibraries($libraries, TRUE);
+
+    // Group the assets.
+    $css_groups = $this->grouper->group($css_assets);
+
+    // Now optimize (concatenate + minify) and dump each asset group, unless
+    // that was already done, in which case it should appear in
+    // drupal_css_cache_files.
+    // Drupal contrib can override this default CSS aggregator to keep the same
+    // grouping, optimizing and dumping, but change the strategy that is used to
+    // determine when the aggregate should be rebuilt (e.g. mtime, HTTPS …).
+    $css_assets = array();
+    $libraries = [];
+
+    $base_name = basename($file_name, '.css');
+
+    $file_parts = explode('_', $base_name);
+    // The group delta is the second segment of the filename, if it's not there
+    // then  the filename is invalid.
+    if (!isset($file_parts[1]) || !is_numeric($file_parts[1])) {
+      throw new BadRequestHttpException('Invalid filename');
+    }
+    $group_delta = $file_parts[1];
+
+    // The hash is the third segment of the filename.
+    // A non-matching hash does not necessarily mean a bad request, it could
+    // also mean that code is temporarily out of sync between different servers.
+    if (!isset($file_parts[2])) {
+      throw new BadRequestHttpException('Invalid filename');
+    }
+    $hash = $file_parts[2];
+
+    // If the group being requested does not exist, assume an invalid filename.
+    if (!isset($css_groups[$group_delta])) {
+      throw new BadRequestHttpException('Invalid filename');
+    }
+    $css_group = $css_groups[$group_delta];
+
+    // Only groups that are preprocessed will be requested, so don't try to
+    // process ones that aren't.
+    if (!$css_group['preprocess']) {
+      throw new BadRequestHttpException('Invalid filename');
+    }
+    $key = $this->generateHash($css_groups);
+
+
+    // The hash from the library definitions in code may not match the hash from
+    // the URL. This can be for three reasons:
+    // 1. Someone has requested an outdated URL, i.e. from a cached page, which
+    // matches a different version of the code base.
+    // 2. Someone has requrested an outdated URL during a deployment. This is
+    // the same case as #1 but a much shorter window.
+    // 3. Someone is attempting to craft an invalid URL in order to conduct a
+    // denial of service attack on the site.
+    //
+    // @todo: we could potentially hash the library definitions with the secret
+    // key to create an HMAC, so that only valid combinations of libraries are
+    // allowed.
+    // For now treat all of these the same, but if there's no match, don't write
+    // to the filesystem.
+    $match = TRUE;
+
+    $uri = 'public://css/' . $file_name;
+    if ($key !== $hash) {
+      // The file requested may have been written to disk by the time we got
+      // here. If it hasn't, and the hashes don't match, it's possible that a
+      // file matching the code base for this request already exists on disk, so
+      // use the filename matching this code base, not the one that generated
+      // the original filename for the request.
+      if (!file_exists($uri)) {
+        $uri = 'public://css/' . 'css_' . $group_delta . '_' . $hash . '.css';
+      }
+      // Either way, we didn't get a match.
+      $match = FALSE;
+    }
+    $headers = [
+      'Content-Type' => 'text/css',
+      'Cache-control' => 'private, no-store',
+    ];
+
+    if (!file_exists($uri)) {
+      // Optimize each asset within the group.
+      $data = '';
+      foreach ($css_group['items'] as $css_asset) {
+        $data .= $this->optimizer->optimize($css_asset);
+      }
+      // Per the W3C specification at
+      // http://www.w3.org/TR/REC-CSS2/cascade.html#at-import, @import
+      // rules must precede any other style, so we move those to the
+      // top.
+      $regexp = '/@import[^;]+;/i';
+      preg_match_all($regexp, $data, $matches);
+      $data = preg_replace($regexp, '', $data);
+      $data = implode('', $matches[0]) . $data;
+      // Dump the optimized CSS for this group into an aggregate file.
+      if ($match) {
+        $uri = $this->dumper->dump($data, 'css', $uri);
+      }
+      $headers = [
+        'Content-Type' => 'text/css',
+        'Cache-control' => 'private, no-store',
+      ];
+      // Generate response.
+      $response = new Response($data, 200, $headers);
+      return $response;
+    }
+    else {
+      return new BinaryFileResponse($uri, 200, $headers);
+    }
+  }
+
+  /**
+   * Generate a hash for a given group of CSS assets.
+   *
+   * @param array $css_group
+   *   A group of CSS assets.
+   *
+   * @return string
+   *   A hash to uniquely identify the given group of CSS assets.
+   */
+  protected function generateHash(array $css_group) {
+    $normalized = $css_group;
+    foreach ($normalized as $order => $group) {
+      foreach ($group['items'] as $key => $asset) {
+        unset($normalized[$order]['items'][$key]['weight']);
+      }
+    }
+    return hash('sha256', serialize($normalized));
+  }
+
+}
diff --git a/core/modules/system/src/Controller/ThemeController.php b/core/modules/system/src/Controller/ThemeController.php
index 7d64b5f..b6ac1dc 100644
--- a/core/modules/system/src/Controller/ThemeController.php
+++ b/core/modules/system/src/Controller/ThemeController.php
@@ -12,7 +12,6 @@
 use Drupal\Core\Config\UnmetDependenciesException;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Extension\ThemeHandlerInterface;
-use Drupal\Core\Routing\RouteBuilderInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
diff --git a/core/modules/system/src/Form/CronForm.php b/core/modules/system/src/Form/CronForm.php
index 63c6e8f..ca50f4c 100644
--- a/core/modules/system/src/Form/CronForm.php
+++ b/core/modules/system/src/Form/CronForm.php
@@ -15,7 +15,6 @@
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\State\StateInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\HttpFoundation\RedirectResponse;
 
 /**
  * Configure cron settings for this site.
diff --git a/core/modules/system/src/Form/ModulesListConfirmForm.php b/core/modules/system/src/Form/ModulesListConfirmForm.php
index ec57697..1fc6868 100644
--- a/core/modules/system/src/Form/ModulesListConfirmForm.php
+++ b/core/modules/system/src/Form/ModulesListConfirmForm.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\system\Form;
 
-use Drupal\Component\Render\MarkupInterface;
 use Drupal\Core\Config\PreExistingConfigException;
 use Drupal\Core\Config\UnmetDependenciesException;
 use Drupal\Core\Extension\ModuleHandlerInterface;
@@ -137,7 +136,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
   /**
    * Builds the message list for the confirmation form.
    *
-   * @return MarkupInterface[]
+   * @return \Drupal\Component\Render\MarkupInterface[]
    *   Array of markup for the list of messages on the form.
    *
    * @see \Drupal\system\Form\ModulesListForm::buildModuleList()
diff --git a/core/modules/system/src/Form/ModulesListExperimentalConfirmForm.php b/core/modules/system/src/Form/ModulesListExperimentalConfirmForm.php
index 2194612..db83264 100644
--- a/core/modules/system/src/Form/ModulesListExperimentalConfirmForm.php
+++ b/core/modules/system/src/Form/ModulesListExperimentalConfirmForm.php
@@ -7,9 +7,6 @@
 
 namespace Drupal\system\Form;
 
-use Drupal\Core\Form\ConfirmFormBase;
-use Drupal\Core\Form\FormStateInterface;
-
 /**
  * Builds a confirmation form for enabling experimental modules.
  */
diff --git a/core/modules/system/src/Routing/AssetRoutes.php b/core/modules/system/src/Routing/AssetRoutes.php
new file mode 100644
index 0000000..841fc67
--- /dev/null
+++ b/core/modules/system/src/Routing/AssetRoutes.php
@@ -0,0 +1,71 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Routing\AssetRoutes.
+ */
+
+namespace Drupal\system\Routing;
+
+use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
+use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\Routing\Route;
+
+/**
+ * Defines a routes callback  to register a url for serving assets.
+ */
+class AssetRoutes implements ContainerInjectionInterface {
+
+  /**
+   * The stream wrapper manager service.
+   *
+   * @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface
+   */
+  protected $streamWrapperManager;
+
+  /**
+   * Constructs an asset routes object.
+   *
+   * @param \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager
+   *   The stream wrapper manager service.
+   */
+  public function __construct(StreamWrapperManagerInterface $stream_wrapper_manager) {
+    $this->streamWrapperManager = $stream_wrapper_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('stream_wrapper_manager')
+    );
+  }
+
+  /**
+   * Returns an array of route objects.
+   *
+   * @return \Symfony\Component\Routing\Route[]
+   *   An array of route objects.
+   */
+  public function routes() {
+    $routes = array();
+    // Generate assets. If clean URLs are disabled image derivatives will always
+    // be served through the routing system. If clean URLs are enabled and the
+    // image derivative already exists, PHP will be bypassed.
+    $directory_path = $this->streamWrapperManager->getViaScheme('public')->getDirectoryPath();
+
+    $routes['system.css_asset'] = new Route(
+      '/' . $directory_path . '/css/{file_name}',
+      array(
+        '_controller' => 'Drupal\system\Controller\CssAssetController::deliver',
+      ),
+      array(
+        '_access' => 'TRUE',
+      )
+    );
+    return $routes;
+  }
+
+}
diff --git a/core/modules/system/src/Tests/Ajax/AjaxInGroupTest.php b/core/modules/system/src/Tests/Ajax/AjaxInGroupTest.php
index 9732d28..144f20e 100644
--- a/core/modules/system/src/Tests/Ajax/AjaxInGroupTest.php
+++ b/core/modules/system/src/Tests/Ajax/AjaxInGroupTest.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\system\Tests\Ajax;
 
-use Drupal\Core\Ajax\DataCommand;
-
 /**
  * Tests that form elements in groups work correctly with AJAX.
  *
diff --git a/core/modules/system/src/Tests/Common/EarlyRenderingControllerTest.php b/core/modules/system/src/Tests/Common/EarlyRenderingControllerTest.php
index b3b363a..67787db 100644
--- a/core/modules/system/src/Tests/Common/EarlyRenderingControllerTest.php
+++ b/core/modules/system/src/Tests/Common/EarlyRenderingControllerTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\system\Tests\Common;
 
-use Drupal\Core\Render\Element;
 use Drupal\Core\Url;
 use Drupal\simpletest\WebTestBase;
 
diff --git a/core/modules/system/src/Tests/Common/RenderTest.php b/core/modules/system/src/Tests/Common/RenderTest.php
index 98de2b5..61f7105 100644
--- a/core/modules/system/src/Tests/Common/RenderTest.php
+++ b/core/modules/system/src/Tests/Common/RenderTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\system\Tests\Common;
 
-use Drupal\Core\Render\Element;
 use Drupal\simpletest\KernelTestBase;
 
 /**
diff --git a/core/modules/system/src/Tests/System/AccessDeniedTest.php b/core/modules/system/src/Tests/System/AccessDeniedTest.php
index 43090eb..5c6c3bf 100644
--- a/core/modules/system/src/Tests/System/AccessDeniedTest.php
+++ b/core/modules/system/src/Tests/System/AccessDeniedTest.php
@@ -107,6 +107,6 @@ function testAccessDenied() {
     $this->drupalPostForm('admin/config/system/site-information', $edit, t('Log in'));
 
     // Check that we're still on the same page.
-    $this->assertText(t('Site information'));
+    $this->assertText(t('Basic site settings'));
   }
 }
diff --git a/core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php b/core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php
index 84c75d8..becf517 100644
--- a/core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php
+++ b/core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\system\Tests\Update;
 
 use Drupal\simpletest\WebTestBase;
-use Drupal\Core\Extension\ExtensionSchemaVersionException;
 
 /**
  * Tests that a module implementing hook_update_8000() causes an error to be
diff --git a/core/modules/system/system.links.menu.yml b/core/modules/system/system.links.menu.yml
index ba21cee..b5f9d87 100644
--- a/core/modules/system/system.links.menu.yml
+++ b/core/modules/system/system.links.menu.yml
@@ -18,7 +18,7 @@ system.admin_structure:
 system.themes_page:
   route_name: system.themes_page
   title: Appearance
-  description: 'Select and configure your themes.'
+  description: 'Select and configure themes.'
   parent: system.admin
   weight: -6
 system.modules_list:
@@ -40,7 +40,7 @@ system.admin_config_media:
   weight: -10
 system.file_system_settings:
   title: 'File system'
-  description: 'Tell Drupal where to store uploaded files and how they are accessed.'
+  description: 'Configure the location of uploaded files and how they are accessed.'
   parent: system.admin_config_media
   route_name: system.file_system_settings
 system.image_toolkit_settings:
@@ -56,64 +56,64 @@ system.admin_config_services:
 system.rss_feeds_settings:
   title: 'RSS publishing'
   parent: system.admin_config_services
-  description: 'Configure the site description, the number of items per feed and whether feeds should be titles/teasers/full-text.'
+  description: 'Configure the site description, the number of items per feed, and whether feeds should be titles/teasers/full-text.'
   route_name: system.rss_feeds_settings
 system.admin_config_development:
   route_name: system.admin_config_development
   parent: system.admin_config
   title: Development
-  description: 'Development tools.'
+  description: 'Configure and use development tools.'
   weight: -10
 system.site_maintenance_mode:
   title: 'Maintenance mode'
   parent: system.admin_config_development
-  description: 'Take the site offline for maintenance or bring it back online.'
+  description: 'Take the site offline for updates and other maintenance tasks.'
   route_name: system.site_maintenance_mode
   weight: -10
 system.performance_settings:
   title: Performance
   parent: system.admin_config_development
-  description: 'Enable or disable page caching for anonymous users and set CSS and JS bandwidth optimization options.'
+  description: 'Configure caching and bandwidth optimization.'
   route_name: system.performance_settings
   weight: -20
 system.logging_settings:
   title: 'Logging and errors'
   parent: system.admin_config_development
-  description: 'Settings for logging and alerts modules. Various modules can route Drupal''s system events to different destinations, such as syslog, database, email, etc.'
+  description: 'Configure the display of error messages and database logging.'
   route_name: system.logging_settings
   weight: -15
 system.admin_config_regional:
   route_name: system.admin_config_regional
   title: 'Regional and language'
   parent: system.admin_config
-  description: 'Regional settings, localization and translation.'
+  description: 'Configure regional settings, localization, and translation.'
   weight: -5
 system.regional_settings:
   title: 'Regional settings'
   parent: system.admin_config_regional
-  description: 'Settings for the site''s default time zone and country.'
+  description: 'Configure the locale and timezone settings.'
   route_name: system.regional_settings
   weight: -20
 entity.date_format.collection:
   title: 'Date and time formats'
   parent: system.admin_config_regional
-  description: 'Configure display format strings for date and time.'
+  description: 'Configure how dates and times are displayed.'
   route_name: entity.date_format.collection
   weight: -9
 system.admin_config_search:
   title: 'Search and metadata'
   route_name: system.admin_config_search
   parent: system.admin_config
-  description: 'Local site search, metadata and SEO.'
+  description: 'Configure site search, metadata, and search engine optimization.'
   weight: -10
 system.admin_config_system:
   title: System
   route_name: system.admin_config_system
   parent: system.admin_config
-  description: 'General system related configuration.'
+  description: 'Configure basic site settings, actions, and cron.'
   weight: -20
 system.site_information_settings:
-  title: 'Site information'
+  title: 'Basic site settings'
   parent: system.admin_config_system
   description: 'Change site name, email address, slogan, default front page, and error pages.'
   route_name: system.site_information_settings
@@ -128,19 +128,19 @@ system.admin_config_ui:
   title: 'User interface'
   route_name: system.admin_config_ui
   parent: system.admin_config
-  description: 'Tools that enhance the user interface.'
+  description: 'Configure the administrative user interface.'
   weight: -15
 system.admin_config_workflow:
   title: Workflow
   route_name: system.admin_config_workflow
   parent: system.admin_config
-  description: 'Content workflow, editorial workflow tools.'
+  description: 'Manage the content workflow.'
   weight: 5
 system.admin_config_content:
   title: 'Content authoring'
   route_name: system.admin_config_content
   parent: system.admin_config
-  description: 'Settings related to formatting and authoring content.'
+  description: 'Configure content formatting and authoring.'
   weight: -15
 system.admin_reports:
   title: Reports
@@ -151,5 +151,5 @@ system.admin_reports:
 system.status:
   title: 'Status report'
   parent: system.admin_reports
-  description: 'Get a status report about your site''s operation and any detected problems.'
+  description: 'Get a status report about your site''s operation.'
   route_name: system.status
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index d0ff53f..81b18ce 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -90,7 +90,7 @@ function system_help($route_name, RouteMatchInterface $route_match) {
       $output .= '<dt>' . t('Disabling drag-and-drop functionality') . '</dt>';
       $output .= '<dd>' . t('The default drag-and-drop user interface for ordering tables in the administrative interface presents a challenge for some users, including users of screen readers and other assistive technology. The drag-and-drop interface can be disabled in a table by clicking a link labeled "Show row weights" above the table. The replacement interface allows users to order the table by choosing numerical weights instead of dragging table rows.') . '</dd>';
       $output .= '<dt>' . t('Configuring basic site settings') . '</dt>';
-      $output .= '<dd>' . t('The System module provides pages for managing basic site configuration, including <a href=":date-time-settings">Date and time formats</a> and basic <a href=":site-info">Site information</a> (site name, email address to send mail from, home page, and error pages). Additional configuration pages are listed on the main <a href=":config">Configuration page</a>.', array(':date-time-settings' => \Drupal::url('entity.date_format.collection'), ':site-info' => \Drupal::url('system.site_information_settings'), ':config' => \Drupal::url('system.admin_config'))) . '</dd>';
+      $output .= '<dd>' . t('The System module provides pages for managing basic site configuration, including <a href=":date-time-settings">Date and time formats</a> and <a href=":site-info">Basic site settings</a> (site name, email address to send mail from, home page, and error pages). Additional configuration pages are listed on the main <a href=":config">Configuration page</a>.', array(':date-time-settings' => \Drupal::url('entity.date_format.collection'), ':site-info' => \Drupal::url('system.site_information_settings'), ':config' => \Drupal::url('system.admin_config'))) . '</dd>';
       $output .= '<dt>' . t('Checking site status') . '</dt>';
       $output .= '<dd>' . t('The <a href=":status">Status report</a> provides an overview of the configuration, status, and health of your site. Review this report to make sure there are not any problems to address, and to find information about the software your site and web server are using.', array(':status' => \Drupal::url('system.status'))) . '</dd>';
       $output .= '<dt>' . t('Using maintenance mode') . '</dt>';
diff --git a/core/modules/system/system.routing.yml b/core/modules/system/system.routing.yml
index 15f06e3..aa2dfe7 100644
--- a/core/modules/system/system.routing.yml
+++ b/core/modules/system/system.routing.yml
@@ -146,7 +146,7 @@ system.site_information_settings:
   path: '/admin/config/system/site-information'
   defaults:
     _form: 'Drupal\system\Form\SiteInformationForm'
-    _title: 'Site information'
+    _title: 'Basic site settings'
   requirements:
     _permission: 'administer site configuration'
 
@@ -485,3 +485,6 @@ system.entity_autocomplete:
     _controller: '\Drupal\system\Controller\EntityAutocompleteController::handleAutocomplete'
   requirements:
     _access: 'TRUE'
+
+route_callbacks:
+  - '\Drupal\system\Routing\AssetRoutes::routes'
diff --git a/core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php b/core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php
index 51cc8bd..b72d691 100644
--- a/core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php
+++ b/core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php
@@ -10,7 +10,6 @@
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Entity\Query\QueryFactory;
-use Drupal\Core\Routing\RouteMatchInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php
index 74c1878..56e3bba 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\entity_test\Entity;
 
-use Drupal\Core\Entity\EntityTypeInterface;
-
 /**
  * Defines a test entity class using a custom langcode entity key.
  *
diff --git a/core/modules/system/tests/modules/twig_loader_test/src/Loader/TestLoader.php b/core/modules/system/tests/modules/twig_loader_test/src/Loader/TestLoader.php
index 9f32969..ec6c038 100644
--- a/core/modules/system/tests/modules/twig_loader_test/src/Loader/TestLoader.php
+++ b/core/modules/system/tests/modules/twig_loader_test/src/Loader/TestLoader.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\twig_loader_test\Loader;
 
-use Drupal\Core\Template\Loader;
-
 /**
  * A test Twig loader.
  */
diff --git a/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTermNodeTest.php b/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTermNodeTest.php
index 8bf9e17..912e37d 100644
--- a/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTermNodeTest.php
+++ b/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTermNodeTest.php
@@ -8,8 +8,6 @@
 namespace Drupal\taxonomy\Tests\Migrate\d6;
 
 use Drupal\migrate\Entity\Migration;
-use Drupal\migrate\Plugin\MigrateIdMapInterface;
-use Drupal\migrate\Row;
 use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
 use Drupal\node\Entity\Node;
 
diff --git a/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyFieldInstanceTest.php b/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
index 8f2307d..bab6ae5 100644
--- a/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
+++ b/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
@@ -10,7 +10,6 @@
 use Drupal\field\Entity\FieldConfig;
 use Drupal\migrate\Entity\Migration;
 use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-use Drupal\taxonomy\Entity\Vocabulary;
 
 /**
  * Vocabulary field instance migration.
diff --git a/core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php b/core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php
index 361e7ce..681abc6 100644
--- a/core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php
+++ b/core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php
@@ -43,7 +43,7 @@ class AccessDeniedSubscriber implements EventSubscriberInterface {
    * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The URL generator.
    */
-  public function __construct(AccountInterface $account, URLGeneratorInterface $url_generator) {
+  public function __construct(AccountInterface $account, UrlGeneratorInterface $url_generator) {
     $this->account = $account;
     $this->setUrlGenerator($url_generator);
   }
diff --git a/core/modules/user/src/RegisterForm.php b/core/modules/user/src/RegisterForm.php
index 91d472f..fc8b0ca 100644
--- a/core/modules/user/src/RegisterForm.php
+++ b/core/modules/user/src/RegisterForm.php
@@ -7,10 +7,7 @@
 
 namespace Drupal\user;
 
-use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Entity\Query\QueryFactory;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Language\LanguageManagerInterface;
 
 /**
  * Form handler for the user register forms.
diff --git a/core/modules/user/src/Tests/Migrate/MigrateUserAdminPassTest.php b/core/modules/user/src/Tests/Migrate/MigrateUserAdminPassTest.php
index 5849650..ccae9f4 100644
--- a/core/modules/user/src/Tests/Migrate/MigrateUserAdminPassTest.php
+++ b/core/modules/user/src/Tests/Migrate/MigrateUserAdminPassTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\user\Tests\Migrate;
 
 use Drupal\migrate\Entity\Migration;
-use Drupal\migrate\MigrateExecutable;
 use Drupal\migrate\Tests\MigrateTestBase;
 use Drupal\user\Entity\User;
 
diff --git a/core/modules/user/src/Tests/Views/UserViewsFieldAccessTest.php b/core/modules/user/src/Tests/Views/UserViewsFieldAccessTest.php
index f3e4dc7..9c4cae0 100644
--- a/core/modules/user/src/Tests/Views/UserViewsFieldAccessTest.php
+++ b/core/modules/user/src/Tests/Views/UserViewsFieldAccessTest.php
@@ -8,7 +8,7 @@
 namespace Drupal\user\Tests\Views;
 
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\user\Entity\user;
+use Drupal\user\Entity\User;
 use Drupal\views\Tests\Handler\FieldFieldAccessTestBase;
 
 /**
diff --git a/core/modules/user/src/UserStorage.php b/core/modules/user/src/UserStorage.php
index ca877c3..206329e 100644
--- a/core/modules/user/src/UserStorage.php
+++ b/core/modules/user/src/UserStorage.php
@@ -7,16 +7,9 @@
 
 namespace Drupal\user;
 
-use Drupal\Core\Database\Connection;
-use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Entity\ContentEntityInterface;
-use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
-use Drupal\Core\Password\PasswordInterface;
 use Drupal\Core\Session\AccountInterface;
-use Drupal\Core\Language\LanguageManagerInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Controller class for users.
diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
index e70c542..6c8ada1 100644
--- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
@@ -13,7 +13,6 @@
 use Drupal\Component\Utility\UrlHelper;
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Renderer;
 use Drupal\Core\Url as CoreUrl;
 use Drupal\views\Plugin\views\HandlerBase;
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
diff --git a/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php b/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php
index 7ca2cc90..5269074 100644
--- a/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php
+++ b/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php
@@ -11,7 +11,6 @@
 use Drupal\views\ViewExecutable;
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
 use Drupal\views\Plugin\views\HandlerBase;
-use Drupal\views\Join;
 use Drupal\views\Views;
 
 /**
diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
index 148e053..65916ba 100644
--- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php
+++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
@@ -10,7 +10,6 @@
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
 use Drupal\views\Plugin\views\PluginBase;
 use Drupal\views\Plugin\views\wizard\WizardInterface;
diff --git a/core/modules/views/src/Tests/Handler/FieldCustomTest.php b/core/modules/views/src/Tests/Handler/FieldCustomTest.php
index cc3d92b..29e8258 100644
--- a/core/modules/views/src/Tests/Handler/FieldCustomTest.php
+++ b/core/modules/views/src/Tests/Handler/FieldCustomTest.php
@@ -8,8 +8,6 @@
 namespace Drupal\views\Tests\Handler;
 
 use Drupal\Component\Utility\Xss;
-use Drupal\Core\Render\RenderContext;
-use Drupal\views\Plugin\views\PluginBase;
 use Drupal\views\Tests\ViewKernelTestBase;
 use Drupal\views\Views;
 
diff --git a/core/modules/views/src/Tests/Handler/FieldRenderedEntityTest.php b/core/modules/views/src/Tests/Handler/FieldRenderedEntityTest.php
index 136a8e2..b9a74ac 100644
--- a/core/modules/views/src/Tests/Handler/FieldRenderedEntityTest.php
+++ b/core/modules/views/src/Tests/Handler/FieldRenderedEntityTest.php
@@ -11,7 +11,6 @@
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\user\Entity\Role;
 use Drupal\user\Entity\User;
 use Drupal\views\Entity\View;
 use Drupal\views\Tests\ViewKernelTestBase;
diff --git a/core/modules/views/src/Tests/ViewKernelTestBase.php b/core/modules/views/src/Tests/ViewKernelTestBase.php
index bc9d36a..4c3e4a5 100644
--- a/core/modules/views/src/Tests/ViewKernelTestBase.php
+++ b/core/modules/views/src/Tests/ViewKernelTestBase.php
@@ -8,7 +8,6 @@
 namespace Drupal\views\Tests;
 
 use Drupal\Core\Database\Query\SelectInterface;
-use Drupal\views\ViewsBundle;
 use Drupal\simpletest\KernelTestBase;
 
 /**
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 19c2b96..c6632a5 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -10,7 +10,6 @@
 use Drupal\Core\Database\Query\AlterableInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Url;
 use Drupal\views\Plugin\Derivative\ViewsLocalTask;
diff --git a/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php b/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php
index e82dc42..d3fdd6a 100644
--- a/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php
+++ b/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php
@@ -8,7 +8,6 @@
 namespace Drupal\views_ui\Form\Ajax;
 
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Url;
 use Drupal\views\ViewEntityInterface;
 use Drupal\views\ViewExecutable;
 use Drupal\views\Views;
diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php
index 284473c..818c4b4 100644
--- a/core/modules/views_ui/src/ViewEditForm.php
+++ b/core/modules/views_ui/src/ViewEditForm.php
@@ -15,7 +15,6 @@
 use Drupal\Core\Ajax\ReplaceCommand;
 use Drupal\Core\Datetime\DateFormatterInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Render\ElementInfoManagerInterface;
 use Drupal\Core\Url;
 use Drupal\user\SharedTempStoreFactory;
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index 8783c3e..784c59b 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -12,7 +12,6 @@
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\EventSubscriber\AjaxResponseSubscriber;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Url;
 use Drupal\views\Views;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\views\ViewExecutable;
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index e0936d0..150881c 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -12,6 +12,7 @@
 
   <!-- Only include specific sniffs that pass. This ensures that, if new sniffs are added, HEAD does not fail.-->
   <!-- Drupal sniffs -->
+  <rule ref="Drupal.Classes.UnusedUseStatement"/>
   <rule ref="Drupal.CSS.ClassDefinitionNameSpacing"/>
   <rule ref="Drupal.CSS.ColourDefinition"/>
   <rule ref="Drupal.Commenting.DocCommentStar"/>
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
index 5f8d510..53120e0 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/BundleConstraintValidatorTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\Core\TypedData\DataDefinition;
 use Drupal\KernelTests\KernelTestBase;
-use Drupal\system\Tests\TypedData;
 
 /**
  * Tests validation constraints for BundleConstraintValidator.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
index 1677b99..40031e5 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintValidatorTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\KernelTests\Core\Entity;
 
-use Drupal\system\Tests\TypedData;
 use Drupal\Core\TypedData\DataDefinition;
 
 /**
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
index c9f6528..f0995b8 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypeConstraintsTest.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\KernelTests\Core\Entity;
 
-use Drupal\system\Tests\TypedData;
-
 /**
  * Tests entity level validation constraints.
  *
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
index be55f04..49d451d 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php
@@ -12,7 +12,6 @@
 use Drupal\Core\Form\FormState;
 use Drupal\entity_test\Entity\EntityTestCompositeConstraint;
 use Drupal\KernelTests\KernelTestBase;
-use Drupal\system\Tests\TypedData;
 
 /**
  * Tests validation constraints for FieldWidgetConstraintValidatorTest.
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
index 0772447..8b8aabf 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\KernelTests\Core\Entity;
 
 use Drupal\Core\Field\BaseFieldDefinition;
-use Drupal\system\Tests\TypedData;
 
 /**
  * Tests validation constraints for ValidReferenceConstraintValidator.
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
index 5721c64..2076895 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
@@ -9,7 +9,6 @@
 
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Exception\LogicException;
 use Prophecy\Argument;
 
 /**
@@ -132,7 +131,7 @@ public function testSetParameterWithUnfrozenContainer() {
    *
    * @covers ::setParameter
    *
-   * @expectedException LogicException
+   * @expectedException \Symfony\Component\DependencyInjection\Exception\LogicException
    */
   public function testSetParameterWithFrozenContainer() {
     $this->container = new $this->containerClass($this->containerDefinition);
diff --git a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
index 0cb45d2..4a4c52a 100644
--- a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
+++ b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php
@@ -10,7 +10,6 @@
 use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
 use Symfony\Component\DependencyInjection\Container;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\EventDispatcher\Tests\AbstractEventDispatcherTest;
 use Symfony\Component\EventDispatcher\Tests\CallableClass;
 use Symfony\Component\EventDispatcher\Tests\TestEventListener;
 use Symfony\Component\EventDispatcher\Tests\ContainerAwareEventDispatcherTest as SymfonyContainerAwareEventDispatcherTest;
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
index b73bec2..c6829ff 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
@@ -11,7 +11,6 @@
 use Drupal\Core\Cache\CacheableMetadata;
 use Drupal\Tests\Core\Render\TestCacheableDependency;
 use Drupal\Tests\UnitTestCase;
-use Drupal\Core\Render\Element;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 
 /**
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
index ec66c7a..9657827 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
@@ -14,7 +14,6 @@
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Entity\EntityTypeRepositoryInterface;
 use Drupal\Tests\UnitTestCase;
-use Prophecy\Argument;
 
 /**
  * @coversDefaultClass \Drupal\Core\Entity\EntityManager
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
index c970bcf..41dccee 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
@@ -10,7 +10,6 @@
 use Drupal\Core\Entity\EntityType;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
-use Drupal\Core\StringTranslation\TranslationInterface;
 use Drupal\Tests\UnitTestCase;
 
 /**
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
index 3f1e2e0..4df1fcc 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@@ -10,9 +10,7 @@
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\Core\Entity\Entity;
 use Drupal\Core\Language\Language;
-use Drupal\entity_test\Entity\EntityTestMul;
 use Drupal\Tests\UnitTestCase;
 
 /**
diff --git a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
index 34eec8a..874b169 100644
--- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
@@ -11,7 +11,6 @@
 use Drupal\Core\Cache\CacheableMetadata;
 use Drupal\Core\Render\BubbleableMetadata;
 use Drupal\Tests\UnitTestCase;
-use Drupal\Core\Render\Element;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 
 /**
diff --git a/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php b/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php
index d2abbc0..98ff8b7 100644
--- a/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\Tests\Core\Render;
 
 use Drupal\Component\Utility\Html;
-use Drupal\Core\Render\Element;
 
 /**
  * @coversDefaultClass \Drupal\Core\Render\PlaceholderGenerator
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
index 5867b2b..e8d11b7 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\Core\Cache\MemoryBackend;
 use Drupal\Core\KeyValueStore\KeyValueMemoryFactory;
-use Drupal\Core\Render\Element;
 use Drupal\Core\State\State;
 use Drupal\Core\Cache\Cache;
 
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
index d32ba5a..75722dc 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\Tests\Core\Render;
 
 use Drupal\Component\Utility\Html;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Render\Markup;
 
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
index 7e7a129..8b63fb6 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Tests\Core\Render;
 
-use Drupal\Core\Render\Element;
-
 /**
  * @coversDefaultClass \Drupal\Core\Render\Renderer
  * @group Render
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
index 199d170..a0ea1bb 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
@@ -11,7 +11,6 @@
 use Drupal\Core\Cache\CacheableMetadata;
 use Drupal\Core\Cache\Context\ContextCacheKeys;
 use Drupal\Core\Cache\MemoryBackend;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Render\PlaceholderGenerator;
 use Drupal\Core\Render\PlaceholderingRenderCache;
 use Drupal\Core\Render\Renderer;
