Dependency issue with D10.1 with simshaun/recurr

Created on 2 August 2023, over 1 year ago
Updated 5 December 2023, 12 months ago

Problem/Motivation

I'm running Drupal 10.1 project, when I tried to add this module, I got following dependencies error.

➜  sgstern.drupal git:(main) ✗ lando composer require drupal/smart_date:^4.1 
./composer.json has been updated
Running composer update drupal/smart_date
Gathering patches for root package.
> DrupalComposerManaged\ComposerScripts::preUpdate
Using version 'dev-main' for path repositories.
Loading composer repositories with package information
Updating dependencies                                 
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - simshaun/recurr[v5.0.0, ..., v5.0.1] require doctrine/collections ~1.6 -> found doctrine/collections[v1.6.0, ..., 1.8.x-dev] but the package is fixed to 2.1.2 (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.
    - drupal/smart_date[4.1.0-beta1, ..., 4.1.x-dev] require simshaun/recurr ^5 -> satisfiable by simshaun/recurr[v5.0.0, v5.0.1].
    - Root composer.json requires drupal/smart_date ^4.1 -> satisfiable by drupal/smart_date[4.1.0-beta1, 4.1.x-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

I see that https://github.com/simshaun/recurr it not very actively maintained. I see there is a PR available for https://github.com/simshaun/recurr/pull/208.

Proposed resolution

I suggest following solutions

🐛 Bug report
Status

Closed: outdated

Version

4.1

Component

Code

Created by

🇮🇳India Sharique

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

Comments & Activities

  • Issue created by @Sharique
  • 🇨🇦Canada mandclu

    Thanks for raising this, and for suggesting a solution. I've added this to 🌱 Smart Date 5.0 Plan Active .

  • If you really need this, you can follow this path below.
    I haven't tested it with the whole site, so test it locally before using it on your production site.

    *temporary solution

    composer require mglaman/composer-drupal-lenient
    composer config --merge --json extra.drupal-lenient.allowed-list '["simshaun/recurr"]'
    
    composer require 'simshaun/recurr:^5'
    composer require 'drupal/smart_date:4.1.x-dev@dev'
    ---------------------------------------------------
    
  • 🇨🇦Canada mandclu

    In my experience, adding the -W flag to the composer require for Smart Date will resolve the error, so reducing this down from major.

  • 🇨🇦Canada mandclu

    FYI, version 5.0.2 of the recurr library has just been tagged, which will allow for using modern versions of doctrine

  • Status changed to Closed: outdated 12 months ago
  • 🇨🇦Canada mandclu

    There have now been multiple new releases of simshaun/recurr so I don't believe this is an issue anymore.

Production build 0.71.5 2024