Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Jan 2024 at 04:49 UTC
Updated:
15 Feb 2024 at 21:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
viren18febs commentedHi , i have fixed and added a patch for this , please review
Comment #4
mstrelan commentedCan we please have an MR for this?
Comment #5
viren18febs commentedComment #7
viren18febs commentedGenerated MR for the same, please review.
Comment #8
viren18febs commentedComment #9
smustgrave commented@viren18febS this was tagged for novice intended for newer users to Drupal contribution.. Looking at your post history you have 14 pages of issues and should avoid novice issues in the future.
Comment #10
viren18febs commentedHi smustgrave,
Sure i'll take care of that.
Thank you.
Comment #11
longwaveThe comments above also mention strings, but the values are not strings.
Comment #12
viren18febs commentedComment #13
smustgrave commentedFeedback appears to be addressed.
Comment #14
longwaveJust realised actually where this is used:
The Response constructor takes a string!
So this is being cast back to string anyway; should we actually be changing them to e.g.
Comment #15
mstrelan commentedAgree with #14, the doc suggests this should indeed be a string. I suspect this may be misused in userland and might break if people are checking
$foo === UserAuthenticationController::LOGGED_IN.Comment #16
smustgrave commentedSounds like this needs to be re-scoped.
Comment #17
larowlanComment #18
mstrelan commentedHave updated the MR with the new approach to use strings. Added a CR just in case anyone is using these constants with strict comparisons.
Apologies for picking this up with the Novice tag, it is blocking #3404508: Fix strict type errors in Functional tests: Add casts and fix types where needed so I was motivated to work on it.
Comment #19
smustgrave commented@mstrelen thanks for noting that, think if it's a blocker for a larger issue that's perfectly valid.
Issue summary was updated by @larowlan in #17 and consts turned to strings.
Comment #22
larowlanCommitted to 11.x and published the change record, thanks