diff --git a/core/composer.json b/core/composer.json
index 62c26c4ac5..62e765947d 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -30,7 +30,7 @@
         "symfony/validator": "~3.4.0",
         "symfony/process": "~3.4.0",
         "symfony/polyfill-iconv": "^1.0",
-        "symfony/yaml": "~3.4.5",
+        "symfony/yaml": "~3.4.0",
         "twig/twig": "^1.35.0",
         "doctrine/common": "^2.5",
         "doctrine/annotations": "^1.2",
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 5cc1236c1b..b4c731da3c 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -135,9 +135,6 @@ function install_drupal($class_loader, $settings = []) {
   $state = $install_state;
   if (!empty($install_state['installation_finished'])) {
     unset($GLOBALS['install_state']);
-    // If installation is finished ensure any further container rebuilds do not
-    // use the installer's service provider.
-    unset($GLOBALS['conf']['container_service_providers']['InstallerServiceProvider']);
   }
 
   // All available tasks for this page request are now complete. Interactive
diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
index e6741fcbea..27e9d789f0 100644
--- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
+++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
@@ -329,7 +329,10 @@ protected function loadFile($file)
             throw new InvalidArgumentException(sprintf('The service file "%s" is not valid.', $file));
         }
 
-        return $this->validate(Yaml::decode(file_get_contents($file)), $file);
+        // @todo Remove preg_replace() once
+        //   https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
+        $content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', file_get_contents($file));
+        return $this->validate(Yaml::decode($content), $file);
     }
 
     /**
diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
index 3165815b17..03990d8e46 100644
--- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
+++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
@@ -120,6 +120,9 @@ protected function prepareSettings() {
       // Add a listener to validate configuration schema on save.
       $yaml = new SymfonyYaml();
       $content = file_get_contents($directory . '/services.yml');
+      // @todo Remove preg_replace() once
+      //   https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
+      $content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', $content);
       $services = $yaml->parse($content);
       $services['services']['simpletest.config_schema_checker'] = [
         'class' => ConfigSchemaChecker::class,
@@ -165,7 +168,11 @@ protected function setContainerParameter($name, $value) {
     $filename = $this->siteDirectory . '/services.yml';
     chmod($filename, 0666);
 
-    $services = Yaml::decode(file_get_contents($filename));
+    // @todo Remove preg_replace() once
+    //   https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
+    $content = file_get_contents($filename);
+    $content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', $content);
+    $services = Yaml::decode($content);
     $services['parameters'][$name] = $value;
     file_put_contents($filename, Yaml::encode($services));
 
diff --git a/core/modules/big_pipe/js/big_pipe.es6.js b/core/modules/big_pipe/js/big_pipe.es6.js
index df72915a8e..b78eaa9c70 100644
--- a/core/modules/big_pipe/js/big_pipe.es6.js
+++ b/core/modules/big_pipe/js/big_pipe.es6.js
@@ -20,17 +20,16 @@
     // Ignore any placeholders that are not in the known placeholder list. Used
     // to avoid someone trying to XSS the site via the placeholdering mechanism.
     if (typeof drupalSettings.bigPipePlaceholderIds[placeholderId] !== 'undefined') {
-      const response = mapTextContentToAjaxResponse(content);
       // If we try to parse the content too early (when the JSON containing Ajax
-      // commands is still arriving), textContent will be empty or incomplete.
-      if (response === false) {
-        /**
-         * Mark as unprocessed so this will be retried later.
-         * @see bigPipeProcessDocument()
-         */
+      // commands is still arriving), textContent will be empty which will cause
+      // JSON.parse() to fail. Remove once so that it can be processed again
+      // later.
+      // @see bigPipeProcessDocument()
+      if (content === '') {
         $(this).removeOnce('big-pipe');
       }
       else {
+        const response = JSON.parse(content);
         // Create a Drupal.Ajax object without associating an element, a
         // progress indicator or a URL.
         const ajaxObject = Drupal.ajax({
@@ -46,28 +45,6 @@
     }
   }
 
-  /**
-   * Maps textContent of <script type="application/vnd.drupal-ajax"> to an AJAX response.
-   *
-   * @param {string} content
-   *   The text content of a <script type="application/vnd.drupal-ajax"> DOM node.
-   * @return {Array|boolean}
-   *   The parsed Ajax response containing an array of Ajax commands, or false in
-   *   case the DOM node hasn't fully arrived yet.
-   */
-  function mapTextContentToAjaxResponse(content) {
-    if (content === '') {
-      return false;
-    }
-
-    try {
-      return JSON.parse(content);
-    }
-    catch (e) {
-      return false;
-    }
-  }
-
   /**
    * Processes a streamed HTML document receiving placeholder replacements.
    *
diff --git a/core/modules/big_pipe/js/big_pipe.js b/core/modules/big_pipe/js/big_pipe.js
index b8a25f77cc..1464fdd968 100644
--- a/core/modules/big_pipe/js/big_pipe.js
+++ b/core/modules/big_pipe/js/big_pipe.js
@@ -11,11 +11,11 @@
     var content = this.textContent.trim();
 
     if (typeof drupalSettings.bigPipePlaceholderIds[placeholderId] !== 'undefined') {
-      var response = mapTextContentToAjaxResponse(content);
-
-      if (response === false) {
+      if (content === '') {
         $(this).removeOnce('big-pipe');
       } else {
+        var response = JSON.parse(content);
+
         var ajaxObject = Drupal.ajax({
           url: '',
           base: false,
@@ -28,18 +28,6 @@
     }
   }
 
-  function mapTextContentToAjaxResponse(content) {
-    if (content === '') {
-      return false;
-    }
-
-    try {
-      return JSON.parse(content);
-    } catch (e) {
-      return false;
-    }
-  }
-
   function bigPipeProcessDocument(context) {
     if (!context.querySelector('script[data-big-pipe-event="start"]')) {
       return false;
diff --git a/core/modules/hal/src/LinkManager/RelationLinkManager.php b/core/modules/hal/src/LinkManager/RelationLinkManager.php
index 803da7b45f..ec631416c9 100644
--- a/core/modules/hal/src/LinkManager/RelationLinkManager.php
+++ b/core/modules/hal/src/LinkManager/RelationLinkManager.php
@@ -70,7 +70,10 @@ public function getRelationUri($entity_type, $bundle, $field_name, $context = []
     // override the RelationLinkManager class/service to return the desired URL.
     $uri = $this->getLinkDomain($context) . "/rest/relation/$entity_type/$bundle/$field_name";
     $this->moduleHandler->alter('hal_relation_uri', $uri, $context);
-    $this->moduleHandler->alterDeprecated('This hook is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. Implement hook_hal_relation_uri_alter() instead.', 'rest_relation_uri', $uri, $context);
+    // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
+    // hook is invoked to maintain backwards compatibility
+    // @see https://www.drupal.org/node/2830467
+    $this->moduleHandler->alter('rest_relation_uri', $uri, $context);
     return $uri;
   }
 
diff --git a/core/modules/hal/src/LinkManager/TypeLinkManager.php b/core/modules/hal/src/LinkManager/TypeLinkManager.php
index 8145350144..47206d8afe 100644
--- a/core/modules/hal/src/LinkManager/TypeLinkManager.php
+++ b/core/modules/hal/src/LinkManager/TypeLinkManager.php
@@ -71,7 +71,10 @@ public function getTypeUri($entity_type, $bundle, $context = []) {
     // TypeLinkManager class/service to return the desired URL.
     $uri = $this->getLinkDomain($context) . "/rest/type/$entity_type/$bundle";
     $this->moduleHandler->alter('hal_type_uri', $uri, $context);
-    $this->moduleHandler->alterDeprecated('This hook is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. Implement hook_hal_type_uri_alter() instead.', 'rest_type_uri', $uri, $context);
+    // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
+    // hook is invoked to maintain backwards compatibility
+    // @see https://www.drupal.org/node/2830467
+    $this->moduleHandler->alter('rest_type_uri', $uri, $context);
     return $uri;
   }
 
diff --git a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php
index 50f887d1f8..95124bb9b6 100644
--- a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php
+++ b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php
@@ -13,7 +13,6 @@
 /**
  * @coversDefaultClass \Drupal\hal\LinkManager\LinkManager
  * @group hal
- * @group legacy
  */
 class HalLinkManagerTest extends KernelTestBase {
 
@@ -50,7 +49,6 @@ protected function setUp() {
   /**
    * @covers ::getTypeUri
    * @dataProvider providerTestGetTypeUri
-   * @expectedDeprecation The deprecated alter hook hook_rest_type_uri_alter() is implemented in these functions: hal_test_rest_type_uri_alter. This hook is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. Implement hook_hal_type_uri_alter() instead.
    */
   public function testGetTypeUri($link_domain, $entity_type, $bundle, array $context, $expected_return, array $expected_context) {
     $hal_settings = \Drupal::configFactory()->getEditable('hal.settings');
@@ -144,7 +142,6 @@ public function providerTestGetTypeUri() {
   /**
    * @covers ::getRelationUri
    * @dataProvider providerTestGetRelationUri
-   * @expectedDeprecation The deprecated alter hook hook_rest_relation_uri_alter() is implemented in these functions: hal_test_rest_relation_uri_alter. This hook is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. Implement hook_hal_relation_uri_alter() instead.
    */
   public function testGetRelationUri($link_domain, $entity_type, $bundle, $field_name, array $context, $expected_return, array $expected_context) {
     $hal_settings = \Drupal::configFactory()->getEditable('hal.settings');
diff --git a/core/modules/path/path.api.php b/core/modules/path/path.api.php
index 6a69f355d9..df20b95e90 100644
--- a/core/modules/path/path.api.php
+++ b/core/modules/path/path.api.php
@@ -15,9 +15,9 @@
  *
  * @param array $path
  *   The array structure is identical to that of the return value of
- *   \Drupal\Core\Path\AliasStorageInterface::save().
+ *   \Drupal\Core\Path\PathInterface::save().
  *
- * @see \Drupal\Core\Path\AliasStorageInterface::save()
+ * @see \Drupal\Core\Path\PathInterface::save()
  */
 function hook_path_insert($path) {
   db_insert('mytable')
@@ -33,9 +33,9 @@ function hook_path_insert($path) {
  *
  * @param array $path
  *   The array structure is identical to that of the return value of
- *   \Drupal\Core\Path\AliasStorageInterface::save().
+ *   \Drupal\Core\Path\PathInterface::save().
  *
- * @see \Drupal\Core\Path\AliasStorageInterface::save()
+ * @see \Drupal\Core\Path\PathInterface::save()
  */
 function hook_path_update($path) {
   if ($path['alias'] != $path['original']['alias']) {
@@ -51,9 +51,9 @@ function hook_path_update($path) {
  *
  * @param array $path
  *   The array structure is identical to that of the return value of
- *   \Drupal\Core\Path\AliasStorageInterface::save().
+ *   \Drupal\Core\Path\PathInterface::save().
  *
- * @see \Drupal\Core\Path\AliasStorageInterface::delete()
+ * @see \Drupal\Core\Path\PathInterface::delete()
  */
 function hook_path_delete($path) {
   db_delete('mytable')
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index 6670e5acc0..0e0ea2afd4 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -661,6 +661,10 @@ function simpletest_clean_environment() {
   else {
     drupal_set_message(t('Clear results is disabled and the test results table will not be cleared.'), 'warning');
   }
+
+  // Detect test classes that have been added, renamed or deleted.
+  \Drupal::cache()->delete('simpletest');
+  \Drupal::cache()->delete('simpletest_phpunit');
 }
 
 /**
diff --git a/core/modules/simpletest/simpletest.services.yml b/core/modules/simpletest/simpletest.services.yml
index 326cf38f2d..8b645deb24 100644
--- a/core/modules/simpletest/simpletest.services.yml
+++ b/core/modules/simpletest/simpletest.services.yml
@@ -1,9 +1,4 @@
 services:
   test_discovery:
     class: Drupal\simpletest\TestDiscovery
-    arguments: ['@app.root', '@class_loader', '@module_handler']
-  cache_context.test_discovery:
-    class: Drupal\simpletest\Cache\Context\TestDiscoveryCacheContext
-    arguments: ['@test_discovery', '@private_key']
-    tags:
-      - { name: cache.context}
+    arguments: ['@app.root', '@class_loader', '@module_handler', '@?cache.discovery']
diff --git a/core/modules/simpletest/src/Cache/Context/TestDiscoveryCacheContext.php b/core/modules/simpletest/src/Cache/Context/TestDiscoveryCacheContext.php
deleted file mode 100644
index e3d5cf351d..0000000000
--- a/core/modules/simpletest/src/Cache/Context/TestDiscoveryCacheContext.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-namespace Drupal\simpletest\Cache\Context;
-
-use Drupal\Core\Cache\CacheableMetadata;
-use Drupal\Core\Cache\Context\CacheContextInterface;
-use Drupal\Core\PrivateKey;
-use Drupal\Core\Site\Settings;
-use Drupal\simpletest\TestDiscovery;
-
-/**
- * Defines the TestDiscoveryCacheContext service.
- *
- * Cache context ID: 'test_discovery'.
- */
-class TestDiscoveryCacheContext implements CacheContextInterface {
-
-  /**
-   * The test discovery service.
-   *
-   * @var \Drupal\simpletest\TestDiscovery
-   */
-  protected $testDiscovery;
-
-  /**
-   * The private key service.
-   *
-   * @var \Drupal\Core\PrivateKey
-   */
-  protected $privateKey;
-
-  /**
-   * The hash of discovered test information.
-   *
-   * Services should not be stateful, but we only keep this information per
-   * request. That way we don't perform a file scan every time we need this
-   * hash. The test scan results are unlikely to change during the request.
-   *
-   * @var string
-   */
-  protected $hash;
-
-  /**
-   * Construct a test discovery cache context.
-   *
-   * @param \Drupal\simpletest\TestDiscovery $test_discovery
-   *   The test discovery service.
-   * @param \Drupal\Core\PrivateKey $private_key
-   *   The private key service.
-   */
-  public function __construct(TestDiscovery $test_discovery, PrivateKey $private_key) {
-    $this->testDiscovery = $test_discovery;
-    $this->privateKey = $private_key;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getLabel() {
-    return t('Test discovery');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getContext() {
-    if (empty($this->hash)) {
-      $tests = $this->testDiscovery->getTestClasses();
-      $this->hash = $this->hash(serialize($tests));
-    }
-    return $this->hash;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getCacheableMetadata() {
-    return new CacheableMetadata();
-  }
-
-  /**
-   * Hashes the given string.
-   *
-   * @param string $identifier
-   *   The string to be hashed.
-   *
-   * @return string
-   *   The hash.
-   */
-  protected function hash($identifier) {
-    return hash('sha256', $this->privateKey->get() . Settings::getHashSalt() . $identifier);
-  }
-
-}
diff --git a/core/modules/simpletest/src/Form/SimpletestTestForm.php b/core/modules/simpletest/src/Form/SimpletestTestForm.php
index 69f31e4572..0b704f90c5 100644
--- a/core/modules/simpletest/src/Form/SimpletestTestForm.php
+++ b/core/modules/simpletest/src/Form/SimpletestTestForm.php
@@ -110,10 +110,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
     ];
 
     $form['tests'] = [
-      '#cache' => [
-        'keys' => ['simpletest_ui_table'],
-        'contexts' => ['test_discovery'],
-      ],
       '#type' => 'table',
       '#id' => 'simpletest-form-table',
       '#tableselect' => TRUE,
diff --git a/core/modules/simpletest/src/TestDiscovery.php b/core/modules/simpletest/src/TestDiscovery.php
index 132694607c..721d63464c 100644
--- a/core/modules/simpletest/src/TestDiscovery.php
+++ b/core/modules/simpletest/src/TestDiscovery.php
@@ -6,6 +6,7 @@
 use Doctrine\Common\Reflection\StaticReflectionParser;
 use Drupal\Component\Annotation\Reflection\MockFileFinder;
 use Drupal\Component\Utility\NestedArray;
+use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Extension\ExtensionDiscovery;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\simpletest\Exception\MissingGroupException;
@@ -24,11 +25,11 @@ class TestDiscovery {
   protected $classLoader;
 
   /**
-   * Statically cached list of test classes.
+   * Backend for caching discovery results.
    *
-   * @var array
+   * @var \Drupal\Core\Cache\CacheBackendInterface
    */
-  protected $testClasses;
+  protected $cacheBackend;
 
   /**
    * Cached map of all test namespaces to respective directories.
@@ -69,11 +70,14 @@ class TestDiscovery {
    *   \Symfony\Component\ClassLoader\ApcClassLoader.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
+   * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
+   *   (optional) Backend for caching discovery results.
    */
-  public function __construct($root, $class_loader, ModuleHandlerInterface $module_handler) {
+  public function __construct($root, $class_loader, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend = NULL) {
     $this->root = $root;
     $this->classLoader = $class_loader;
     $this->moduleHandler = $module_handler;
+    $this->cacheBackend = $cache_backend;
   }
 
   /**
@@ -155,9 +159,9 @@ public function getTestClasses($extension = NULL, array $types = []) {
     $reader = new SimpleAnnotationReader();
     $reader->addNamespace('Drupal\\simpletest\\Annotation');
 
-    if (!isset($extension) && empty($types)) {
-      if (!empty($this->testClasses)) {
-        return $this->testClasses;
+    if (!isset($extension)) {
+      if ($this->cacheBackend && $cache = $this->cacheBackend->get('simpletest:discovery:classes')) {
+        return $cache->data;
       }
     }
     $list = [];
@@ -211,8 +215,10 @@ public function getTestClasses($extension = NULL, array $types = []) {
     // Allow modules extending core tests to disable originals.
     $this->moduleHandler->alterDeprecated('Convert your test to a PHPUnit-based one and implement test listeners. See: https://www.drupal.org/node/2939892', 'simpletest', $list);
 
-    if (!isset($extension) && empty($types)) {
-      $this->testClasses = $list;
+    if (!isset($extension)) {
+      if ($this->cacheBackend) {
+        $this->cacheBackend->set('simpletest:discovery:classes', $list);
+      }
     }
 
     if ($types) {
diff --git a/core/modules/simpletest/tests/src/Kernel/Cache/Context/TestDiscoveryCacheContextTest.php b/core/modules/simpletest/tests/src/Kernel/Cache/Context/TestDiscoveryCacheContextTest.php
deleted file mode 100644
index 25b2af92e4..0000000000
--- a/core/modules/simpletest/tests/src/Kernel/Cache/Context/TestDiscoveryCacheContextTest.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-namespace Drupal\Tests\simpletest\Kernel\Cache\Context;
-
-use Drupal\KernelTests\KernelTestBase;
-use Drupal\simpletest\Cache\Context\TestDiscoveryCacheContext;
-use Drupal\simpletest\TestDiscovery;
-
-/**
- * @group simpletest
- */
-class TestDiscoveryCacheContextTest extends KernelTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = ['simpletest'];
-
-  /**
-   * Tests that test context hashes are unique.
-   */
-  public function testContext() {
-    // Mock test discovery.
-    $discovery = $this->getMockBuilder(TestDiscovery::class)
-      ->setMethods(['getTestClasses'])
-      ->disableOriginalConstructor()
-      ->getMock();
-    // Set getTestClasses() to return different results on subsequent calls.
-    // This emulates changed tests in the filesystem.
-    $discovery->expects($this->any())
-      ->method('getTestClasses')
-      ->willReturnOnConsecutiveCalls(
-        ['group1' => ['Test']],
-        ['group2' => ['Test2']]
-      );
-
-    // Make our cache context object.
-    $cache_context = new TestDiscoveryCacheContext($discovery, $this->container->get('private_key'));
-
-    // Generate a context hash.
-    $context_hash = $cache_context->getContext();
-
-    // Since the context stores the hash, we have to reset it.
-    $hash_ref = new \ReflectionProperty($cache_context, 'hash');
-    $hash_ref->setAccessible(TRUE);
-    $hash_ref->setValue($cache_context, NULL);
-
-    // And then assert that we did not generate the same hash for different
-    // content.
-    $this->assertNotSame($context_hash, $cache_context->getContext());
-  }
-
-}
diff --git a/core/modules/system/src/Tests/Entity/DoNotUseMeDeprecatedTestTrait.php b/core/modules/system/src/Tests/Entity/DoNotUseMeDeprecatedTestTrait.php
new file mode 100644
index 0000000000..89fcaacf51
--- /dev/null
+++ b/core/modules/system/src/Tests/Entity/DoNotUseMeDeprecatedTestTrait.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Drupal\system\Tests\Entity;
+
+@trigger_error('Do not use me, thanks!', E_USER_DEPRECATED);
+
+/**
+ * Provides deprecated test trait for check unexpected deprecated error.
+ *
+ * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
+ */
+trait DoNotUseMeDeprecatedTestTrait {
+
+}
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index e1ef7db737..525cb58631 100644
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -145,6 +145,11 @@
 }
 
 $test_list = simpletest_script_get_test_list();
+if (in_array('Drupal\Tests\simpletest\Functional\OtherInstallationProfileTestsTest', $test_list)) {
+  $test_list = ['Drupal\Tests\simpletest\Functional\OtherInstallationProfileTestsTest'];
+} else {
+  $test_list = [];
+}
 
 // Try to allocate unlimited time to run the tests.
 drupal_set_time_limit(0);
@@ -823,7 +828,7 @@ function simpletest_script_run_one_test($test_id, $test_class) {
     }
     $test = new $class_name($test_id);
     if ($args['suppress-deprecations']) {
-      putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
+      putenv('SYMFONY_DEPRECATIONS_HELPER=weak');
     }
     else {
       // Prevent deprecations caused by vendor code calling deprecated code.
diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
index 2e8562b3f1..38e610c3b5 100644
--- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
+++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
@@ -639,13 +639,4 @@ public function testGetDefaultDriveInstance() {
     $this->assertEquals([NULL, ['key1' => ['key2' => ['key3' => 3, 'key3.1' => 3.1]]]], $this->minkDefaultDriverArgs);
   }
 
-  /**
-   * Ensures we can't access modules we shouldn't be able to after install.
-   */
-  public function testProfileModules() {
-    $this->setExpectedException(\InvalidArgumentException::class, 'The module demo_umami_content does not exist.');
-    $this->assertFileExists('core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml');
-    \Drupal::service('extension.list.module')->getPathname('demo_umami_content');
-  }
-
 }
diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
index f809b91532..2ba85e92e1 100644
--- a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
+++ b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
@@ -306,15 +306,4 @@ protected function tearDown() {
     }
   }
 
-  /**
-   * Ensures KernelTestBase tests can access modules in profiles.
-   */
-  public function testProfileModules() {
-    $this->assertFileExists('core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml');
-    $this->assertSame(
-      'core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml',
-      \Drupal::service('extension.list.module')->getPathname('demo_umami_content')
-    );
-  }
-
 }
