function DeprecationListenerTrait::getSkippedDeprecations

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php \Drupal\Tests\Listeners\DeprecationListenerTrait::getSkippedDeprecations()

A list of deprecations to ignore whilst fixes are put in place.

Do not add any new deprecations to this list. All deprecation errors will eventually be removed from this list.

@internal

@todo Fix all these deprecations and remove them from this list. https://www.drupal.org/project/drupal/issues/2959269

Return value

string[] A list of deprecations to ignore.

See also

https://www.drupal.org/node/2811561

1 call to DeprecationListenerTrait::getSkippedDeprecations()
DeprecationListenerTrait::isDeprecationSkipped in core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
Determines if a deprecation error should be skipped.

File

core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php, line 113

Class

DeprecationListenerTrait
Removes deprecations that we are yet to fix.

Namespace

Drupal\Tests\Listeners

Code

public static function getSkippedDeprecations() {
    return [
        // The following deprecation messages are skipped for testing purposes.
'\\Drupal\\Tests\\SkippedDeprecationTest deprecation',
        'Return type of PhpDeprecation::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice',
        // The following Symfony deprecations are introduced in the Symfony 4
        // development cycle. They will need to be resolved prior to Symfony 5
        // compatibility.
'The "Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser" class is deprecated since Symfony 4.3, use "Symfony\\Component\\Mime\\MimeTypes" instead.',
        'The "Drupal\\Core\\File\\MimeType\\MimeTypeGuesser" class implements "Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface" that is deprecated since Symfony 4.3, use {@link MimeTypesInterface} instead.',
        'The "Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser" class is deprecated since Symfony 4.3, use "Symfony\\Component\\Mime\\FileBinaryMimeTypeGuesser" instead.',
        'The "Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileinfoMimeTypeGuesser" class is deprecated since Symfony 4.3, use "Symfony\\Component\\Mime\\FileinfoMimeTypeGuesser" instead.',
        'The "Drupal\\Tests\\Core\\DependencyInjection\\Compiler\\LegacyMimeTypeGuesser" class implements "Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface" that is deprecated since Symfony 4.3, use {@link MimeTypesInterface} instead.',
        'The "Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher::dispatch()" method will require a new "string|null $eventName" argument in the next major version of its interface "Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface", not defining it is deprecated.',
        'The "Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher::dispatch()" method will require a new "string|null $eventName" argument in the next major version of its parent class "Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface", not defining it is deprecated.',
        // The following deprecation is listed for Twig 2 compatibility when unit
        // testing using \Symfony\Component\ErrorHandler\DebugClassLoader.
'The "Twig\\Environment::getTemplateClass()" method is considered internal. It may change without further notice. You should not extend it from "Drupal\\Core\\Template\\TwigEnvironment".',
        '"Symfony\\Component\\DomCrawler\\Crawler::text()" will normalize whitespaces by default in Symfony 5.0, set the second "$normalizeWhitespace" argument to false to retrieve the non-normalized version of the text.',
        // PHPUnit 8.
"The \"PHPUnit\\TextUI\\ResultPrinter\" class is considered internal This class is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not use it from \"Drupal\\Tests\\Listeners\\HtmlOutputPrinter\".",
        "The \"Drupal\\Tests\\Listeners\\DrupalListener\" class implements \"PHPUnit\\Framework\\TestListener\" that is deprecated Use the `TestHook` interfaces instead.",
        "The \"Drupal\\Tests\\Listeners\\DrupalListener\" class uses \"PHPUnit\\Framework\\TestListenerDefaultImplementation\" that is deprecated The `TestListener` interface is deprecated.",
        "The \"PHPUnit\\Framework\\TestSuite\" class is considered internal This class is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not use it from \"Drupal\\Tests\\TestSuites\\TestSuiteBase\".",
        // PHPUnit 9.
"The \"PHPUnit\\TextUI\\DefaultResultPrinter\" class is considered internal This class is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not use it from \"Drupal\\Tests\\Listeners\\HtmlOutputPrinter\".",
        "The \"Drupal\\Tests\\Listeners\\DrupalListener\" class implements \"PHPUnit\\Framework\\TestListener\" that is deprecated.",
        // Guzzle/PSR-7
"Method \"Psr\\Http\\Message\\StreamInterface::getMetadata()\" will return \"mixed\" as of its next major version. Doing the same in implementation \"GuzzleHttp\\Psr7\\Stream\" will be required when upgrading.",
        // Drupal date library deprecated.
'The "core/drupal.date" asset library is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. There is no replacement. See https://www.drupal.org/node/3258267',
        "Drupal\\Core\\Render\\Element\\Date::processDate() is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. There is no replacement. See https://www.drupal.org/node/3258267",
        'The "core/popperjs" asset library is deprecated in Drupal 9.5.0 and will be removed in Drupal 10.0.0. There is no replacement. See https://www.drupal.org/node/3307518',
        // The CKEditor 4 asset library is deprecated.
'The "core/ckeditor" asset library is deprecated in drupal:9.5.0 and is removed from drupal:10.0.0. There is no replacement. See https://www.drupal.org/node/3304481',
        'Theme "core" is extending a deprecated library. The "core/ckeditor" asset library is deprecated in drupal:9.5.0 and is removed from drupal:10.0.0. There is no replacement. See https://www.drupal.org/node/3304481',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.