Update REQUEST_TIME call

Created on 14 September 2018, over 6 years ago
Updated 2 May 2025, 12 days ago
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India visabhishek Hyderabad

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺

    My team uses preinstalled Drupal instance for testing and in case of a time-based caching workaround, I need to be able to mock (request) time.

    Re #3

    The idea is good, but we cannot rely on ::time() as we are so low level that we need to work within the bootstrap container as well and request() needs the request, which does not exist at that time.

    What if we follow the same logic as we have at ::debug()? So, trying to return \Drupal::time()->getRequestTime() and if it fails, fall back to the actual logic (int) $_SERVER['REQUEST_TIME'] ?? time();

    Also,

    1. It is unclear to me why this issue is postponed - maybe it was just stuck in this state accidentally?
    2. My suggestion is to change this to a task (or to a feature request). Imho this is not a bug anymore.

    I want to share my local path with you.

  • Pipeline finished with Success
    12 days ago
    Total: 199s
    #487131
  • 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺

    * Updated (created) issue summary.
    * Changed category to feature request.
    * Changed priority to normal.

    Feel free to change them if you disagree.

  • 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺

    I see a test failure with the next minor core release, but imho it is a preexisting issue.

  • 🇫🇷France andypost

    it affects performance as instead of variable (expected and documented) we'll get a set of function calls for no reason (each get doing validation and each invalidate of tag)

    generally not clear why this method is public at all and moreover not clear why it has no static cache for result now

  • 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
  • Pipeline finished with Success
    9 days ago
    Total: 303s
    #489198
  • Pipeline finished with Success
    9 days ago
    Total: 175s
    #489304
  • 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺

    Forgot to unassign

Production build 0.71.5 2024