Issue fork drupal-3409043
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mcdruid commentedAdded a similar test to the one we're working on in the parent issue.
It could perhaps be a unit test, but not sure how reliable that would be as
user_pass_rehash()callsdrupal_get_hash_salt()which may use the$databasesglobal etc..Comment #4
mcdruid commentedThe test-only job failed as expected:
https://git.drupalcode.org/project/drupal/-/jobs/506876
Same as the parent issue, this will need a CR - any "in flight" reset links will become invalid when the code changes, but they are short-lived by design.
Anything else?
Comment #5
mcdruid commentedAdded a draft CR based on the one @poker10 made for the parent issue:
https://www.drupal.org/node/3409960
Comment #6
bramdriesenBased on the discussion in the parent, and the fact the tests are green here setting it to RTBC. Also checked the "tests only" run in GitLab which gave the expected result.
Comment #7
bramdriesenComment #8
mcdruid commentedThe parent has been committed to D10/11 - I think we're okay to commit this to D7 now, but I don't want to commit my own patch/MR.
One tweak I might suggest is to use the word "minimal" instead of "lightweight":
We don't really need to use objects at all as the properties are passed as individual params, but I think I'm happy with the rest of the test.
@poker10 are you happy to commit this (perhaps changing the comment as above)?
Comment #9
bramdriesenMinimal does sound more correct to me. Or maybe even better to just say "Anonymous user objects are sufficient." or drop the comment as it doesn't add that much value either.
Comment #10
mcdruid commentedI think my motivation for adding the comment was to avoid anyone (including myself later on) thinking that we needed to add more code / dependencies to the test in order to provide more complete user objects.. per the vintage comment in the API docs which confirms that
drupal_anonymous_user()doesn't return a full user object, or invoke hooks etc.. etc..https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drup...
I'd be happy with a tweak to the wording, or for the comment to be removed on commit if we think it's not worth keeping.
Comment #12
poker10 commentedI think the "minimal" word should be OK, so I changed that on commit. I consider that comment helpful (exactly for reasons mentioned in #10), so not removing it. Other than that I think this looks good and code is in line with the D10 commit (also the CRs are practically the same).
Committed this, thanks all!