Unable to manage composer.json

Created on 21 September 2023, about 1 year ago

Problem/Motivation

In 🐛 Add inline SVG support for stage_file_proxy Fixed we introduced a dev dependency on Stage File Proxy to our composer.json

  "require-dev": {
    "drupal/stage_file_proxy": "^2.0"
  }

This is causing an issue when using composer CLI to try to manage our composer.json file:

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

  Problem 1
    - Root composer.json requires drupal/stage_file_proxy, it could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Steps to reproduce

Install the module in a DDEV contrib space using https://github.com/ddev/ddev-drupal-contrib

git clone https://git.drupalcode.org/project/svg_image_field.git svg
ddev config --project-name=svg --project-type=drupal10 --docroot=web --create-docroot --php-version=8.1
ddev get ddev/ddev-drupal-contrib
ddev start
ddev composer install

Proposed resolution

Add a "repositories" block to our composer.json that supports the Drupal Package repository.

    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ]

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.3

Component

Code

Created by

🇪🇨Ecuador jwilson3

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

Comments & Activities

Production build 0.71.5 2024