kenprogrammer's avatar

Unable to uninstall Swift Mailer

I upgraded my Laravel 7 project to Laravel 8. Now I just want to remove Swift Mailer and install Symfony Mailer but I'am getting the following error:

Removal failed, swiftmailer/swiftmailer is still present, it may be required by another package. See `composer why swiftmailer/swiftmailer`.

When I run composer why swiftmailer/swiftmailer i get:

laravel/framework  v8.83.19  requires  swiftmailer/swiftmailer (^6.3)

Since composer keeps advocating the switch to Symfony Mailer, how is one supposed to migrate?

0 likes
5 replies
kokoshneta's avatar

@kenprogrammer It’s probably possible to switch without upgrading somehow, but if you look at all the things that needed to change in the framework in order to get Symfony Mailer to work, I very much doubt it’s worth it. Probably a lot easier to just upgrade to Laravel 9 (which would be a good idea in any case – always good to stay up to date).

1 like

Please or to participate in this conversation.