Problem/Motivation
Cannot install on D10, composer is throwing an error.
Problem 1
- Root composer.json requires drupal/fontawesome_iconpicker ^3.0@dev -> satisfiable by drupal/fontawesome_iconpicker[3.0.0-alpha1, 3.x-dev].
- drupal/fontawesome_iconpicker[3.0.0-alpha1, ..., 3.x-dev] require composer/installers ^1.9 -> found composer/installers[v1.9.0, v1.10.0, v1.11.0, v1.12.0] but it conflicts with your root composer.json require (^2.0).
The module is requirering composer/installers ^1.9 but Drupal 10 comes with a dependency on ^2.0
Steps to reproduce
Try to install the module on, Drupal 10 with composer
Proposed resolution
Change de dependency for composer/installers ^2.0
User interface changes
API changes
Data model changes
Comments
Comment #4
ranjit1032002Created MR!5 for the issue mentioned, please review.
Thank You.
Comment #5
joaomachado commentedGreetings, this still does not work on Drupal 10 with Composer 2.0, is there an eta on this?
Comment #6
rezhko commentedHaving the same problem, is anyone able to install it using composer on Drupal 10?
Comment #7
jsimonis commentedAnyone had any luck with this? I'm still getting:
Problem 1
- drupal/fontawesome_iconpicker[3.0.0-alpha1, ..., 3.0.0-alpha2] require composer/installers ^1.9 -> found composer/installers[v1.9.0, v1.10.0, v1.11.0, v1.12.0] but it conflicts with your root composer.json require (^2.2).
- Root composer.json requires drupal/fontawesome_iconpicker ^3 -> satisfiable by drupal/fontawesome_iconpicker[3.0.0-alpha1, 3.0.0-alpha2].
Comment #8
andreic commentedSame problem with alpha2.
I can't test the patch at https://git.drupalcode.org/project/fontawesome_iconpicker/-/merge_reques... because it will always try to download the module and it will look at that composer.json first, right? Which means this MR has to get released in order to download the module in Drupal 10.
Comment #9
andreic commentedCould you please merge the MR so that we can actually install the module with composer?
Comment #10
d34dman commentedCould we have an RTBC for this MR?
Comment #11
andreic commentedHow would RTBC help if the composer command will always look at the latest release composer.json file on the d.o server?
I mean, let's say it gets into RTBC status. Then what? Get the MR patch, apply it locally? I did that. As soon as you then run:
composer require 'drupal/fontawesome_iconpicker:^3.0@alpha'it will still look at the project's composer.json file and fail again.
Sorry but what am I missing here?
Comment #14
d34dman commentedComment #17
d34dman commentedThis should be fixed.
Instead of relying on composer to manage 3rd party library beyond our control, added dependency to https://packagist.org/packages/d34dman/vanilla-icon-picker to resolve the issue without much composer hackery. Please test and let me know if this works for you.
Try,
composer require drupal/fontawesome_iconpicker:^3Comment #18
d34dman commentedComment #19
d34dman commentedFixed in version 3.0.0-alpha5
Comment #20
andreic commentedIt now gets installed but I can't get rid of this message:
Not installed
The fontIconPicker library could not be found. To use the Font Awesome Iconpicker, please verify that the fontIconPicker library is installed correctly. Please see the Font Awesome Iconpicker submodule README file for more details.
on the Status page although I added all the right stuff to composer.json file, including the updated library:
"d34dman/vanilla-icon-picker": {
"type": "package",
"package": {
"name": "d34dman/vanilla-icon-picker",
"version": "v1.1.3",
"type": "drupal-library",
"dist": {
"url": "https://github.com/d34dman/vanilla-icon-picker/archive/refs/tags/1.3.0.zip",
"type": "zip"
}
}
}
Comment #21
d34dman commentedThanks for testing this,
> It now gets installed but I can't get rid of this message:
Did you setup the project using this Readme https://www.drupal.org/docs/develop/using-composer/manage-dependencies ?
> on the Status page although I added all the right stuff to composer.json file, including the updated library:
This should not be needed. As we have proper composer package for the library which is available here
https://packagist.org/packages/d34dman/vanilla-icon-picker
Comment #22
d34dman commented@andreic,
I tested with following setup,
1.
composer create-project drupal/recommended-project test_project2.
cd test_project3.
composer require drupal/fontawesome_iconpicker:^3.0.0-rc1And this installs drupal module as well as library in proper locations.
Comment #23
andreic commentedLast evening the rc1 wasn't available and composer require drupal/fontawesome_iconpicker:^3 did not work.
Now it worked but when I go to Manage form display, the formatter doesn't show up in the list (screenshot attached).
Comment #24
d34dman commented> Last evening the rc1 wasn't available and composer require drupal/fontawesome_iconpicker:^3 did not work.
Sorry about the inconvinience, glad that it got resolved. Now at least installation went through.
Could we please open a different ticket for the formatter not showing up? Since this ticket is about composer, I don't want to hijack this thread.
I will have a look at it later today.
Comment #25
andreic commentedGreat, thank you!
https://www.drupal.org/project/fontawesome_iconpicker/issues/3463581