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

CommentFileSizeAuthor
#23 Screenshot 2024-07-24 at 13.21.42.png93.52 KBandreic
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Gregory_Visible created an issue. See original summary.

Ranjit1032002 made their first commit to this issue’s fork.

ranjit1032002’s picture

Status: Active » Needs review

Created MR!5 for the issue mentioned, please review.
Thank You.

joaomachado’s picture

Greetings, this still does not work on Drupal 10 with Composer 2.0, is there an eta on this?

./composer.json has been updated
Running composer update drupal/fontawesome_iconpicker --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  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.0).
    - Root composer.json requires drupal/fontawesome_iconpicker ^3.0@alpha -> satisfiable by drupal/fontawesome_iconpicker[3.0.0-alpha1, 3.0.0-alpha2].


Installation failed, reverting ./composer.json and ./composer.lock to their original content.
rezhko’s picture

Having the same problem, is anyone able to install it using composer on Drupal 10?

jsimonis’s picture

Anyone 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].

andreic’s picture

Same 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.

andreic’s picture

Could you please merge the MR so that we can actually install the module with composer?

d34dman’s picture

Could we have an RTBC for this MR?

andreic’s picture

How 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?

  • D34dMan committed daa67db6 on 3.x
    #3359673 add more lienient package version constraint for composer/...

d34dman’s picture

  • D34dMan committed ce76943d on 3.x
    #3359673 Switch to using d34dman/vanilla-icon-picker
    

  • D34dMan committed b67bb110 on 3.x
    #3359673 Make fontawesome_iconpicker work with both fontawesome 5 and...
d34dman’s picture

This 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:^3

d34dman’s picture

d34dman’s picture

Version: 3.0.0-alpha1 » 3.0.0-alpha5

Fixed in version 3.0.0-alpha5

andreic’s picture

It 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"
}
}
}

d34dman’s picture

Thanks 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

d34dman’s picture

@andreic,

I tested with following setup,

1. composer create-project drupal/recommended-project test_project
2. cd test_project
3. composer require drupal/fontawesome_iconpicker:^3.0.0-rc1

And this installs drupal module as well as library in proper locations.

andreic’s picture

StatusFileSize
new93.52 KB

Last 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).

d34dman’s picture

Status: Needs review » Fixed

> 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.

andreic’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.