Problem/Motivation

Convert hooks to the new OOP system, so we can separate the logic.

See change record: https://www.drupal.org/node/3442349

Proposed resolution

Convert hooks to the new OOP system, so we can separate the logic.
Keep the hooks and provide the hook classes as services for BC with 10.4 and 11.0.

Remaining tasks

MR

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork dashboard-3495987

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Status: Active » Needs review

With the current MR we require ^11.1.
Not sure if we want to keep the legacy hooks to maintain compatibility with ^10.4.

plopesc’s picture

I really like how the code looks in the MR, but I feel that bumping core requirements to ^11.1 might be controversial.

We could maybe explore the #[LegacyHook] approach to increase the number of sites that could adopt Dashboard module in this initial phase and gain more traction across the community. Removing those extra BC bits should be easy once we definitely remove 10.x support at some point.

If we decide to bump the requirements, we could get rid of the conditional logic to handle login in DashboardRedirectAfterLoginTest::setup().

penyaskito’s picture

Title: Convert hooks to the new OOO system » Convert hooks to the new OOP system
Issue summary: View changes
penyaskito’s picture

@plopesc TBH I wasn't even sure if merging this before 2.0.0. I added the BC layer, so we might do that, but then I'd tag a rc ASAP.

plopesc’s picture

Made a quick review and added a few comments. Most of them are just cosmetics.

Thank you for this one!

penyaskito’s picture

I wouldn't consider the hook implementations API, so not that concerned about these if need to change anyway.

plopesc’s picture

Status: Needs review » Reviewed & tested by the community

Sounds good. Marking as RTBC

  • penyaskito committed 2eb103cb on 2.x
    Issue #3495987: Convert hooks to the new OOP system
    
penyaskito’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, merged!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.