Kernel Tests: Deprecations

Created on 1 April 2024, 3 months ago
Updated 20 June 2024, 7 days ago

Problem/Motivation

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

Remaining self deprecation notices (15)

10x: 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
1x in EntityReferenceTest::testUpdatingMissingReferences from Drupal\Tests\feeds\Kernel\Feeds\Target
1x in EntityReferenceTest::testUpdatingMissingNodeAuthors from Drupal\Tests\feeds\Kernel\Feeds\Target
1x in EntityReferenceTest::testUpdatingMissingParentTerms from Drupal\Tests\feeds\Kernel\Feeds\Target
1x in EntityReferenceTest::testWithSingleReference from Drupal\Tests\feeds\Kernel\Feeds\Target
...

3x: Calling createUser() with $values as the first parameter is deprecated in drupal:10.1.0 and will be removed from drupal:11.0.0. Use createUser(array $permissions = [], $name = NULL, $admin = FALSE, array $values = []) instead. See https://www.drupal.org/node/3330762
2x in RevisionableEntityTest::testWithMappingToRevisionFields from Drupal\Tests\feeds\Kernel
1x in UserRoleTest::testImportWithExistingRole from Drupal\Tests\feeds\Kernel\Feeds\Target

2x: Deprecated NULL placeholder value for key (@feed) in: "@feed: There are no new @items.". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826
2x in FeedTest::testDispatchImportFinishedEvent from Drupal\Tests\feeds\Kernel\Entity

Steps to reproduce

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

Proposed resolution

See referenced article for each deprecation.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇨🇦Canada ryanrobinson_wlu

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024