Can't install latest version with composer

Created on 20 September 2023, about 1 year ago

Problem/Motivation

Can't install Calendar module released 8 August 2023 with composer.

Steps to reproduce in Composer:

Tried:

composer require 'drupal/calendar:^1.0@beta'

Got:

./composer.json has been updated
Running composer update drupal/calendar
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/calendar 1.0@beta, found drupal/calendar[dev-1.x, dev-2.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x), 2.x-dev (alias of dev-2.x)] but it does not match the constraint.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Tried:

composer require 'drupal/calendar:^1.0-beta1'

Got:

./composer.json has been updated
Running composer update drupal/calendar
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/calendar 1.0-beta1 -> satisfiable by drupal/calendar[1.0.0-beta1].
- drupal/calendar 1.0.0-beta1 requires drupal/calendar_datetime * -> found drupal/calendar_datetime[dev-1.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Tried:

composer require 'drupal/calendar:1.x-dev@dev'

Got:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- drupal/calendar dev-1.x requires drupal/calendar_datetime * -> found drupal/calendar_datetime[dev-1.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.
- drupal/calendar 1.x-dev is an alias of drupal/calendar dev-1.x and thus requires it to be installed too.
- Root composer.json requires drupal/calendar 1.x-dev@dev -> satisfiable by drupal/calendar[1.x-dev (alias of dev-1.x)].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

๐Ÿ› Bug report
Status

Active

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡ทBrazil claudia sotto

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

Merge Requests

Comments & Activities

  • Issue created by @claudia sotto
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States lhridley

    Additional information:

    Tried to install calendar with Drupal 10.1 using composer version 2.5.1 (php 8.1) as follows:

    composer require drupal/calendar:^1.0@BETA

    Got the following message:

    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires drupal/calendar ^1.0@BETA -> satisfiable by drupal/calendar[1.0.0-beta1].
        - drupal/calendar 1.0.0-beta1 requires drupal/calendar_datetime * -> found drupal/calendar_datetime[dev-1.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.

    calendar_datetime is a submodule of calendar, and no separate project called drupal/calendar_datetime exists that I can locate. I dot not see an explicit dependency in the composer.json file for the project, the only place I can locate a dependency in the module code is in calendar.info.yml

    In any case, this prevents installing the module with composer.

  • ๐Ÿ‡ฆ๐Ÿ‡นAustria drupalfan2

    I have the same problem.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Jay.Chen

    The command "composer require drupal/calendar:^1.0@beta" works for me if I changed the "minimum-stability" to "dev" instead of "stable" in the composer.json file.

    "minimum-stability": "dev",
    "prefer-stable": true,
    
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Gorf

    10.1.6 and I wanted to confirm that I had the same issue here but simply altering my "minimum-stability" to be "dev" allows for the install.

  • ๐Ÿ‡ง๐Ÿ‡ทBrazil claudia sotto

    "minimum-stability": "dev" worked for me. Thanks!

  • The error you're encountering is likely due to the fact that the minimum stability set in your Composer configuration is "stable". Since the module is still in development and a stable version hasn't been released yet, Composer is unable to resolve the dependencies properly.

    To quickly address this error, you can adjust the minimum stability setting in your Composer configuration to "dev". This change will allow Composer to install modules that are in the development stage.

  • ๐Ÿ‡ฆ๐Ÿ‡นAustria maxilein

    The problem still exists with the beta2

    A beta should already be installable on test systems where they can be evaluated within a stable setting.

  • ๐Ÿ‡ฆ๐Ÿ‡นAustria maxilein

    It is very strange.
    I can install any dev version of other modules over my stable environment. I never have to set minimum stability to dev.
    So I suspect there is something wrong with the setting of the submodule.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada Jaypan

    I don't want to change the minimum-stability of my project. What worked for me:

    composer require drupal/calendar_datetime:^1.0@alpha && composer require 'drupal/calendar:^1.0@beta'

  • ๐Ÿ‡ฆ๐Ÿ‡นAustria maxilein

    Thanks Jaypan.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marc.bau

    Still not possible to install.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ajayyadav

    The command composer require drupal/calendar:^1.0@beta works for me.

    Also add this in composer.json file.

    "minimum-stability": "dev",
    "prefer-stable": true,
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marc.bau

    Well, but why is this needed? I tested the software and it looks working for me. I may found some issues, but they all look not that dramatic that blocking the installation is needed.

    Maybe the maintainer could explain why he think the module is so unready that it need to be so complicated. There are other alpha modules around that can be installed without changing the composer file manually.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ajayyadav

    I have not getting any issue when i have run composer require drupal/calendar:^1.0@beta command. (installed calendar module)

    But we add โ€œminimum-stabilityโ€ because this configuration specifies the minimum stability level for installed packages.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany marc.bau

    I have *many* modules in alpha and beta versions installed and none was blocked by a minimum-stability blocker.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia yasheshb

    this worked for me. without changing "minimum-stability": "dev", in composer.json

    $ composer require 'drupal/calendar_datetime:1.x-dev@dev' 'drupal/calendar:^1.0@beta'
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Continue as root/super user [yes]?
    ./composer.json has been updated
    Running composer update drupal/calendar_datetime drupal/calendar
    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 3 installs, 0 updates, 0 removals
      - Locking drupal/calendar (1.0.0-beta2)
      - Locking drupal/calendar_datetime (dev-1.x)
      - Locking drupal/views_templates (1.6.0)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 3 installs, 0 updates, 0 removals
      - Downloading drupal/views_templates (1.6.0)
      - Installing drupal/views_templates (1.6.0): Extracting archive
      - Installing drupal/calendar_datetime (dev-1.x)
      - Installing drupal/calendar (1.0.0-beta2): Extracting archive
    Generating autoload files
    47 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    Found 2 security vulnerability advisories affecting 2 packages.
    Run "composer audit" for a full list of advisories.
    
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States lvthunder

    I set the minimum-stability to dev and still get this when trying to install in a brand new Drupal 11 site.

    lvthunder@Stephen-SLS:~/ncc$ ddev composer require 'drupal/calendar:^1.0@beta'
    ./composer.json has been updated
    Running composer update drupal/calendar
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires drupal/calendar ^1.0@beta -> satisfiable by drupal/calendar[1.0.0-beta1, 1.0.0-beta2].
        - drupal/calendar[1.0.0-beta1, ..., 1.0.0-beta2] require drupal/core ^9.4 || ^10 -> found drupal/core[9.4.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.4.x-dev] but the package is fixed to 11.0.5 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    
    Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
    
    Installation failed, reverting ./composer.json and ./composer.lock to their original content.
    Composer [require drupal/calendar:^1.0@beta] failed, composer command failed: exit status 2. stderr=
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia divyansh.gupta Jaipur

    I would like to pick this issue and resolve it.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia divyansh.gupta Jaipur

    Solved the installation error where it was a problem occuring due to minimum-stability.
    This approach keeps the calendar_datetime submodule bundled with your module, and it works without the need for external repositories, ensuring that anyone installing the calendar module gets the required calendar_datetime submodule automatically and do not get the error for installing beta version either.

  • Status changed to Needs review 1 day ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    just a brief note in regards of the problem in #19 ๐Ÿ› Can't install latest version with composer Active where the install in drupal 11 failed. the composer.json of the calendar module is missing version 11 in line 24:

    https://git.drupalcode.org/project/calendar/-/blob/8.x-1.x/composer.json...

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    Just so nobody gets tripped up by this, I fixed the Drupal 11 composer mentioned in #19 issue in ๐ŸŒฑ Add Tests and enable gitlab-ci Active

    There are lots of rough edges in the beta release. I am hoping to iron a bunch out and add some tests.

Production build 0.71.5 2024