Make optional and deprecate the BackendChain constructor parameter

Created on 12 June 2019, about 5 years ago
Updated 14 September 2023, 10 months ago

This was discovered while working on πŸ“Œ Remove drupal_static from BookManager Fixed .

Problem/Motivation

The BackendChain service constructor looks like:

public function __construct($bin) {
}

This is forcing a service definition to declare arguments, in *.services.yml, such as:

book.cache:
  class: Drupal\Core\Cache\BackendChain
  arguments: ['']
  ...   

or...

book.cache:
  class: Drupal\Core\Cache\BackendChain
  arguments: ['whatever arbitrary string...']
  ...   

The parameter is not used and not needed.

Proposed resolution

Make the parameter optional and deprecate it. Will be removed in 9.0.0.

Remaining tasks

None.

User interface changes

None.

API changes

The BackendChain constructor parameter is optional and deprecated.

Data model changes

None.

Release notes snippet

None.

πŸ“Œ Task
Status

Fixed

Version

8.8 ⚰️

Component
CacheΒ  β†’

Last updated about 17 hours ago

Created by

πŸ‡·πŸ‡΄Romania claudiu.cristea Arad πŸ‡·πŸ‡΄

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

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.69.0 2024