Cannot install API 2.0.0 for Drupal 11.0.1 - conflict with symfony/yaml

Migrated issue

Reported by: yasheshb

Problem/Motivation

Installing API 2.0 on Drupal 11.0.1

Steps to reproduce

$ composer require 'drupal/api:^2.0'
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/api
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/api ^2.0 -> satisfiable by drupal/api[2.0.0].
    - drupal/api 2.0.0 requires symfony/yaml ^4.4.19 || ^6.2 -> found symfony/yaml[v4.4.19, ..., v4.4.45, v6.2.0, ..., v6.4.8] but it conflicts with your root composer.json require (^7.1).

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.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Assignee Loading
Time tracking Loading