2

I cant update my sprout plugins due to a dependency / version issue with sprout base. Ive tried updating via composer - but I think I need to edit my composer file to work around the sprout base dependency issue - not certain of what that edit should be - any help appreciated.

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

Problem 1
- barrelstrength/sprout-email 4.0.0-beta.15 requires barrelstrength/sprout-base ^4.0.8 -> satisfiable by barrelstrength/sprout-base[4.0.8].
- barrelstrength/sprout-email 4.0.0-beta.15 requires barrelstrength/sprout-base ^4.0.8 -> satisfiable by barrelstrength/sprout-base[4.0.8].
- barrelstrength/sprout-email 4.0.0-beta.15 requires barrelstrength/sprout-base ^4.0.8 -> satisfiable by barrelstrength/sprout-base[4.0.8].
- Can only install one of: barrelstrength/sprout-base[5.0.0, 4.0.8].
- Can only install one of: barrelstrength/sprout-base[4.0.8, 5.0.0].
- Can only install one of: barrelstrength/sprout-base[5.0.0, 4.0.8].
- barrelstrength/sprout-forms 3.0.0-beta.57 requires barrelstrength/sprout-base ^5.0.0 -> satisfiable by barrelstrength/sprout-base[5.0.0].
- Installation request for barrelstrength/sprout-forms 3.0.0-beta.57 -> satisfiable by barrelstrength/sprout-forms[3.0.0-beta.57].
- Installation request for barrelstrength/sprout-email 4.0.0-beta.15 -> satisfiable by barrelstrength/sprout-email[4.0.0-beta.15].

2 Answers 2

2

You've identified the general problem. The easiest path around this issue is to upgrade to the latest of everything all at once. composer update alone will not upgrade to the latest major release, only to the latest releases defined in your composer.json. To make sure you are upgrading to the latest of everything:

  1. Delete your composer.lock file (might not be necessary but I find it helps get around a few potential support scenarios to take this step)
  2. Review each package in the require array of your composer.json
  3. Update each package to the latest version release.
  4. Once all packages are defined with their latest versions, run composer update

Regarding version constraints in your composer.json file, you'll probably want to require an explicit version of Craft and us the Caret Version Range for plugins:

{
  ...
  "require": {
    "craftcms/cms": "3.1.23",
    "vlucas/phpdotenv": "^2.4.0",
    "barrelstrength/sprout-forms": "^3.0.0-beta.57",
    "barrelstrength/sprout-email": "^4.0.0-beta.18",
    ...
  }
  ...
}

By updating to the latest versions of everything all at once, you'll ensure that the major releases of supporting modules that may be used by more than one plugin are updated and resolved together.

If you continue to run into issues you may want to try to run remove commands first (i.e. `composer remove barrelstrength/sprout-forms barrelstrength/sprout-email) or remove your entire vendor folder and go through the steps above again.

You should not need to require barrelstrength/sprout-base. Once you get the primary list if required packages in your composer.json file sorted out, the correct dependency will get resolved.

2
  • Thanks Ben... I muddled through somehow but will try to make sure I follow the steps outlined above next time.
    – Kevin
    May 29, 2019 at 10:50
  • @Kevin The steps above should not always be necessary. But they can be helpful to resolve dependency conflicts if they arise. May 29, 2019 at 23:47
1

Try to change barrelstrength/sprout-email to 4.0.0-beta.18, run composer clear-cache then composer update again.

4
  • Tried that – still getting an error ` - Can only install one of: barrelstrength/sprout-base[5.0.0, 4.0.8]. - barrelstrength/sprout-email 4.0.0-beta.18 requires barrelstrength/sprout-base ^5.0.0 -> satisfiable by barrelstrength/sprout-base[5.0.0].`
    – Kevin
    May 27, 2019 at 12:50
  • Do you actually have barrelstrength/sprout-base in your composer.json?
    – Oli
    May 27, 2019 at 13:15
  • No I didnt - I can require version 4.0.8 of sprout base and then run a composer update. But if I then try to update the plugins from the back end I get an error: - Installation request for barrelstrength/sprout-forms 3.0.0-beta.57 -> satisfiable by barrelstrength/sprout-forms[3.0.0-beta.57]. - barrelstrength/sprout-forms 3.0.0-beta.57 requires barrelstrength/sprout-base ^5.0.0 -> satisfiable by barrelstrength/sprout-base[5.0.0] but these conflict with your requirements or minimum-stability.
    – Kevin
    May 27, 2019 at 15:56
  • If I try to require sprout-base 5.0.0 from composer I get an error: - barrelstrength/sprout-email 4.0.0-beta.15 requires barrelstrength/sprout-base ^4.0.8 -> satisfiable by barrelstrength/sprout-base[4.0.8, v4.x-dev] but these conflict with your requirements or minimum-stability.
    – Kevin
    May 27, 2019 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.