Kernel Tests: Deprecation of EntityReferenceTestTrait

Created on 1 April 2024, 9 months ago
Updated 2 April 2024, 9 months ago

Problem/Motivation

When I run kernel tests, I get this self deprecation notice:

Remaining self deprecation notices (1)

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="url_alias_permissions"

Proposed resolution

Change the trait as described in the referenced article.

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.5

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
  • Assigned to samit.310@gmail.com
  • Status changed to Needs work 9 months ago
  • Issue was unassigned.
  • Status changed to Postponed: needs info 9 months ago
  • 🇮🇳India samit.310@gmail.com

    Hi @ryanrobinson_wlu,

    I am not getting any error as you mentioned above, I verified it with Drupal 10.2.x and 11.x. Attaching screenshot(url_alias_permissions.png)

    Please mentions the detailed staged to reproduce it like Drupal version etc.

    Thanks
    Samit K.

  • Status changed to Closed: cannot reproduce 9 months ago
  • 🇨🇦Canada ryanrobinson_wlu

    I think you're right. I'll close this. I'm still getting the error 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 this one). So it's probably another module's problem that is showing up in this module's report even when I specify which group of tests to run.

Production build 0.71.5 2024