Problem/Motivation
This is a follow-up issue to #2729597: [meta] Replace \Drupal with injected services where appropriate in core.
Proposed resolution
Replace all non-static, non-test references to \Drupal::time()
with IoC injection where possible.
Remaining tasks
Make the requested changes to non-static references to\Drupal::time()
.Adjust existing tests to compensate for the newly added deprecation notices.- Obtain code review from a framework manager (since this touches multiple subsystems).
- Address any change requests from the framework manager.
- Commit.
API changes
Some additional optional parameters. After committing this issue, not passing the parameters will result in a deprecation notice (but existing APIs should still work as intended).
Release notes snippet
TBD; maybe not necessary?