Cannot Install LDAP - Drupal 9.4.8

Created on 23 November 2022, over 1 year ago
Updated 12 May 2023, about 1 year ago

Problem/Motivation

We did a fresh Drupal 9.4.8 install and tried to install LDAP. This breaks down giving a dependence issue

Steps to reproduce

1 - Install fresh drupal 9.4.8 install

$ composer create-project drupal/recommended-project:^9 master
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? 
Creating a "drupal/recommended-project:^9" project at "./master"
Info from https://repo.packagist.org: #StandWithUkraine
Installing drupal/recommended-project (9.4.8)
  - Installing drupal/recommended-project (9.4.8): Extracting archive

2 - Install LDAP

$ cd master
$ composer require 'drupal/ldap:^4.3'
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/ldap
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/ldap ^4.3 -> satisfiable by drupal/ldap[4.3.0].
    - drupal/ldap 4.3.0 requires drupal/authorization ^1.0 -> found drupal/authorization[dev-1.x, 1.0.0-beta1, ..., 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.

I then tried steps at

https://www.drupal.org/project/ldap/issues/3227473#comment-14216257 →
but that breaks down too

$ composer require drupal/authorization:^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/authorization
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
  - Locking drupal/authorization (1.0.0-beta6)
  - Locking drupal/externalauth (2.0.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing drupal/externalauth (2.0.3): Extracting archive
  - Installing drupal/authorization (1.0.0-beta6): Extracting archive
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Generating autoload files
42 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

$ composer require drupal/ldap:^4.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/ldap
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/ldap ^4.0 -> satisfiable by drupal/ldap[4.0.0, 4.1.0, 4.2.0, 4.3.0].
    - drupal/ldap[4.0.0, ..., 4.3.0] require drupal/externalauth ^1.0 -> found drupal/externalauth[1.0.0, ..., 1.4.0] but the package is fixed to 2.0.3 (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.

Thanks.

Yashesh

💬 Support request
Status

Closed: duplicate

Version

4.3

Component

Code

Created by

🇮🇳India yasheshb

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇴Norway mflage

    Tried the same, still no dice.

    First, attempting to remove the authorization module seems to fail:

    drupal/authorization is not required in your composer.json and has not been removed
    ./composer.json has been updated
    Running composer update drupal/authorization
    Loading composer repositories with package information
    Package "drupal/authorization" listed for update is not locked.
    Updating dependencies
    Nothing to modify in lock file
    Installing dependencies from lock file (including require-dev)
    Nothing to install, update or remove
    Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
    Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
    Generating autoload files
    41 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    No security vulnerability advisories found
    

    And then installing the ldap module fails as well:

    # composer require -W drupal/ldap:^4.0
    ./composer.json has been updated
    Running composer update drupal/ldap --with-all-dependencies
    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/ldap ^4.0 -> satisfiable by drupal/ldap[4.0.0, 4.1.0, 4.2.0, 4.3.0].
        - drupal/ldap[4.0.0, ..., 4.3.0] require drupal/authorization ^1.0 -> found drupal/authorization[dev-1.x, 1.0.0-beta1, ..., 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.
    
  • Here's a question. In your step 2 output, it says

      Problem 1
        - Root composer.json requires drupal/ldap ^4.3 -> satisfiable by drupal/ldap[4.3.0].
        - drupal/ldap 4.3.0 requires drupal/authorization ^1.0 -> found drupal/authorization[dev-1.x, 1.0.0-beta1, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.
    

    Did you try setting "minimum-stability": "dev", in between step 1 and 2 in your composer.json? You could try setting that, then deleting the composer.lock file and starting over with the requires.

    Also, in the issue description, the output shows this:

      Problem 1
        - Root composer.json requires drupal/ldap ^4.0 -> satisfiable by drupal/ldap[4.0.0, 4.1.0, 4.2.0, 4.3.0].
        - drupal/ldap[4.0.0, ..., 4.3.0] require drupal/externalauth ^1.0 -> found drupal/externalauth[1.0.0, ..., 1.4.0] but the package is fixed to 2.0.3 (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.
    

    Did you try listing drupal/externalauth:^1.0 as an argument for the update command?

Production build 0.69.0 2024