Remove unused '@datetime.time' argument from memcache.services.yml for MemcacheBackendFactory

Created on 6 November 2024, 5 months ago

Problem/Motivation

This is a followup to https://www.drupal.org/project/memcache/issues/3302086 🐛 After upgrade to 2.4, Drupal 9.4.5 and PHP 8.0.21, \Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container. Fixed .

On that issue, the MemcacheBackendFactory class had the `TimeInterface $time_service` argument removed (link to diff).

However, it wasn't removed from memcache.services.yml ... hence me filing this issue.

Steps to reproduce

Having the extra '@datetime.time' argument does not cause problems except in edge cases. Under some cases, this can cause ServiceCircularReferenceException errors when the Memcache backend is used for certain bins.

I don't have specific steps to reproduce at this time, but have observed one case that uses the `shield` module along with having memcache for the bootstrap bin. In that case the error is:

Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "cache.backend.memcache", path: "http_kernel -> http_middleware.ajax_page_state -> http_middleware.negotiation -> http_middleware.reverse_proxy -> shield.middleware -> http_middleware.cors -> http_middleware.page_cache -> cache.page -> cache.backend.memcache -> Drupal\Component\Datetime\TimeInterface -> state -> cache.bootstrap". in [redacted]/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php

Proposed resolution

Remove '@datetime.time' in services.yml for the cache.backend.memcache service.

Remaining tasks

None?

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States janusman

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

Comments & Activities

Production build 0.71.5 2024