laminas / laminas-mime

Create and parse MIME messages and parts
https://docs.laminas.dev/laminas-mime/
BSD 3-Clause "New" or "Revised" License
29 stars 23 forks source link

Provide PHP 8.1 support #18

Closed weierophinney closed 3 years ago

weierophinney commented 3 years ago

This patch provides PHP 8.1 support, via the following changes:

We have a circular dependency scenario between laminas-mail and laminas-mime. laminas-mail depends on laminas-mime for its MIME parsing capabilities. laminas-mime decodes headers to a laminas-mail Headers instance.

Unfortunately the Headers class implements Iterator, and, as such, we get deprecations under 8.1 unless the #[ReturnTypeWillChange] attribute to affected methods.

The solution here is to temporarily inline the Headers class as a test asset until laminas-mail is updated to work on PHP 8.1.