Deprecate the constructors in BlocksController, TaxonomiesController, and MenuLinksController

Created on 16 April 2025, 21 days ago

Problem/Motivation

In Deprecate passing extra parameters to __construct() to prepare for 3.0.x Active , we deprecated passing extra parameters to the constructors for MenuLinksController, BlocksSyncForm, MenusSyncForm, and TaxonomiesSyncForm, in order to better maintain backwards compatibility by avoiding ongoing changes to constructor properties.

We would like to extend this a step further, and deprecate the constructors themselves in MenuLinksController, BlocksController, and TaxonomiesController. By being consistent about how we refer to $this->config, and $this->entityTypeManager, we could get rid of the rest of the code in those controllers

Proposed resolution

Deprecate the constructors in the three controllers, now that they no longer need any arguments, and dependency injection is handled by the create() method.

Remaining tasks

  1. Write a merge request to remove unneeded constructors in BlocksController, TaxonomiesController, and MenuLinksController.
  2. Review and feedback
  3. RTBC and feedback
  4. Commit
  5. Release a new version(?)

User interface changes

None.

API changes

None.

Data model changes

None.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada spiderman Halifax, NS

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