diff --git a/composer.lock b/composer.lock
index 4260388861732ae49e2b9ed5387aae5516ca1d54..9d589c89b8c8a40519c1231b3bce968eb74026aa 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4173,6 +4173,68 @@
             "description": "Symfony DomCrawler Component",
             "homepage": "https://symfony.com",
             "time": "2017-02-21T09:12:04+00:00"
+        },
+        {
+            "name": "symfony/phpunit-bridge",
+            "version": "v3.2.8",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/phpunit-bridge.git",
+                "reference": "00916603c524b8048906de460b7ea0dfa1651281"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/00916603c524b8048906de460b7ea0dfa1651281",
+                "reference": "00916603c524b8048906de460b7ea0dfa1651281",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "conflict": {
+                "phpunit/phpunit": ">=6.0"
+            },
+            "suggest": {
+                "ext-zip": "Zip support is required when using bin/simple-phpunit",
+                "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
+            },
+            "bin": [
+                "bin/simple-phpunit"
+            ],
+            "type": "symfony-bridge",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.2-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Bridge\\PhpUnit\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony PHPUnit Bridge",
+            "homepage": "https://symfony.com",
+            "time": "2017-04-12T14:13:17+00:00"
         }
     ],
     "aliases": [],
diff --git a/core/composer.json b/core/composer.json
index 4f328ce1afb62d7b88fcb0c7564253094bee3ce3..0be4b81510e5ac82e10ce1d7693f476959c3045a 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -45,7 +45,8 @@
         "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
         "mikey179/vfsStream": "~1.2",
         "phpunit/phpunit": ">=4.8.35 <5",
