Problem/Motivation

Update hook implementations to use the Hook attribute and object-oriented implementations for future compatibility and easier maintenance and testing. See https://www.drupal.org/node/3442349.

User interface changes

None

API changes

  • Existing hooks replaced with class loading of new OO implementations
  • Existing hook functions marked with LegacyHook attribute for eventual removal
  • New implementations for hook interactions implemented in hook classes and tagged with Hook attribute

Data model changes

None

Issue fork patternkit-3527051

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

slucero created an issue. See original summary.

slucero’s picture

Status: Active » Needs review
minsharm’s picture

Did basic regression testing on both D10 and D11, primarily focusing on usage tracking.

Everything looks good to me.

Scenarios covered:

  • Adding PatternKit blocks as well as WebRH blocks.
  • Updating and removing blocks.
  • Performing actions from both the new window and within Layout Builder.
  • Adding translations and verifying in the PatternKit usage report.
  • Validating CKEditor5 behavior.
  • Tested with different icons (other than “none”) from /admin/config/user-interface/patternkit/json.
  • Validated entry for each patternkit block on each page is listed on the admin reports page at /admin/reports/pattern-usage

Each entry displays the following:

  • The page title
  • A link to the page
  • The name of the used pattern
  • A path to the pattern within the layout
  • The language of the revision containing the pattern entry
  • The node ID of the node layout
  • The revision ID of the node revision

Also, I have validated the values for each of the entry - Name of the pattern, format of layout path with different section index value, nested pattern, revision id, node id. All the values are accurate.

  • Edit an existing page to add or remove blocks and expect this change to be reflected in the usage report without rescanning via the drush command.
  • Create a new page and set block content on the layout. Expect the new results to be reflected in the usage report without rescanning via the drush command.
slucero’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed and ready for merge and inclusion in the 9.1.2 release.

  • slucero committed a0b48482 on 9.1.x
    Issue #3527051 by slucero, minsharm: Convert Hooks to Object Oriented...
slucero’s picture

Status: Reviewed & tested by the community » Fixed

Merged for inclusion in the 9.1.2 release.

Status: Fixed » Closed (fixed)

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