Composer will not let me install Commerce Core due to "stability" setting?

Created on 18 July 2023, 12 months ago
Updated 7 March 2024, 4 months ago

This is on a fresh installation of Drupal 9.5.10

Composer Error

Problem 1
- Root composer.json requires drupal/commerce ^2.36 -> satisfiable by drupal/commerce[2.36.0].
- drupal/commerce 2.36.0 requires drupal/inline_entity_form ^1.0@RC -> found drupal/inline_entity_form[dev-1.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.

The error you are encountering is related to the minimum stability settings in your Drupal project's composer.json file. Drupal Commerce 2.x requires the drupal/inline_entity_form package, but it seems that your Composer configuration is not allowing the installation of unstable packages (e.g., alpha releases or development branches).

This is on a fresh installation of Drupal 9.5.10

I also find the installation of Drupal Commerce Core to be outdated and also kickstart project. I would love to start using this module and move away from WooCommerce and Shopify

💬 Support request
Status

Active

Version

2.36

Component

Documentation

Created by

🇺🇸United States joedevdrupal

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

Comments & Activities

  • Issue created by @joedevdrupal
  • 🇺🇸United States joedevdrupal

    Is this best practice to do this?

    Allow minimum stability:
    In your project's composer.json file, you can change the "minimum-stability" setting to allow for more unstable packages. To do this, add the following line:

    "minimum-stability": "dev",
    "prefer-stable": true,

    After adding this to your composer.json, run the following command:

    composer require drupal/commerce:2.36.0

  • 🇺🇸United States joedevdrupal
  • 🇮🇳India shaika-hassan

    Adjusting the minimum stability in Composer worked for me but it can have consequences, as it may allow the installation of packages in less stable states. However, it's a common practice to set the minimum stability to "dev" in development environments, where you might want to pull in the latest changes and development versions.
    If you're working on a production environment or a more stable release, you might want to consider carefully the stability settings and the potential risks associated with installing less stable versions of packages.
    Setting the minimum stability to "dev" and using "prefer-stable": true in composer.json might resolve the issue you're facing.

  • 🇬🇧United Kingdom Vali Hutchison

    I had the same issue. I resolved it by first installing the latest RC version of drupal/inline_entity_form and then installing Commerce and that worked.

    I didn't need to adjust the "minimum-stability" to do this - so it remained as 'stable'

    For reference here's my composer commands using the latest versions of each as of today:

    composer require 'drupal/inline_entity_form:^3.0@RC'
    composer require 'drupal/commerce:^2.38'
  • 🇳🇬Nigeria ojchris

    I confirm#5 above. Thanks @Vali Hutchison

  • 🇩🇪Germany m Sami Antaki
    $ php -v
    PHP 8.2.7 (cli) (built: Jun  9 2023 19:37:27) (NTS)

    $ sudo apt install php8.2-bcmath

    or

    $ composer require 'drupal/commerce:^2.38' --ignore-platform-req=ext-bcmath

Production build 0.69.0 2024