Issues with upgrading to Drupal ^10.1.7 due to conflicts with egulias/email-validator version

Created on 13 December 2023, 10 months ago

Problem/Motivation

I want to Upgrade from Drupal 9 to the current Drupal 10.1.x using composer, but it's not working while still having composer requiring drupal/swiftmailer. After removing drupal/swiftmailer from composer it works without problems.

composer require 'drupal/swiftmailer:2.x-dev@dev' -W --dry-run
./composer.json has been updated
Running composer update drupal/swiftmailer --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
- drupal/swiftmailer dev-2.x requires egulias/email-validator ^2.0||^3 -> found egulias/email-validator[dev-master, 2.0.0, ..., 2.1.x-dev, 3.0.0, ..., 3.x-dev] but these were not loaded, likely because it conflicts with another require.
- drupal/swiftmailer 2.x-dev is an alias of drupal/swiftmailer dev-2.x and thus requires it to be installed too.
- Root composer.json requires drupal/swiftmailer 2.x-dev@dev -> satisfiable by drupal/swiftmailer[2.x-dev (alias of dev-2.x)].

Steps to reproduce

composer why egulias/email-validator

drupal/core 9.5.11 requires egulias/email-validator (^2.1.22|^3.2)
drupal/core-recommended 9.5.11 requires egulias/email-validator (~3.2.1)
drupal/swiftmailer 2.4.0 requires egulias/email-validator (^2.0||^3)
swiftmailer/swiftmailer v6.3.0 requires egulias/email-validator (^2.0|^3.1)
symfony/mime v5.4.13 conflicts egulias/email-validator (~3.0.0)

Proposed resolution

Optional allow egulias/email-validator :^4

I do not know if drupal/swiftmailer is compatible with egulias/email-validator. We already migrated to Drupal Symfony Mailer, but still need to require swiftmailer to uninstall the module on deployment. Otherwise we would need an extra step, first deploy migration to Drupal Symfony Mailer and then deploy drupal core update. We would prefer to do the migration and update in one single deployment.

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇩🇪Germany osopolar 🇩🇪 GER 🌐

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

Comments & Activities

Production build 0.71.5 2024