Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The \Drupal\views\Plugin\views\cache\Time
plugin using to inject Request service instead of using - $this->view->getRequest()
It was added in #2477157: rest_export Views display plugin does not set necessary cache metadata
Proposed resolution
Do not inject request
Remaining tasks
- deprecate argument for 10.0 (no usage found)
- decide on better way to use request in view
- review/commit
User interface changes
no
API changes
\Drupal\views\Plugin\views\cache\Time
no longer require request as argument
Data model changes
no
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#14 | 3109110-14.patch | 4.04 KB | andypost |
#14 | interdiff.txt | 3.39 KB | andypost |
Comments
Comment #2
andypostComment #3
andypostKind of itm this never used
Comment #5
andypostSo only 5 times plugin created within tests
Now test cleaner patch
Comment #6
andypostThe only place where requests is needed
Comment #8
andypostReroll patch for 9.1 - picked from #3109109-8: AccountForm should read pass-reset-token only from query string (needs to give a credit to @kkalashnikov)
Comment #9
andypostFiled CR https://www.drupal.org/node/3154016
Needs work for deprecation test
this change should be done in context of #2902895: [meta][no patch] Replace uses of REQUEST_TIME and time() with time service
Comment #10
andypostAdded tests for constructor and BC fshim for request property (views still has properties public)
Comment #12
andypostNW for 9.2
Comment #13
KapilV CreditAttribution: KapilV as a volunteer and at Innoraft for Drupal Care, Drupal Association commentedComment #14
andypostRe-roll for 9.2 and fix deprecation test
Comment #15
andypostGreen! I bet the Request_Time global could be replaced by the view's request
Comment #16
LendudeLooks good, the service is never used, so sounds good to take it out. We have a follow up to deal with REQUEST_TIME in #2902895: [meta][no patch] Replace uses of REQUEST_TIME and time() with time service, and a CR.
Comment #18
catchCommitted/pushed to 9.2.x, thanks!
Comment #20
quietone CreditAttribution: quietone at PreviousNext commentedPublish the change record