-        "symfony/css-selector": "3.2.6"
+        "symfony/css-selector": "3.2.6",
+        "symfony/phpunit-bridge": "^3.2"
     },
     "replace": {
         "drupal/action": "self.version",
diff --git a/core/lib/Drupal/Component/Serialization/YamlSymfony.php b/core/lib/Drupal/Component/Serialization/YamlSymfony.php
index 390178f3f6428a50d4a63e66488d6fb83e5dc8c3..d35e09cd4821923b63cf2dbe116bbf16ab7cb452 100644
--- a/core/lib/Drupal/Component/Serialization/YamlSymfony.php
+++ b/core/lib/Drupal/Component/Serialization/YamlSymfony.php
@@ -17,8 +17,8 @@ class YamlSymfony implements SerializationInterface {
    */
   public static function encode($data) {
     try {
-      $yaml = new Dumper();
-      $yaml->setIndentation(2);
+      // Set the indentation to 2 to match Drupal's coding standards.
+      $yaml = new Dumper(2);
       return $yaml->dump($data, PHP_INT_MAX, 0, SymfonyYaml::DUMP_EXCEPTION_ON_INVALID_TYPE);
     }
     catch (\Exception $e) {
diff --git a/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php b/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php
index a5daa7203207b57bd124bbc12fe46b8b910b24d5..377533465ffe425a6215eb00928cbd8de9df9f88 100644
--- a/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php
@@ -2,9 +2,6 @@
 
 namespace Drupal\Tests\migrate\Unit\process;
 
-@trigger_error('The ' . __NAMESPACE__ . '\DedupeEntityTest is deprecated in
-Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use ' . __NAMESPACE__ . '\MakeUniqueEntityFieldTest', E_USER_DEPRECATED);
-
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Entity\Query\QueryInterface;
@@ -14,6 +11,7 @@
 /**
  * @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\DedupeEntity
  * @group migrate
+ * @group legacy
  */
 class DedupeEntityTest extends MigrateProcessTestCase {
 
diff --git a/core/modules/migrate/tests/src/Unit/process/MigrationTest.php b/core/modules/migrate/tests/src/Unit/process/MigrationTest.php
index 843d1e558b5df4cdaf1dbe9c29b16e92c49cbadc..cade905a4d4d3fc84f34f541aa4d7e3c1f2fb093 100644
--- a/core/modules/migrate/tests/src/Unit/process/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/MigrationTest.php
@@ -2,9 +2,6 @@
 
 namespace Drupal\Tests\migrate\Unit\process;
 
-@trigger_error('The ' . __NAMESPACE__ . '\MigrationTest is deprecated in
-Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use ' . __NAMESPACE__ . '\MigrationLookupTest', E_USER_DEPRECATED);
-
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\migrate\MigrateSkipProcessException;
 use Drupal\migrate\Plugin\MigrationInterface;
@@ -17,11 +14,9 @@
 use Prophecy\Argument;
 
 /**
- * @deprecated in Drupal 8.4.x, to be removed before Drupal 9.0.x. Use
- *   \Drupal\Tests\migrate\Unit\process\MigrationLookupTest instead.
- *
  * @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Migration
  * @group migrate
+ * @group legacy
  */
 class MigrationTest extends MigrateProcessTestCase {
 
diff --git a/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php b/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php
index 324bf1d570b4720f62ad9b550f12f1625fc991ee..e032cef9418b45c3eda8a6f1fe4b919da625afdc 100644
--- a/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php
+++ b/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php
@@ -35,9 +35,9 @@ public function testOutput() {
 
     // Check that there are <br> tags for the HTML output by
     // SimpletestUiPrinter.
-    $this->assertEqual($output[18], 'HTML output was generated<br />');
+    $this->assertEqual($output[19], 'HTML output was generated<br />');
     // Check that URLs are printed as HTML links.
-    $this->assertIdentical(strpos($output[19], '<a href="http'), 0);
+    $this->assertIdentical(strpos($output[20], '<a href="http'), 0);
   }
 
 }
diff --git a/core/modules/text/tests/src/Unit/Migrate/TextFieldTest.php b/core/modules/text/tests/src/Unit/Migrate/TextFieldTest.php
index 6d433eaf2d9a82d638c9861620e1fc97fe061470..7f703b799b3bbc6bcd0f2b02491234322593534b 100644
--- a/core/modules/text/tests/src/Unit/Migrate/TextFieldTest.php
+++ b/core/modules/text/tests/src/Unit/Migrate/TextFieldTest.php
@@ -11,6 +11,7 @@
 /**
  * @coversDefaultClass \Drupal\text\Plugin\migrate\cckfield\TextField
  * @group text
+ * @group legacy
  */
 class TextFieldTest extends UnitTestCase {
 
diff --git a/core/modules/views/config/schema/views.display.schema.yml b/core/modules/views/config/schema/views.display.schema.yml
index d17c48cf52e144e3fb37e9fc614f1f1e28d00faa..3e696143f1a0dd0ba853a126db15c53e203915bb 100644
--- a/core/modules/views/config/schema/views.display.schema.yml
+++ b/core/modules/views/config/schema/views.display.schema.yml
@@ -49,9 +49,6 @@ views.display.page:
         context:
           type: string
           label: 'Context'
-        expanded:
-          type: boolean
-          label: 'Expanded'
     tab_options:
       type: mapping
       label: 'Tab options'
diff --git a/core/modules/views/config/schema/views.filter.schema.yml b/core/modules/views/config/schema/views.filter.schema.yml
index 0dc8d35a47430e85650c0f0105c1e31fcddbd77a..00eb11a97632bff9794dc04b85789a0561d53ba0 100644
--- a/core/modules/views/config/schema/views.filter.schema.yml
+++ b/core/modules/views/config/schema/views.filter.schema.yml
@@ -31,14 +31,6 @@ views.filter.combine:
         type: string
         label: 'Field'
 
-views.filter_value.date:
-  type: views.filter_value.numeric
-  label: 'Date'
-  mapping:
-    type:
-      type: string
-      label: 'Type'
-
 views.filter_value.groupby_numeric:
   type: views.filter_value.numeric
   label: 'Group by numeric'
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tag_cache.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tag_cache.yml
index dc893efdd03579c1ef5af146cfd64a2034a4d4e3..08e2d3a06aa1d9785ee15244e6e65692cad189ae 100644
--- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tag_cache.yml
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_tag_cache.yml
@@ -59,7 +59,6 @@ display:
           type: string
           settings:
             link_to_entity: true
-          plugin_id: field
       filters:
         type:
           id: type
diff --git a/core/phpunit.xml.dist b/core/phpunit.xml.dist
index ef1ae3b6fad04bc17322e25fe4cdf10691cb219f..c85258d77f497d7b0556c2de011a430721b37dd2 100644
--- a/core/phpunit.xml.dist
+++ b/core/phpunit.xml.dist
@@ -45,6 +45,8 @@
     </testsuite>
   </testsuites>
   <listeners>
+    <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener">
+    </listener>
     <listener class="\Drupal\Tests\Listeners\DrupalStandardsListener">
     </listener>
   </listeners>
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
index 41ed9649ef0250934c72ae967bd9bfc9ac6b2080..038e018ea07d660362563abfbb8a3982f31574a0 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php
@@ -212,6 +212,8 @@ public function getParametersDataProvider() {
      * @covers ::getParameterCall
      *
      * @dataProvider getDefinitionsDataProvider
+     *
+     * @group legacy
      */
     public function testGetServiceDefinitions($services, $definition_services) {
       $this->containerDefinition['services'] = $definition_services;
@@ -477,6 +479,8 @@ protected function getServiceCall($id, $invalid_behavior = ContainerInterface::E
      * @covers ::getReferenceCall
      *
      * @dataProvider publicPrivateDataProvider
+     *
+     * @group legacy
      */
     public function testGetServiceDefinitionWithReferenceToAlias($public) {
       $bar_definition = new Definition('\stdClass');
@@ -532,6 +536,8 @@ public function publicPrivateDataProvider() {
      * getDecoratedService().
      *
      * @covers ::getServiceDefinition
+     *
+     * @group legacy
      */
     public function testGetServiceDefinitionForDecoratedService() {
       $bar_definition = new Definition('\stdClass');
diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
index 7f992bdef458b6ed97dff45da3215a746ef5e836..841ac05ff48788fa4824a0a5e8495ba0541e95ce 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php
@@ -66,6 +66,7 @@ public function testGetFileExtension() {
    * @dataProvider providerYamlFilesInCore
    */
   public function testYamlFiles($file) {
+    file_put_contents('/tmp/dup.txt', $file . "\n", FILE_APPEND);
     $data = file_get_contents($file);
     try {
       $this->assertEquals(YamlSymfony::decode($data), YamlPecl::decode($data), $file);
diff --git a/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php b/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php
index d2d7b855b5dae1675b773b58eb3e6c71350fc7ed..edd7b13de12b898c755e304eb2cd456d4091c59a 100644
--- a/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php
@@ -14,6 +14,7 @@
 /**
  * @coversDefaultClass \Drupal\FunctionalTests\AssertLegacyTrait
  * @group Assert
+ * @group legacy
  */
 class AssertLegacyTraitTest extends UnitTestCase {
 
diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
index 28040a603f68b47296c97c18f8ef309aadc92524..0b7aa25146a34f1f91ac3dac3b45235df1b26a49 100644
--- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
+++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php
@@ -70,6 +70,8 @@ protected function setUp() {
    *
    * @see \Drupal\Core\Controller\ControllerResolver::getArguments()
    * @see \Drupal\Core\Controller\ControllerResolver::doGetArguments()
+   *
+   * @group legacy
    */
   public function testGetArguments() {
     $controller = function(EntityInterface $entity, $user, RouteMatchInterface $route_match, ServerRequestInterface $psr_7) {
@@ -220,6 +222,8 @@ protected function assertCallableController($controller, $class, $output) {
    *
    * @covers ::getArguments
    * @covers ::doGetArguments
+   *
+   * @group legacy
    */
   public function testGetArgumentsWithRouteMatchAndRequest() {
     $request = Request::create('/test');
@@ -233,6 +237,8 @@ public function testGetArgumentsWithRouteMatchAndRequest() {
    *
    * @covers ::getArguments
    * @covers ::doGetArguments
+   *
+   * @group legacy
    */
   public function testGetArgumentsWithRouteMatchAndPsr7Request() {
     $request = Request::create('/test');
diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
index b9dc671faa6999f6db77e5b5147c8a6a85af0c10..c9bccceec9ce510caac74661c00fbc345ed47fca 100644
--- a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
@@ -261,6 +261,8 @@ public function testChainAddRemoveClasses() {
    *
    * @covers ::removeClass
    * @covers ::addClass
+   *
+   * @group legacy
    */
   public function testTwigAddRemoveClasses($template, $expected, $seed_attributes = []) {
     $loader = new \Twig_Loader_String();
diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
index c4805bc38218ac1f3aba716c72e34bdc15575eab..a872e305d4177ed9f2a02e3e64cc68383924b946 100644
--- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
@@ -15,6 +15,7 @@
  * Tests the twig extension.
  *
  * @group Template
+ * @group legacy
  *
  * @coversDefaultClass \Drupal\Core\Template\TwigExtension
  */
@@ -73,6 +74,8 @@ public function setUp() {
    * Tests the escaping
    *
    * @dataProvider providerTestEscaping
+   *
+   * @group legacy
    */
   public function testEscaping($template, $expected) {
     $twig = new \Twig_Environment(NULL, [
@@ -123,6 +126,8 @@ public function providerTestEscaping() {
 
   /**
    * Tests the active_theme function.
+   *
+   * @group legacy
    */
   public function testActiveTheme() {
     $active_theme = $this->getMockBuilder('\Drupal\Core\Theme\ActiveTheme')
@@ -183,6 +188,8 @@ public function testActiveThemePath() {
    * Tests the escaping of objects implementing MarkupInterface.
    *
    * @covers ::escapeFilter
+   *
+   * @group legacy
    */
   public function testSafeStringEscaping() {
     $twig = new \Twig_Environment(NULL, [
@@ -267,6 +274,8 @@ public function providerTestRenderVar() {
   /**
    * @covers ::escapeFilter
    * @covers ::bubbleArgMetadata
+   *
+   * @group legacy
    */
   public function testEscapeWithGeneratedLink() {
     $twig = new \Twig_Environment(NULL, [
diff --git a/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php b/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php
index e599463485a8f6f276d58a36c0af2aacb96d4001..1bbb9f4dd18ae41ff6cbb01a43809eda13cc65cd 100644
--- a/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php
@@ -16,6 +16,7 @@
  * Tests the twig sandbox policy.
  *
  * @group Template
+ * @group legacy
  *
  * @coversDefaultClass \Drupal\Core\Template\TwigSandboxPolicy
  */