Swiftmailer on PHP 8.2

dakujem

Andrej Rypo

Posted on June 6, 2023

Swiftmailer on PHP 8.2

One of the essential requirements for software to be maintained is the ability to upgrade the internals, hardware, operating system etc. to the latest possible versions. Long-term.

Lately, I've been working on a few legacy apps that needed new life breathed into them. Some ran 7.4, some even older versions of PHP.

One of external dependencies that these apps had in common was now long abandoned Swiftmailer by Symfony.

The original Swiftmailer runs on PHP versions up to 8.1, and no later. PHP 8.1 will be end-of-life by the end of 2024.

For some reason I've had trouble finding a fork that would reliably support PHP 8.2.

Without further ado, here is a Swiftmailer fork that can be run without any deprecation warnings on PHP 8.2:

GitHub logo viaaurea / swiftmailer-legacy

Comprehensive mailing tools for PHP with recent PHP support

Swift Mailer Legacy

This is a fork of legacy swiftmailer/swiftmailer updated to run on PHP 8.2 and possibly future versions without any deprecation warnings or compatibility issues, maintained by Via Aurea.

Installation:

composer require viaaurea/swiftmailer-legacy -W

Legacy port development notes here.


Swift Mailer

The original Swiftmailer stopped being maintained at the end of November 2021.

Please, move to Symfony Mailer at your earliest convenience. Symfony Mailer is the next evolution of Swiftmailer. It provides the same features with support for modern PHP code and support for third-party providers.

Swift Mailer is a component based mailing solution for PHP. It is released under the MIT license.

Swift Mailer is highly object-oriented by design and lends itself to use in complex web application with a great deal of flexibility.

For full details on usage, read the documentation.




All anyone willing to upgrade to PHP 8.2 has to do is type



composer require viaaurea/swiftmailer-legacy -W


Enter fullscreen mode Exit fullscreen mode

This will replace the original package without breaking requirements by other packages that rely on Swiftmailer being installed.

The fork is a fully compatible drop-in replacement of the original Swiftmailer with minimal code changes to support PHP 8.2.

💖 💪 🙅 🚩
dakujem
Andrej Rypo

Posted on June 6, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Swiftmailer on PHP 8.2
php Swiftmailer on PHP 8.2

June 6, 2023