Adjust TransactorHandler-service signature to use TimeInterface

Created on 31 May 2021, about 4 years ago
Updated 24 April 2025, 2 months ago

Problem/Motivation

In order to write time-dependent tests a module like `datetime_testing` decorates/switches out core's `Time` service. This cause a TypeError on construction of the TransactorHandler.

Steps to reproduce

Enable `datetime_testing` (or alter the container to inject a different implementation of the TimeInterface for the \Drupal::time() service) and execute transaction.

Proposed resolution

Specify interfaces not classes.

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

πŸ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany frega

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024