Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
comment.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Sep 2025 at 01:15 UTC
Updated:
12 Feb 2026 at 08:54 UTC
Jump to comment: Most recent
Comments
Comment #3
mstrelan commentedComment #4
smustgrave commentedPretty simple to review. Applied the MR and did a search for ANONYMOUS_MAY_CONTACT, ANONYMOUS_MAY_CONTACT, and ANONYMOUS_MAYNOT_CONTACT and all instances appear to be replaced.
LGTM
Comment #5
oily commentedReviewed the code. Found no issues with the code. Added a review/ comment regarding the @todo.
Comment #6
smustgrave commentedHave to ask why review an issue just reviewed? Seen it before and always curious. More reviews the better but wanted to ask.
Comment #7
oily commentedRan test-only script:
I think that is exactly as required?
Comment #8
smustgrave commentedthis was a task not a bug or feature so test-only run wasn't needed actually
Comment #9
oily commented@smustgrave I admit I have targeted RTBC issues too much. But this time only added a review/ comment whereas before I updated code. My comment offers to complete a @todo. Seeing @mstrelan has done a lot of quality code was wondering if the @todo is out of scope or if I could complete it. Wondered if he had felt he had done enough (which he has). I have coded enum's in my time and am keen to put icing on the top if in scope.
The 'task' not 'bug' point is taken. I live and learn.
Comment #10
smustgrave commentedRunning it doesnt hurt anything
Comment #11
mstrelan commentedNeeds work for #5, feel free to work on that.
Re: tests-only, the way it works is to do get a diff of any tests, apply it to 11.x / HEAD and re-run the tests. In this case the enum we've introduced doesn't exist in HEAD so of course it fails. As @smustgrave said, it's usually for bugs, which usually don't need new classes.
Comment #12
oily commented@mstrelan Read #11 with interest. Sounds good.
Comment #13
mstrelan commentedComment #14
nicxvan commentedI took a careful review of this.
All replacements match and logic seems unchanged.
Deprecations look correct.
I'm not sure if the return type or new parameter types are ok.
CR looks good as well.
I did not pull this down and search but that was done in 4.
Only open question is about the types I'll try to track down an answer.
Comment #15
dcam commentedFollowing on from the review in #14, I'm guessing that the question at hand is whether it's OK to type hint parameters or return values with an enum, but if I'm mistaken then please let me know. I checked the @param and @return data types and researched the answers.
The enum documentation page shows an example of a function parameter typed hinted with an enum.
The
::tryFrom()docs themselves show a return type ofstatic|null, so it's OK to type hint a return value with an enum.They look good to me. I'm going to RTBC this.
Comment #16
mstrelan commentedI think what #14 was referring to are these two existing signatures changing:
Which is really only an issue if someone is extending the classes and overriding these functions, or passing something other than an int to
setCommentAnonymous.Comment #17
dcam commentedMy mistake.
I searched contrib for uses of both functions and turned up one result. RDF extends
CommentTestBaseand usessetCommentAnonymous(), which makes sense because it was in Core. See https://git.drupalcode.org/project/rdf/-/blob/2.x/tests/src/Functional/C....Comment #18
mstrelan commentedThanks for finding that. Since it's passing an
intand we have provided a union type then this should be fine.Comment #19
dcam commentedYeah. Running the RDF test with these changes triggered the deprecation warning as it should. So I'll set this to RTBC.
Comment #20
oily commentedI agree with the RTBTC. Checked the CR. Straightforward, looks good.
Comment #21
longwaveToo late for 11.3.0, deprecations need updating to 11.4.0 for removal in 13.
Comment #22
dcam commentedThe deprecation version has been updated. I'm re-RTBCing it because this is a minor change.
Comment #23
quietone commentedI updated credit and reviewed the Change record, which is fine. Leaving at RTBC
Comment #27
catchCommitted/pushed to main and 11.x, thanks!