The module needs a composer.json file

Created on 19 January 2024, 11 months ago
Updated 29 January 2024, 11 months ago

Problem/Motivation

The DataTables v 2.0.1 does not have a composer.json file. It is needed to manage its dependencies satisfactorily.

The actual provided process to do that is not simple enough. An user should have nothing to do beside a composer update to get a suitable module installation. The composer.json file is the means.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France

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

Merge Requests

Comments & Activities

  • Issue created by @Chris64
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dqd London | N.Y.C | Paris | Hamburg | Berlin
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dqd London | N.Y.C | Paris | Hamburg | Berlin

    It depends on the licenses of the used libraries and if you have to agree to something while downloading them or you are not allowed to spread them out from anohter than the original download source, that's why many module maintainers hasitate to put all in composer dependencies. But I agree with you that if we are forced to use composer in Drupal why do we do not use it consequently all over the place. I feel with you and agree on this attempt.

    Feel free to research on the license of the respective dependencies and if it is allowed to re-share them etc. If all is fine you can try to work on a solution if you like.

    Again: thanks for your report.

  • Status changed to Needs work 11 months ago
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dqd London | N.Y.C | Paris | Hamburg | Berlin
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia chetan 11

    chetan 11 โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !19fixed โ†’ (Open) created by chetan 11
  • Status changed to Needs review 11 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia chetan 11

    Please check the above MR.

  • Status changed to Needs work 11 months ago
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dqd London | N.Y.C | Paris | Hamburg | Berlin

    First nit picks:

    +    "require": {
    +        "drupal/core": "8.* || 9.*"
    +     }
    

    2.x-dev requires Drupal 8 | 9 | 10
    But review not complete yet.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France

    Yes indeed, for that line rather,
    "drupal/core": "^9 || ^10"
    But how to test the composer.json locally? Since the one takes into account is the repository one. And there are further crucial needs.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France

    Chris64 โ†’ changed the visibility of the branch 3415937-the-module-needs to hidden.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France

    Chris64 โ†’ changed the visibility of the branch 3415937-the-module-needs to active.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France

    The situation is there is two versions of the composer.json. The second one should be considered as a minimal required version. The first one is more developed. The plan is then,
    - Evaluate the second one.
    - Chose some elements from the first one to add to the second one.
    That is to say creating and merging not done.

  • Status changed to Needs review 11 months ago
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France

    Maybe the last composer.json needs some explanations. The idea is to make here what is asked to a user in the README.md to make in the main composer.json file to install the datatables library with composer. The process has already been reviewed and tested in an older issue: ๐Ÿ“Œ Drupal core has changed jQuery once() [Drupal 10 compatibility] Fixed .

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France

    Other problem with the original version,
    "license": "GPL-2.0+",
    registered as Deprecated License Identifiers in https://spdx.org/licenses/.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance Chris64 France

    About the license of the library, request from #4 ๐Ÿ“Œ The module needs a composer.json file Needs review . One means to get it,
    composer show datatables/datatables | grep license
    giving,
    license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
    Verify the library version,
    composer show datatables/datatables | grep version
    To verify if the license is compatible with Drupal: https://spdx.org/licenses/. And an other information about the datatables library the archive #3410585: Packaging allowlist archive โ†’ . Search datatables in the page. Drupalorg_whitelist is self-explanatory.

Production build 0.71.5 2024