Convert CheckProvider to use a service locator

Created on 22 January 2024, almost 2 years ago
Updated 26 February 2024, over 1 year ago

Problem/Motivation

In πŸ“Œ Fork Symfony's ContainerAwareTrait and ContainerAwareInterface into core Needs work we are trying to reduce the use of ContainerAwareTrait as Symfony has deprecated it.

Drupal\Core\Access\CheckProvider is container aware because it needs to retrieve access checker services, but does not necessarily iterate over all of them.

Instead of injecting the container we can inject a service locator that only contains access checker services.

Steps to reproduce

Proposed resolution

Inject a service locator.

Also inject the dynamic_access_check_services parameter instead of retrieving it from the container.

Merge request link

Remaining tasks

Consider removing the dynamic_access_check_services parameter in a followup, as we can detect dynamic classes directly inside the service instead of injecting the list separately.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 2 months ago

Created by

πŸ‡¬πŸ‡§United Kingdom longwave UK

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