Kernel Tests: Deprecations

Created on 1 April 2024, about 1 year ago
Updated 23 April 2024, about 1 year ago

Problem/Motivation

When I run kernel tests, I get these self deprecation notices:

Remaining self deprecation notices (37)

36x: Installing the table sequences with the method KernelTestBase::installSchema() is deprecated in drupal:10.2.0 and is removed from drupal:12.0.0. See https://www.drupal.org/node/3349345
1x in LinkitEditorLinkDialogTest::testAdd from Drupal\Tests\linkit\Kernel
1x in LinkitEditorLinkDialogTest::testEditWithDataAttributes from Drupal\Tests\linkit\Kernel
1x in LinkitEditorLinkDialogTest::testEditWithoutDataAttributes from Drupal\Tests\linkit\Kernel
1x in EntityMatcherDeriverTest::testDeriver from Drupal\Tests\linkit\Kernel
1x in TermMatcherTest::testTermMatcherWidthDefaultConfiguration from Drupal\Tests\linkit\Kernel\Matchers
...

1x: The Drupal\Tests\field\Traits\EntityReferenceTestTrait is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Instead, use \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait. See https://www.drupal.org/node/3401941
1x in KernelTestSuite::suite from Drupal\Tests\TestSuites

Steps to reproduce

Run phpunit --testsuite="kernel" --group="linkit"

Proposed resolution

See referenced articles for each deprecation.

🐛 Bug report
Status

Closed: duplicate

Version

6.1

Component

Code

Created by

🇨🇦Canada ryanrobinson_wlu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ryanrobinson_wlu
  • 🇮🇳India dineshkumarbollu

    $this->installSchema('system', 'sequences'); is deprecated in D11, see the https://www.drupal.org/node/3349345 , created patch accordingly, please review.

  • 🇨🇦Canada ryanrobinson_wlu

    Looks good to me so far! Thank you.

    I'm still getting the other one about EntityReferenceTestTrait, but I'm getting that for every single module I test, even though if I grep for that it only shows as being in a few of them (not including linkit). So it's probably another module's problem that is showing up in this module's report even though I specified which group of tests to run.

  • Status changed to Needs review about 1 year ago
  • 🇮🇳India dineshkumarbollu

    @ryanrobinson_wlu the below test deprecations are not found in this module, it is occuring your system only due some other modules.

    1x: The Drupal\Tests\field\Traits\EntityReferenceTestTrait is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Instead, use \Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait. See https://www.drupal.org/node/3401941
    1x in KernelTestSuite::suite from Drupal\Tests\TestSuites
  • Status changed to Closed: duplicate about 1 year ago
  • 🇺🇸United States mark_fullmer Tucson

    Closing -- this is a duplicate of 🐛 [Drupal 12.x] Kernel Testing Deprecations Active . Please note that the maintainers request that proposed code changes be introduced as GitLab merge requests, rather than patches. Thanks!

Production build 0.71.5 2024