- 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 8:28am 26 April 2023 - Issue was unassigned.
- First commit to issue fork.
-
klelostec →
committed 187b093d on 8.x-1.x authored by
yfiervil →
Resolve #3356339 "Composer readme"
-
klelostec →
committed 187b093d on 8.x-1.x authored by
yfiervil →
- Status changed to Fixed
over 1 year ago 4:09pm 17 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Needs work
about 1 year ago 8:56am 27 September 2023 - 🇫🇷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 drupalcomposer.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 9:54am 12 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.