ToolbarHandler should be a service

Created on 6 March 2024, 3 months ago
Updated 3 June 2024, 13 days ago

Problem/Motivation

The ToolbarHandler class looks a lot like a service, as it uses DI, but it's not declared as one, and instead, has to be instantiated with the ClassResolver.

This is confusing DX, as there's more code than needs to be.

It's also inefficcient, as if it were a service, the container would keep the instantiated object. Currently, in one request, the class is instantiated three times AFAICT.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

RTBC

Version

4.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024