Installation via composer does not work if minimum stability is stable

Created on 19 July 2023, 11 months ago
Updated 20 October 2023, 8 months ago

Problem/Motivation

$ composer require drupal/lupus_decoupled:@beta
fails with

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

Problem 1
- drupal/lupus_decoupled[1.0.0-beta1, ..., 1.0.0-beta2] require drupal/lupus_decoupled_cors * -> found drupal/lupus_decoupled_cors[dev-1.x, 1.0.0-alpha2, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.
- Root composer.json requires drupal/lupus_decoupled @beta -> satisfiable by drupal/lupus_decoupled[1.0.0-beta1, 1.0.0-beta2].

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇦🇹Austria fago Vienna

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

Comments & Activities

  • Issue created by @fago
  • 🇮🇳India dineshkumarbollu

    Change minimum stability: If you are comfortable using packages with a minimum stability of "alpha" or "beta," you can change the minimum stability setting in your composer.json file. For example, set it to "alpha" to allow the installation of packages in alpha, beta, or stable versions:

    In composer.json file edit this.

    {
    "minimum-stability": "alpha"
    }

  • 🇦🇹Austria fago Vienna

    yes, but when people have not done that, we cannot provide an install command one-liner

    Problem seems to be that the drupal.org packaging adds module dependencies to composer.json dependencies:

    $ composer show drupal/lupus_decoupled -a
    name     : drupal/lupus_decoupled
    descrip. : Ready-to-go Decoupled Drupal with Nuxt.js!
    keywords : Drupal, Decoupled
    versions : 1.x-dev, 1.0.0-beta2, 1.0.0-beta1, 1.0.0-alpha4, 1.0.0-alpha3, 1.0.0-alpha2, 1.0.0-alpha1, dev-1.x
    type     : drupal-module
    license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
    homepage : https://www.drupal.org/project/lupus_decoupled
    source   : [git] https://git.drupalcode.org/project/lupus_decoupled.git 1443c34114e84eb71608f2351f2d2904e04de10c
    dist     : []  
    names    : drupal/lupus_decoupled
    
    support
    source : https://git.drupalcode.org/project/lupus_decoupled
    
    requires
    drupal/core ^9 || ^10
    drupal/lupus_decoupled_ce_api *
    drupal/lupus_decoupled_cors *
    drupal/lupus_decoupled_menu *
    drunomics/service-utils *
    drupal/config_rewrite ^1.5
    drupal/custom_elements ^2.2 || 3.x-dev
    drupal/lupus_ce_renderer ^2.3.3
    drupal/rest_menu_items ^3.0.3
    drupal/trusted_redirect ^1.11.0
    
    </code>
    
    But in 
    https://git.drupalcode.org/project/lupus_decoupled/-/blob/1.x/composer.json?ref_type=heads
    there is no dependency lupus_decoupled_ce_api - so we cannot add the @beta there.
    
    Maybe it works when we add requirements to the modules explicitly. Drupal.org seems to generate meta-packages for sub-modules:
    <code>composer show drupal/lupus_decoupled_ce_api -a
    name     : drupal/lupus_decoupled_ce_api
    descrip. : Provides custom elements API at /ce-api
    keywords : 
    versions : 1.x-dev, 1.0.0-beta2, 1.0.0-beta1, 1.0.0-alpha4, 1.0.0-alpha3, 1.0.0-alpha2, 1.0.0-alpha1, dev-1.x
    type     : metapackage
    
  • Status changed to Needs review 8 months ago
  • 🇵🇹Portugal rfmarcelino

    Since this will no longer be an issue when not in dev, I just made a merge request to change the project simply page 'quick start' snippets.
    https://github.com/drunomics/lupus-decoupled-website/pull/31

    Instead of only:
    composer require drupal/lupus_decoupled

    would be:
    composer create-project drupal/recommended-project lupus
    cd lupus
    composer config minimum-stability dev
    composer require drupal/lupus_decoupled

    Not that elegant, but since core assumes stable as 'default', not sure if there's a simpler way to do it.

  • Status changed to Fixed 8 months ago
  • 🇦🇹Austria fago Vienna

    thank you, merged all changes! They are live at

    https://lupus-decoupled.org

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

Production build 0.69.0 2024