mail-mime-parser
mail-mime-parser copied to clipboard
PHP 8.1 deprecation notices
Hello. I use the last version of lib 2.2.1 and have deprecation notices.
- Method "SplSubject::attach()" might add "void" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Message\MessagePart" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "SplSubject::detach()" might add "void" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Message\MessagePart" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "SplSubject::notify()" might add "void" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Message\MessagePart" now to avoid errors or add an explicit @return annotation to suppress this message.
- The "ZBateson\MailMimeParser\Message::setHtmlPart()" method will require a new "string $contentTypeCharset" argument in the next major version of its interface "ZBateson\MailMimeParser\IMessage", not defining it is deprecated.
- Method "SplObserver::update()" might add "void" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Parser\Part\ParserPartStreamContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "ArrayAccess::offsetExists()" might add "bool" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Message\PartChildrenContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "ArrayAccess::offsetGet()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Message\PartChildrenContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "ArrayAccess::offsetSet()" might add "void" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Message\PartChildrenContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "ArrayAccess::offsetUnset()" might add "void" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Message\PartChildrenContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "ArrayAccess::offsetExists()" might add "bool" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Parser\Part\ParserPartChildrenContainer" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "SplObserver::update()" might add "void" as a native return type declaration in the future. Do the same in implementation "ZBateson\MailMimeParser\Stream\MessagePartStream" now to avoid errors or add an explicit @return annotation to suppress this message.
- Method "Psr\Http\Message\StreamInterface::close()" might add "void" as a native return type declaration in the future. Do the same in implementation "ZBateson\StreamDecorators\NonClosingStream" now to avoid errors or add an explicit @return annotation to suppress this message.
Could you please fix all these notices please? Thank you.
Hi @alexei-bykovski --
If you feel like submitting a pull request with "@return" annotations to fix it, I'd approve it. Otherwise, not entirely sure when I'll get around to this.
All the best
Hi @zbateson. I also noticed that there is already a commit that should have fixed the problem (added #[\ReturnTypeWillChange] attribute), but it doesn't work for me. I have PHP 8.1.1 🤷. This commit [(https://github.com/zbateson/mail-mime-parser/commit/123dc3a41fa18999881349270e1a8eaade7f266f)]. But "@return" annotations work. I checked. So if you don't mind I can make a pull request with the replacing #[\ReturnTypeWillChange] attributes to "@return" annotations.
Yeah, that would be great, thank you!
Hi @zbateson. Please merge pull request https://github.com/zbateson/mail-mime-parser/pull/197. Thank you.
Merged