The MimePart class implements Psr\Http\Message\MessageInterface via guzzlehttp/guzzle which was recently updated with added return types that cause a "method is not compatible" type error in MimePart
This PR adds those return types to MimePart so it'll work on PHP 8
All the calling code expects MimePart::getBody() to return a string but now it returns a StreamInterface so I've updated the calling code in this library to use a new MimePart::getBodyString() method - if downstream users depend on strings then use this newer method to get them
The
MimePart
class implementsPsr\Http\Message\MessageInterface
viaguzzlehttp/guzzle
which was recently updated with added return types that cause a "method is not compatible" type error inMimePart
This PR adds those return types to
MimePart
so it'll work on PHP 8All the calling code expects
MimePart::getBody()
to return a string but now it returns aStreamInterface
so I've updated the calling code in this library to use a newMimePart::getBodyString()
method - if downstream users depend on strings then use this newer method to get them