Page MenuHomePhorge

PHP 8.2 error: "Creation of dynamic property MimeMailParser::$parts is deprecated"
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. PHP 8.2.17, Phorge at 216d308507edd54a68cb392df9f47011265c64e9
  2. Install php-mailparse if it is not already installed
  3. Be too lazy to set up a mail server software
  4. Have a local text file called email.txt with a valid mbox email message in it and place it in ./phorge/scripts/mail/
  5. In https://we.phorge.it/source/phorge/browse/master/scripts/mail/mail_handler.php , replace the line $parser->setText(file_get_contents('php://stdin')); with $parser->setText(file_get_contents('email.txt'));
  6. Run php ./phorge/scripts/mail/mail_handler.php

Expected outcome:
No errors

Actual outcome:

# [2024-03-29 09:43:56] ERROR 8192: Creation of dynamic property MimeMailParser::$parts is deprecated at [/var/www/html/phorge/phorge/externals/mimemailparser/MimeMailParser.class.php:137]
#arcanist(head=master, ref.master=ef73b12b580e), phorge(head=master, ref.master=216d308507ed)
#  #0 MimeMailParser::parse() called at [<phorge>/externals/mimemailparser/MimeMailParser.class.php:126]
#  #1 MimeMailParser::setText(string) called at [<phorge>/scripts/mail/mail_handler.php:37]

because https://php.watch/versions/8.2/dynamic-properties-deprecated

FYI I did not succeed to find an upstream for MimeMailParser, only copies outdated in the very same way.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.