- Issue created by @mstrelan
- First commit to issue fork.
- Status changed to Needs review
over 1 year ago 5:47am 5 January 2024 - 🇮🇳India viren18febs
Hi , i have fixed and added a patch for this , please review
- Status changed to Needs work
over 1 year ago 6:08am 5 January 2024 - Assigned to viren18febs
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:13am 5 January 2024 - Status changed to RTBC
over 1 year ago 2:59pm 5 January 2024 - 🇺🇸United States smustgrave
@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.
- 🇮🇳India viren18febs
Hi smustgrave,
Sure i'll take care of that.
Thank you. - Status changed to Needs work
over 1 year ago 10:50am 12 January 2024 - 🇬🇧United Kingdom longwave UK
The comments above also mention strings, but the values are not strings.
- Status changed to Needs review
over 1 year ago 12:22pm 12 January 2024 - Status changed to RTBC
over 1 year ago 2:54pm 12 January 2024 - Status changed to Needs review
over 1 year ago 6:01pm 12 January 2024 - 🇬🇧United Kingdom longwave UK
Just realised actually where this is used:
if ($this->currentUser()->isAuthenticated()) { $response = new Response(self::LOGGED_IN); } else { $response = new Response(self::LOGGED_OUT); }
The Response constructor takes a string!
public function __construct(?string $content = '', int $status = 200, array $headers = [])
So this is being cast back to string anyway; should we actually be changing them to e.g.
const LOGGED_IN = '1';
- 🇦🇺Australia mstrelan
Agree 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
. - Status changed to Needs work
over 1 year ago 4:42pm 16 January 2024 - Status changed to Needs review
over 1 year ago 6:17am 31 January 2024 - 🇦🇺Australia mstrelan
Have 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 📌 [PP-1] Fix strict type errors in Functional tests: Add casts and fix types where needed Postponed so I was motivated to work on it.
- Status changed to RTBC
over 1 year ago 2:37pm 31 January 2024 - 🇺🇸United States smustgrave
@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.
-
larowlan →
committed 442f147b on 11.x
Issue #3412459 by viren18febS, mstrelan, smustgrave, longwave, larowlan...
-
larowlan →
committed 442f147b on 11.x
- Status changed to Fixed
over 1 year ago 9:43pm 1 February 2024 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Committed to 11.x and published the change record, thanks
Automatically closed - issue fixed for 2 weeks with no activity.