Steps to reproduce

Install colorbox_inline on Drupal 11.3. The module cannot be enabled because core_version_requirement does not include ^11. Additionally, the procedural hooks in colorbox_inline.module are deprecated in Drupal 11 and will be removed in Drupal 12.

Proposed resolution

  • Update core_version_requirement to ^10.3 || ^11.
  • Convert hook_page_attachments() and hook_help() from procedural hooks to OOP hook class using the #[Hook] attribute (available since 10.3).
  • Update composer.json to add drupal/core constraint and fix the SPDX license identifier.

Remaining tasks

Review and test the merge request.

User interface changes

None.

API changes

Drupal 9 support is dropped. Minimum requirement is now Drupal 10.3.

Data model changes

None.

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

jaydee1818 created an issue. See original summary.

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

miwayha’s picture

Status: Active » Needs work

@jaydee1818 -- This is good progress. Thanks for moving this forward.

I merged another branch just to get D11 compatibility before I saw this one. That would have caused a merge conflict with your PR, so I pushed a fix to the merge conflict.

Two things need fixing:

  1. We need to add the #[LegacyHook] attribute to the to hooks in the .module file.
  2. We need dependency injection in the hooks class for the colorbox.attachment service

If you want to grab that in the next day or so, that's fine. Otherwise, I'll grab it myself.

miwayha’s picture

Version: 2.0.0 » 2.1.x-dev
Status: Needs work » 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.

miwayha’s picture

Status: Fixed » Closed (fixed)