Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
phpunit
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Sep 2022 at 18:39 UTC
Updated:
23 Mar 2026 at 13:33 UTC
Jump to comment: Most recent
Comments
Comment #3
mondrakeComment #4
mondrakeComment #5
mondrakeComment #6
daffie commentedWhy is the change to the file core/scripts/dev/commit-code-check.sh is the PR? Should that not get its own issue?
Comment #7
mondrake#6: reverted
Comment #8
daffie commentedAll the changes look good to me.
Just one question: Should we change the "REQUEST_TIME" in web/core/modules/dblog/tests/src/Functional/FakeLogEntries.php too?
Comment #9
mondrake#8: yes, but not yet - a Kernel test
core/modules/dblog/tests/src/Kernel/DbLogTest.phpis callinggenerateLogEntries()too, and it would fail with the change ATM since the new property is only defined for functional tests. Let's do that in the parent when we close up.Comment #10
daffie commented@mondrake: Thank you for your reply.
All changes look good to me.
All instances in FunctionalTests have been changed.
For me it is RTBC.
Comment #11
alexpottI'm not convinced about adding another test property. There are so many. Why didn't we use \Drupal::time() everywhere? Even if we had private services everywhere I'd have thought we might keep this one public.
Comment #13
ravi.shankar commentedThere are more instances where we need to remove
testRequestTimeand use\Drupal::time()Comment #14
bhanu951 commentedComment #18
bhanu951 commentedCreated New MR #4317 against 11.x Branch and Removed testRequestTime property and used drupal time in remaining places.
Comment #19
bhanu951 commentedComment #20
smustgrave commentedLeft a comment but the issue summary mentions this should be FunctionalJavascript file but the MR I see 1 FunctionalJavascript file changed. So MR and issue summary don't line up.
Comment #21
bhanu951 commented@smustgrave
I ran
grep -R "REQUEST_TIME" core >list.txtand found no additional FunctionalJavascript tests withREQUEST_TIME.So, The title seems correct.
Comment #22
smustgrave commentedIn that case the changes to the functional tests should be reverted as they would be out of scope
Comment #23
bhanu951 commented@smustgrave
Seems you mis-read, this issue is to fix both Functional and FunctionalJavascript tests.I will update Title and Summary. So back to NR.
Comment #24
bhanu951 commentedComment #25
smustgrave commentedApplied the MR and searched phpstan-baseline for REQUEST_TIME which had 59 matches. None for Functional or FunctionalJavascript files.
Comment #26
quietone commentedThis needs a reroll.
I skimmed both MR and I am not convinced that the comments by alexpott in the first MR have been addressed and answered. The proposed resolution is a bit different than what it implemented. It looks like the proposed resolution was for when a new property was being added.
I've updated the remaining tasks. Back to NW.
Comment #28
acbramley commentedFeedback addressed, pipeline's green again. Hiding the old MR.
Comment #30
acbramley commentedComment #31
smustgrave commentedApplied the MR
Searching phpstan-baseline remaining REQUEST_TIME and all instances of FunctionalJavascript and Functional appear to be replaced.
Comment #32
catchOne question on the MR, everything else looks good.
Comment #33
acbramley commentedComment #34
smustgrave commentedBelieve the one thread from @catch has been answered.
Comment #35
catchLet's add a comment explaining what's happening there.
Comment #36
acbramley commentedComment #38
acbramley commentedGoing to self RTBC since this was a simple change and we went with @mstrelan's version.
Comment #39
catchCommitted/pushed to 11.x, thanks!
Comment #41
catch