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
Use of static:
\Drupal::time();
\Drupal::config();
Proposed resolution
Intejct the service datetime.time
and use the method $this->config();
of ControllerBase
Comments
Comment #2
thallesFollow a patch with the injection.
Comment #3
gg24 CreditAttribution: gg24 as a volunteer and at Cheppers commentedHi @thalles,
The above patch works for me. Hence moving it to RTBC.
Thanks!
Comment #4
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedComment #5
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedre run tests
Comment #6
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedre run tests
Comment #8
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commented