I have an issue with composer and Drupal 8.9.13. When I try to update Drupal, I always get the next error and I don't find a way to solve it:

#$> php -d memory_limit=-1 composer.phar update drupal/core --with-dependencies

Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package drupal/swiftmailer (locked at 1.0.0-beta2, required as ^2.0) is satisfiable by drupal/swiftmailer[1.0.0-beta2] but these conflict with your requirements or minimum-stability.
  Problem 2
    - Conclusion: don't install drupal/swiftmailer 2.0.0
    - Conclusion: don't install drupal/swiftmailer 2.0.0-beta1
    - Conclusion: don't install drupal/swiftmailer 2.0.0-alpha2
    - drupal/swiftmailer 2.0.0-alpha1 requires swiftmailer/swiftmailer ~6.1.3 -> satisfiable by swiftmailer/swiftmailer[v6.1.3].
    - Conclusion: don't install swiftmailer/swiftmailer v6.1.3
    - Conclusion: remove swiftmailer/swiftmailer v5.4.12
    - Installation request for drupal/swiftmailer ^2.0 -> satisfiable by drupal/swiftmailer[2.x-dev, 2.0.0-alpha1, 2.0.0-alpha2, 2.0.0-beta1, 2.0.0].
    - Conclusion: don't install swiftmailer/swiftmailer v5.4.12
    - drupal/swiftmailer 2.x-dev requires swiftmailer/swiftmailer ^6.1.3 -> satisfiable by swiftmailer/swiftmailer[6.2.x-dev, v6.1.3, v6.2.0, v6.2.1, v6.2.2, v6.2.3, v6.2.4, v6.2.5, v6.2.6, v6.2.7].
    - Can only install one of: swiftmailer/swiftmailer[6.2.x-dev, v5.4.12].
    - Can only install one of: swiftmailer/swiftmailer[v6.2.0, v5.4.12].
    - Can only install one of: swiftmailer/swiftmailer[v6.2.1, v5.4.12].
    - Can only install one of: swiftmailer/swiftmailer[v6.2.2, v5.4.12].
    - Can only install one of: swiftmailer/swiftmailer[v6.2.3, v5.4.12].
    - Can only install one of: swiftmailer/swiftmailer[v6.2.4, v5.4.12].
    - Can only install one of: swiftmailer/swiftmailer[v6.2.5, v5.4.12].
    - Can only install one of: swiftmailer/swiftmailer[v6.2.6, v5.4.12].
    - Can only install one of: swiftmailer/swiftmailer[v6.2.7, v5.4.12].
    - Installation request for swiftmailer/swiftmailer (locked at v5.4.12) -> satisfiable by swiftmailer/swiftmailer[v5.4.12].

I have updated (manually) switfmailer to 2.0.0 version, and I have changed composer.json to lock it to 2.0.0. But It doesn't solve the issue. Any suggestion?

  • try to remove the vendor and composer.lock before
    – berramou
    Apr 5, 2021 at 11:23
  • thanks, but It doesn't work. At the end, I had to remove the module and install it again and now it works.
    – briast
    Apr 5, 2021 at 16:33


Your Answer

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

Browse other questions tagged or ask your own question.