Problem/Motivation

Fix failing Drupal Canvas test. See https://git.drupalcode.org/project/acquia_dam/-/jobs/7677806#L101.

This is due to the hook name change in Canvas 1.0.1 release, see.

Also fix failing Media: Acquia DAM tests.

Update the acquia_dam_module_implements_alter as per change record - https://www.drupal.org/node/3496788 for Drupal Canvas and Media: Acquia DAM modules.

Issue fork acquia_dam-3563376

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

rajeshreeputra created an issue. See original summary.

ankitv18 made their first commit to this issue’s fork.

rajeshreeputra’s picture

Status: Active » Needs work
rajeshreeputra’s picture

Status: Needs work » Needs review
rajeshreeputra’s picture

rajeshreeputra’s picture

Issue summary: View changes
rajeshreeputra’s picture

Title: Fix failing Canvas test » Update Canvas hook name as per 1.0.1 version.
ankitv18’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, moving into RTBC.

Question:
Why we are implementing hook for media_acquiadam as this module is obsolete? If media_acquiadam changes are required then please update the description.

rajeshreeputra’s picture

As per change record - https://www.drupal.org/node/3496788, now the hook_module_implements_alter must be implemented using the new style.

rajeshreeputra’s picture

amangrover90’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

vishalkhode’s picture

Status: Fixed » Needs work

Ideally CI should fail, but if CI is passing, then maybe something is introduced in latest release of 11.1.x is not causing module installation to fail. This needs to be manually tests with older release of 11.1.x to confirm, if we can use OrderAfter class.

rajeshreeputra’s picture

Status: Needs work » Fixed

No need as Canvas only works with Drupal 11.2.x and above, see.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

vishalkhode’s picture

Status: Fixed » Needs work

The Canvas requires Drupal Core ^11.2 from the day 1, but Acquia DAM supports Drupal Core ^9.5 and above and the module installation was failing in lower version of Drupal. That's why the comment was added here.

if CI is passing, then maybe something is introduced in latest release of 11.1.x is not causing module installation to fail. This needs to be manually tests with older release of 11.1.x to confirm, if we can use OrderAfter class.

rajeshreeputra’s picture

Status: Needs work » Fixed

MR merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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

wim leers’s picture

This issue's CR:

Canvas module changed the hook name, breaking compatibility.

This is wrong. See https://www.drupal.org/node/3561450.

The deprecated hook continued to work. A BC layer is in place. All that happened was deprecation errors appeared. Citing the code in Canvas:

    // Allow modules to alter the default.
    $this->moduleHandler->alterDeprecated(
      'Hook hook_storage_prop_shape_alter is deprecated in canvas:1.0.0 and will be removed in canvas:2.0.0. Implement hook_canvas_storable_prop_shape_alter instead. See https://www.drupal.org/node/3561450',
      'storage_prop_shape',
      // The value that other modules can alter.
      $alterable,
    );
    $this->moduleHandler->alter(
      'canvas_storable_prop_shape',
      // The value that other modules can alter.
      $alterable,
    );
rajeshreeputra’s picture

Updated:
In Drupal Canvas module hook_storage_prop_shape_alter has been deprecated and new hook added to hook_canvas_storable_prop_shape_alter with the same signature.