Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
This is a follow-up to #2758067: BrowserTestBase::drupalCreateUser() should use UserCreationTrait::createUser().
The UserCreationTrait
now supports both Account::$pass_raw
and Account::$passRaw
for storing the raw password to log the user in via the UI. The newer BrowserTestBase::drupalLogin()
method uses the camel-cased variant, while the older WebTestBase
uses the snake-cased version.
Proposed resolution
Update WebTestBase
to use the camel-cased version, and then remove the snake-cased version in Drupal 9.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#9 | 2768765-09.patch | 4.78 KB | jhedstrom |
Comments
Comment #2
jhedstromComment #3
jhedstromNote there isn't an easy way to deprecate this aside from documentation, as the class variable isn't properly declared anywhere.
Comment #4
jhedstromOops, I realized we still need to support
pass_raw
in the login method.Comment #7
jhedstromComment #9
jhedstromMissed one.
Comment #18
Kristen PolIf this is still relevant, the patch needs to be updated for Drupal 9 (at least the comment since it would be targeted at Drupal 10).
Comment #19
narendra.rajwar27Comment #20
narendra.rajwar27With respect to patch at #9,
1-
/core/modules/rest/src/Tests/UpdateTest.php
is not present in drupal9, one is available herecore/tests/Drupal/KernelTests/Core/Database/UpdateTest.php
but nothing related to the rest module updateTest.php.2-
core/modules/simpletest/src/UserCreationTrait.php
this can be updated with deprecation comment.3- This
/core/modules/simpletest/src/WebTestBase.php
is not available in drupal94- This
/core/modules/user/src/Tests/UserEditTest.php
is already updated.Thanks