Following the description for "installation on existing site" (composer require "drupal/commerce"), I got the following error:
===
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for drupal/commerce ^2.23 -> satisfiable by drupal/commerce[2.23.0].
- drupal/commerce 2.23.0 requires drupal/inline_entity_form ^1.0-rc6 -> satisfiable by drupal/inline_entity_form[1.x-dev, 1.0.0-rc6, 1.0.0-rc7, 1.0.0-rc8] but these conflict with your requirements or minimum-stability.

A similar error appear when installing the dev version.

Comments

Londova created an issue. See original summary.

kerkux’s picture

Same here... I think they missed a zero in between the version? ^1.0-rc6 vs 1.0.0-rc6

rszrama’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

Where are you finding these instructions? And can you not just change your minimum-stability?

mmjvb’s picture

Use
composer require drupal/inline_entity_form @RC to allow packages not yet Stable. Only for inline_entity_form, use minimum-stability: rc to allow this for any package in your project.

It is not about the version constraint, as the message tells you. It is about your project not having minimum-stability set to something that allows anything but Stable. Not having minimum-stability in your composer.json, defaulting to Stable as minimum stability. Which is a good thing in my opinion. Use the other stabilities for selected packages as suggested above.

kerkux’s picture

Hi Ryan, thanks for your answer, I found the instructions here:

https://docs.drupalcommerce.org/commerce2/developer-guide/install-update...

I was actually trying to install it on a fresh Drupal 9 installation.

I was able to install it by following these steps though, but of course it's not what I wanted at the beginning.

export SITE_NAME=drupal-commerce-test
composer create-project drupalcommerce/project-base $SITE_NAME --stability dev
cd $SITE_NAME
ddev stop --unlist $SITE_NAME
ddev config --docroot=web --project-name=$SITE_NAME --project-type=drupal8
ddev start

Thanks anyway!

rszrama’s picture

Status: Postponed (maintainer needs more info) » Fixed

Got it, glad you got it fixed! We're really close to a full release of Inline Entity Form, so that will bring this to an even firmer conclusion as well. 😊

netgeek123’s picture

#4 worked for me.

morbus iff’s picture

@rszrama, random FYI:

Drupal 9.1 changes the default minimum stability from "dev" to "stable":

https://www.drupal.org/node/3174472

(Nutshell: any fresh install of Drupal 9.1 with Commerce will fail due to IEF RC.)

mmjvb’s picture

Drupal 9.1 changes the default minimum stability from "dev" to "stable":

Minor correction: the default is Stable. Several templates corrected the mistake made by setting it to dev. Definitely not something you should do for your project, assuming it is used for building sites. As mentioned for the moment your project needs to allow for the RC of IEF. Either for IEF only or generally for any extension, awaiting stable release of IEF.

This has nothing to do with Drupal 9.1. It has to do with your OWN project and Commerce using something not Stable yet.

bojanz’s picture

Title: Commerce installation fails when using Composer » Update the Composer constraint for Inline Entity Form
Category: Support request » Task
Status: Fixed » Active

@mmjvb
Your comment added no new information, while your tone leaves something to be desired.

Let's reopen this as a task to modify composer.json and add the @RC suffix to the IEF constraint.

mmjvb’s picture

Hopefully there are others that do understand what I am saying.

For me there is no need to change the constraint. Consider it perfectly acceptable for projects to allow for RC releases of their dependencies. Should be documented though, as adding this module to your project will fail when not allowing them. Obviously, only for those without Stable releases. Would not consider that common knowledge with those interested in this module.

Although evaluating the constraints of the dependencies sounds like a good idea, fail to understand why this would be limited to IEF.

guy_schneerson’s picture

I ran into the same issue while adding commerce to an existing 9.2 site and easily sorted it out by adding the current version of IEF before adding commerce:

composer require 'drupal/inline_entity_form:^1.0@RC'
composer require 'drupal/commerce:^2.24'
kevinhbruce’s picture

RE: "We're really close to a full release of Inline Entity Form" - @rszrama
Any word on when a stable release will come out?

  • jsacksick committed aabafe8 on 8.x-2.x
    Issue #3197048: Update the Composer constraint for Inline Entity Form.
    

  • jsacksick committed a82d3bd on 3.0.x
    Issue #3197048: Update the Composer constraint for Inline Entity Form.
    
jsacksick’s picture

Status: Active » Fixed

I updated the composer constraint to 1.0@RC.

Status: Fixed » Closed (fixed)

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

londova’s picture

The problem still exists - I just start a new installation on Drupal 9.4.0

