Implement full initialization of services with a factory

Created on 23 January 2024, 10 months ago
Updated 26 July 2024, 4 months ago

Problem/Motivation

Now TestHelpers has a simplified initialization of services with a defined factory.

It supports only the factory as a string Class::method and just calls it.

But some services have more complex factory declaration like:

  cache.rest:
    class: Drupal\Core\Cache\CacheBackendInterface
    tags:
      - { name: cache.bin }
    factory: ['@cache_factory', 'get']
    arguments: [rest]

Will be good to add support for this kind of services too.

Feature request
Status

Fixed

Version

1.4

Component

Code

Created by

🇦🇲Armenia murz Yerevan, Armenia

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024