Change record status: 
Project: 
Introduced in branch: 
10.1.x
Introduced in version: 
10.1.0
Description: 

Currently there are two different createUser() methods in test code, with incompatible signatures:

In EntityKernelTestBase:

  protected function createUser($values = [], $permissions = [])

In UserCreationTrait:

  protected function createUser(array $permissions = [], $name = NULL, $admin = FALSE, array $values = [])

The situation is made more confusing by EntityKernelTestBase importing UserCreationTrait's createUser() as drupalCreateUser().

To unify this, EntityKernelTestBase::createUser() has had its signature changed to match UserCreationTrait's createUser().

Calling createUser() with $values as the first parameter and $permissions as the second 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.

Impacts: 
Module developers