Add compatibility with linkit 7.0.0 (alpha) + D11

Created on 23 August 2024, 5 months ago

Problem/Motivation

Linkit now has a 7.0.0 (alpha) version for compatibility with Drupal 11.
Add a new release for this module that is compatible with Linkit > 7 and Drupal 11

Proposed resolution

- adjust composer.json file for the version requirements
- adjust info.yml file for the version requirements
- test and create a release

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium flyke

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @flyke
  • πŸ‡§πŸ‡ͺBelgium flyke

    First patch for testing

  • πŸ‡§πŸ‡ͺBelgium flyke

    More information for this patch here:
    I have a Drupal 10 project that I'm trying to update to Drupal 11.
    So I'm trying to upgrade every module that my project uses to a D11 compatible version.
    For linkit, that means at time of writing that I should update it to 7.0.0-alpha1.

    However, the update command:
    composer require 'drupal/linkit:^7.0@alpha' -W
    Fails because:

      Problem 1
        - Root composer.json requires drupal/linkit ^7.0@alpha, found drupal/linkit[7.0.0-alpha1] but these were not loaded, likely because it conflicts with another require.
      Problem 2
        - drupal/linkit_media_library is locked to version 1.0.3 and an update of this package was not requested.
        - drupal/linkit_media_library 1.0.3 requires drupal/linkit ^5 || ^6 -> found drupal/linkit[5.0.0-alpha1, ..., 5.0.0-beta13, 6.0.0-beta1, ..., 6.1.4] but it conflicts with your root composer.json require (^7.0@alpha).

    I now realise that the patch itself will be unusable because it only modifies the dependencies (applies the patch) of linkit_media_library after composer refuses to update linkit to version 7 because of the original depencies in the repo of linkit_media_library. So we really need a new version. Will try to create an issue branch for this and then add that into my composer 'repositories' section.

  • πŸ‡§πŸ‡ͺBelgium flyke

    I hid the patch because its useless as mentionned above.

    To use the issue fork, adjust your composer.json repositories section like this:

        "repositories": [
            {
                "type": "git",
                "url": "https://git.drupalcode.org/issue/linkit_media_library-3469848.git"
            },

    So add the repo for this issue branch before the packages.drupal.org repo.
    If you want to make 100% sure you get the correct repo for linkit_media_library, you can also exclude it in the packages.drupal.org repo like this:

            {
                "type": "composer",
                "url": "https://packages.drupal.org/8",
                "exclude": ["drupal/linkit_media_library"]
            },

    Now you need to require the correct version of linkit_media_library which is apparently 'dev-' + the issue branch that drupal auto created, so:
    composer require drupal/linkit_media_library:dev-3469848-add-compatibility-with

    After that, I can do:
    composer require 'drupal/linkit:^7.0@alpha' -W

    Which updates linkit successfully now.

  • It's not terribly nice looking, but I can confirm it works. Too bad it didn't do anything to fix the problem I have, but that's another story.

  • πŸ‡ΊπŸ‡ΈUnited States kthull Fort Wayne, Indiana

    Also confirming this works. Would be great if it got merged in so we can clean up composer.

  • Merge request !9add Linkit 7 + D11 compatibility β†’ (Closed) created by flyke
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This will allow you to install it but won't work in linkit and ckeditor5 there are other tickets for that

Production build 0.71.5 2024