Insert library tarteaucitron with composer as a require

Created on 25 April 2023, over 1 year ago
Updated 26 March 2024, 8 months ago

Problem/Motivation

The objective is to download the library version that is already compatible with the module and facilitate the installation.

Proposed resolution

1. Add a composer.json with the require on the https://github.com/AmauriC/tarteaucitron.js and fix the version to the version 1.11.0
2. Update the readme

Remaining tasks

  • composer.json
  • documentation
  • Test
Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France yfiervil

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

Comments & Activities

  • Issue created by @yfiervil
  • 🇫🇷France yfiervil

    It's not possible to integrate a repository in a non root composer.json : https://getcomposer.org/doc/faqs/why-cant-composer-load-repositories-recursively.md

    A similar request exist on TacJS : https://www.drupal.org/project/tacjs/issues/3083861
    The solution was to integrate the lib in the module without composer.

    Despite this, we can update the documentation and add a composer.json with an exemple of repository to add it to the root composer.json like this:

    {
        "name": "drupal/tarte_au_citron",
        "description": "Manage features which use cookies (ads, social networks, videos, other contrib modules who print data in your pages)",
        "type": "drupal-module",
        "license": "GPL-2.0-or-later",
        "homepage": "https://www.drupal.org/project/tarte_au_citron",
        "support": {
            "issues": "https://www.drupal.org/project/issues/tarte_au_citron",
            "documentation": "https://git.drupalcode.org/project/tarte_au_citron",
            "source": "https://git.drupalcode.org/project/tarte_au_citron"
        },
        "repositories": {
            "tarteaucitron": {
                "type": "package",
                "package": {
                    "name": "amauric/tarteaucitron",
                    "version": "1.11.0",
                    "type": "drupal-library",
                    "dist": {
                        "url": "https://github.com/AmauriC/tarteaucitron.js/archive/refs/tags/v1.11.0.zip",
                        "type": "zip"
                    },
                    "require": {
                        "composer/installers": "^1.9"
                    }
                }
            }
        },
        "require": {
            "amauric/tarteaucitron": "^1.11"
        }
    }
    

    In the readme add information to add the repository in the composer.json :

  • @yfiervil opened merge request.
  • Status changed to Needs review over 1 year ago
  • Issue was unassigned.
  • First commit to issue fork.
  • Status changed to Fixed over 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Needs work about 1 year ago
  • 🇫🇷France O'Briat Nantes

    Hi,

    The README.md is not correct.

    First, using a key in repositories could lead to invalid json since the default drupal composer.json does not use them.

    Second, the composer require amauric/tarteaucitron is missing.

    Third, there is no documentation about how to use composer.libraries.json.

  • Status changed to Fixed 8 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024