diff --git a/core/tests/Drupal/Tests/SkippedDeprecationTest.php b/core/tests/Drupal/Tests/SkippedDeprecationTest.php
index b65bdd22e3..230c78b5cf 100644
--- a/core/tests/Drupal/Tests/SkippedDeprecationTest.php
+++ b/core/tests/Drupal/Tests/SkippedDeprecationTest.php
@@ -27,4 +27,48 @@ public function testSkippingDeprecationsAgain() {
     $this->addToAssertionCount(1);
   }
 
+  /**
+   * Tests skipping PHPUnit deprecation warnings.
+   *
+   * @see Drupal\Tests\Traits\PHPUnit8Warnings
+   */
+  public function testSkippingPhpUnit8Warnings() {
+
+    // Ensure the deprecation helper is disabled regardless of the configured
+    // setting.
+    $original_setting = getenv('SYMFONY_DEPRECATIONS_HELPER');
+    putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
+
+    // When the deprecation helper is disabled, both a warning that core fails
+    // and a deprecation warning that core passes should be silenced.
+    $this->addWarning('Warning for \\Drupal\\Tests\\Traits\\PHPUnit8Warnings::$coreFailingWarnings');
+    $this->addWarning('Warning for \\Drupal\\Tests\\Traits\\PHPUnit8Warnings::$corePassingDeprecationsWarnings');
+    $this->addToAssertionCount(1);
+
+    // Restore the configured deprecation handling.
+    putenv("SYMFONY_DEPRECATIONS_HELPER=$original_setting");
+
+  }
+
+  /**
+   * Tests not skipping PHPUnit deprecation warnings.
+   *
+   * @see Drupal\Tests\Traits\PHPUnit8Warnings
+   */
+  public function testNotSkippingPhpUnit8Warnings() {
+
+    // Ensure the deprecation helper is enabled regardless of the configured
+    // setting.
+    $original_setting = getenv('SYMFONY_DEPRECATIONS_HELPER');
+    putenv('SYMFONY_DEPRECATIONS_HELPER=max[total]=0');
+
+    // The warning that core fails should still be silenced.
+    $this->addWarning('Warning for \\Drupal\\Tests\\Traits\\PHPUnit8Warnings::$coreFailingWarnings');
+    $this->addToAssertionCount(1);
+
+    // Restore the configured deprecation handling.
+    putenv("SYMFONY_DEPRECATIONS_HELPER=$original_setting");
+
+  }
+
 }
diff --git a/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php b/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php
index 5b80264681..1ead7c44c0 100644
--- a/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php
+++ b/core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php
@@ -18,25 +18,67 @@
 trait PHPUnit8Warnings {
 
   /**
-   * The list of warnings to ignore.
+   * Warnings to always ignore because they fail for core.
+   *
+   * Once core passes for these warnings, add them to
+   * self::$corePassingDeprecationWarnings instead.
    *
    * @var string[]
    */
-  private static $ignoredWarnings = [
+  private static $coreFailingWarnings = [
     'expectExceptionMessageRegExp() is deprecated in PHPUnit 8 and will be removed in PHPUnit 9.',
+    // Test assertion.
+    'Warning for \\Drupal\\Tests\\Traits\\PHPUnit8Warnings::$coreFailingWarnings',
   ];
 
   /**
-   * Ignores specific PHPUnit 8 warnings.
+   * Warnings that fail if deprecation is not suppressed and pass for core.
+   *
+   * Add any PHPUnit deprecations that pass for core and should be handled as
+   * deprecation warnings (rather than unconditional failures) for contrib.
+   *
+   * @var string[]
+   */
+  private static $corePassingDeprecationWarnings = [
+    'Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.',
+    'Using assertNotContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringNotContainsString() or assertStringNotContainsStringIgnoringCase() instead.',
+    'assertArraySubset() is deprecated and will be removed in PHPUnit 9.',
+    'assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.',
+    'readAttribute() is deprecated and will be removed in PHPUnit 9.',
+    'getObjectAttribute() is deprecated and will be removed in PHPUnit 9.',
+    'The optional $canonicalize parameter of assertEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertEqualsCanonicalizing() instead.',
+    'assertAttributeEquals() is deprecated and will be removed in PHPUnit 9.',
+    'assertAttributeSame() is deprecated and will be removed in PHPUnit 9.',
+    'assertAttributeInstanceOf() is deprecated and will be removed in PHPUnit 9.',
+    'assertAttributeEmpty() is deprecated and will be removed in PHPUnit 9.',
+    'The optional $ignoreCase parameter of assertContains() is deprecated and will be removed in PHPUnit 9.',
+    'The optional $ignoreCase parameter of assertNotContains() is deprecated and will be removed in PHPUnit 9.',
+    // Test assertion.
+    'Warning for \\Drupal\\Tests\\Traits\\PHPUnit8Warnings::$corePassingDeprecationsWarnings',
+  ];
+
+  /**
+   * Skips PHPUnit 8 warnings based on core compliance and deprecation handling.
+   *
+   * @param string $warning
+   *   The warning message raised in tests.
    *
    * @see \PHPUnit\Framework\TestCase::addWarning()
    *
    * @internal
    */
   public function addWarning(string $warning): void {
-    if (in_array($warning, self::$ignoredWarnings, TRUE)) {
+    if (in_array($warning, self::$coreFailingWarnings, TRUE)) {
+      // Do not raise the warning if core would fail.
       return;
     }
+    if (in_array($warning, self::$corePassingDeprecationWarnings, TRUE)) {
+      // Return early only if deprecation errors are specifically suppressed.
+      if (getenv('SYMFONY_DEPRECATIONS_HELPER') === 'disabled') {
+        return;
+      }
+      // Otherwise, let the parent raise the warning.
+    }
     parent::addWarning($warning);
   }
 
