Problem/Motivation
There's few outdated mentions of deprecated constant REQUEST_TIME left after #2902895: [meta][no patch] Replace uses of REQUEST_TIME and time() with time service
Steps to reproduce
$ git grep REQUEST_TIME
core/lib/Drupal/Component/Datetime/TimeInterface.php:23: * $request_time = REQUEST_TIME;
core/lib/Drupal/Core/Asset/JsCollectionRenderer.php:79: // URL changed. Files that should not be cached get REQUEST_TIME as
core/lib/Drupal/Core/Entity/entity.api.php:575: * ->condition('changed', REQUEST_TIME - $age, '<')
core/lib/Drupal/Core/Entity/entity.api.php:1179: 'created' => REQUEST_TIME,
core/lib/Drupal/Core/Entity/entity.api.php:1180: 'updated' => REQUEST_TIME,
core/lib/Drupal/Core/Entity/entity.api.php:1202: 'created' => REQUEST_TIME,
core/lib/Drupal/Core/Entity/entity.api.php:1203: 'updated' => REQUEST_TIME,
core/lib/Drupal/Core/Entity/entity.api.php:1225: 'updated' => REQUEST_TIME,
core/lib/Drupal/Core/Entity/entity.api.php:1249: 'updated' => REQUEST_TIME,
core/modules/update/tests/src/Kernel/UpdateDeleteFileIfStaleTest.php:45: // Set the maximum age to a number smaller than REQUEST_TIME - $filectime.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3422973
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:
- 3422973-replace-remaining-mentions
changes, plain diff MR !6732
Comments
Comment #2
andypostComment #5
acbramley commentedReplaced all but one with the API equiv.
The mention in TimeInterface was removed entirely because the comment is talking about replacing things with the API call.
Comment #6
dwwWhoops, @acbramley isn't a novice, but I think they did the work before @andypost tagged this issue as such. 😅
MR mostly looks great. Agreed with removing the line entirely in
TimeInterface. Left a suggestion for a tiny nit in the Kernel test from Update module.Needs subsystem maintainer review. 😂Title and summary are clear. This is comment-only, so no tests needed. MR pipeline is green (as expected). IMHO, this is RTBC with my suggestion applied, and probably even without it. 😊
Thanks,
-Derek
Comment #7
acbramley commented@dww honestly I don't think this is a Novice issue. As you have seen, it takes knowledge/investigation on what each of those comments are describing. For example, noticing the TimeInterface example could be removed entirely.
Since I've been close to all these issues recently I thought it was easier if I just did it.
Comment #8
dwwYeah, you're probably right. Let's remove the tag, then. 😅
Comment #9
dwwThanks for resolving the thread. RTBC. Saving credits.
Comment #10
catchAt some point we should redo the hook_enitty_update()/insert() hook documentation to not have documentation examples that pre-date the existence of field API and do direct database queries. But all the changes look good.
Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!
Comment #13
catchComment #14
andypostNeeds follow-up for
Comment #15
catch@andypost you might be missing a git pull? Those are the ones fixed in this issue.
Comment #17
andypostSorry, yes, I missed to pull