Make optional and deprecate the BackendChain constructor parameter

Created on 12 June 2019, over 5 years ago
Updated 14 September 2023, about 1 year 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 7 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.71.5 2024