Skip to content
Snippets Groups Projects

Enable autowiring and use service closure

Open Michael Strelan requested to merge issue/project_browser-3450499:3450499-autowire into 1.0.x
2 unresolved threads

Closes #3450499

Merge request reports

Members who can merge are allowed to add commits.
Code Quality is loading
Test summary results are being parsed
Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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')) {
    • Suggested change
      45 if ($faked_date = ($this->state)()->get('project_browser_test.fake_date_time')) {
      45 if ($faked_date = ($this->stateClosure)()->get('project_browser_test.fake_date_time')) {
    • Please register or sign in to reply
  • added 1 commit

    • 3116928a - Opt in to next minor testing

    Compare with previous version

  • Si Hobbs added 1 commit

    added 1 commit

    • 2cac4109 - Hold back "next minor" for 3423697.

    Compare with previous version

  • Please register or sign in to reply
    Loading