Enable autowiring and use service closure
2 unresolved threads
2 unresolved threads
Closes #3450499
Merge request reports
Activity
25 26 * The time service. 26 27 * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack 27 28 * The RequestStack object. 28 * @param \Drupal\Core\State\StateInterface $state 29 * @param \Closure $state 29 30 * The state storage service. 30 31 */ 31 32 public function __construct( 32 33 Time $time, 33 34 RequestStack $request_stack, 34 protected readonly StateInterface $state, 35 #[AutowireServiceClosure('state')] 36 protected readonly \Closure $state, 41 43 * {@inheritdoc} 42 44 */ 43 45 public function getRequestTime(): int { 44 if ($faked_date = $this->state->get('project_browser_test.fake_date_time')) { 46 if ($faked_date = ($this->state)()->get('project_browser_test.fake_date_time')) {
Please register or sign in to reply