mmjvb’s picture

The problem can not be resolved ! You have conflicting requirements that need to be resolved.
As long as there is no stable release of IEF, your project needs to allow for non-stable releases of it. Currently it is at RC11.

composer require drupal/inline_entity_form @RC --no-update

then your project won't have a problem with installing commerce, at least not relating to IEF.

wxman’s picture

I just tried it today trying all the tricks but it still won't let me install on a brand new D9 site

mmjvb’s picture

In cases like that you need to provide specific information. Preferably in your own support issue. Without that we can't tell what is wrong.

docker@cli:/var/www/d94$ composer require drupal/inline_entity_form @RC --no-update
./composer.json has been updated
docker@cli:/var/www/d94$ composer require drupal/commerce
Using version ^2.30 for drupal/commerce
./composer.json has been updated
Running composer update drupal/commerce
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 11 installs, 0 updates, 0 removals
  - Locking commerceguys/addressing (v1.3.0)
  - Locking commerceguys/intl (v1.1.1)
  - Locking doctrine/collections (1.6.8)
  - Locking drupal/address (1.10.0)
  - Locking drupal/commerce (2.30.0)
  - Locking drupal/entity (1.3.0)
  - Locking drupal/entity_reference_revisions (1.9.0)
  - Locking drupal/inline_entity_form (1.0.0-rc11)
  - Locking drupal/profile (1.4.0)
  - Locking drupal/state_machine (1.6.0)
  - Locking drupal/token (1.10.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 11 installs, 0 updates, 0 removals
  - Downloading doctrine/collections (1.6.8)
  - Downloading commerceguys/addressing (v1.3.0)
  - Downloading drupal/token (1.10.0)
  - Downloading drupal/state_machine (1.6.0)
  - Downloading drupal/entity (1.3.0)
  - Downloading drupal/profile (1.4.0)
  - Downloading drupal/entity_reference_revisions (1.9.0)
  - Downloading drupal/address (1.10.0)
  - Downloading commerceguys/intl (v1.1.1)
  - Downloading drupal/commerce (2.30.0)
  - Installing doctrine/collections (1.6.8): Extracting archive
  - Installing commerceguys/addressing (v1.3.0): Extracting archive
  - Installing drupal/token (1.10.0): Extracting archive
  - Installing drupal/state_machine (1.6.0): Extracting archive
  - Installing drupal/entity (1.3.0): Extracting archive
  - Installing drupal/profile (1.4.0): Extracting archive
  - Installing drupal/inline_entity_form (1.0.0-rc11): Extracting archive
  - Installing drupal/entity_reference_revisions (1.9.0): Extracting archive
  - Installing drupal/address (1.10.0): Extracting archive
  - Installing commerceguys/intl (v1.1.1): Extracting archive
  - Installing drupal/commerce (2.30.0): Extracting archive
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Generating autoload files
42 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
docker@cli:/var/www/d94$
wxman’s picture

@mmjvb
I was finally able to get it installed using:

composer require drupal/inline_entity_form @RC --no-update

Buried in all the error messages was a php extension that was installed but wasn't being seen by the installation. I did a manual install of the php extension then using composer require drupal/inline_entity_form @RC --no-update it all went fine.

Gastonia’s picture

Thank you for those commands, MMJVB, that was very helpful in getting 9.x setup.

On the Commerce Core home page under Versions it mentions that Commerce "Works with Drupal: ^9.2 || ^10." If i follow the same general approach of relaxing the minimum stability and try to install it on Drupal 10, I still get errors about IEF.

IEF doesn't list compatibility with 10, so I'm thinking that the version reference may be a typo? If not, and there is a set of composer commands to get a D10 version up and running, could someone please post those? For me it doesn't matter that it would be a purely dev install at this point, I just want to play around with a Drupal 10 version of Commerce.

mmjvb’s picture

My upgrade status report tells me: entity, entity_reference_revisions, inline_entity_form and token, all dependencies of commerce, are not available for D10.

You might want to try the plugin from mglaman: https://github.com/mglaman/composer-drupal-lenient

Forgot to mention drupal/backward_compatibility: https://www.drupal.org/project/backward_compatibility

4goodapp’s picture

I just Face this issue using Drupal 9.4.5.
#21 did solve the issue for me.

composer require drupal/inline_entity_form @RC --no-update
Then
composer require "drupal/commerce"

May be this should be added in the doc until it is fixed.

aryashreep’s picture

Comment#25 worked for me.
Thank you

coaston’s picture

I just ran into the same issue on 10.1 so this needs to be reopen, however Comment#25 worked for me.