Bug 280512 - devel/phabricator: fix PHPMailer with PHP 8+
Summary: devel/phabricator: fix PHPMailer with PHP 8+
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Michael Gmelin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-30 15:55 UTC by Ivan Rozhuk
Modified: 2024-12-04 16:30 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (grembo)


Attachments
patch (3.68 KB, patch)
2024-07-30 15:55 UTC, Ivan Rozhuk
no flags Details | Diff
patch (3.83 KB, patch)
2024-07-30 15:57 UTC, Ivan Rozhuk
no flags Details | Diff
patch (4.17 KB, patch)
2024-07-30 20:56 UTC, Ivan Rozhuk
rozhuk.im: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Ivan Rozhuk 2024-07-30 15:57:54 UTC
Created attachment 252372 [details]
patch
Comment 2 Ivan Rozhuk 2024-07-30 20:56:01 UTC
Created attachment 252379 [details]
patch

Works for me :)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-12-03 15:50:24 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4512883f38bd8038bde15205df4afb841957a140

commit 4512883f38bd8038bde15205df4afb841957a140
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2024-12-03 15:47:54 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2024-12-03 15:47:54 +0000

    devel/phabricator: Fix phpmailer with PHP 8

    PR:             280512
    Reported by:    Ivan Rozhuk <rozhuk.im@gmail.com>

 devel/phabricator/Makefile                           |  5 +++--
 ...xternals_phpmailer_class.phpmailer-lite.php (new) | 11 +++++++++++
 ...tch-externals_phpmailer_class.phpmailer.php (new) | 11 +++++++++++
 .../patch-externals_phpmailer_class.smtp.php (new)   | 20 ++++++++++++++++++++
 4 files changed, 45 insertions(+), 2 deletions(-)
Comment 4 Michael Gmelin freebsd_committer freebsd_triage 2024-12-03 15:54:18 UTC
Thank you very much for reporting and providing a patch, it kind of fell through the cracks so I just fixed it now, sorry for that.

The actual fix is slightly different from the original patch, as the arrays returned by preg_split and explode are actual simply flat arrays (so no need to do key/value here, simple foreach is enough).

If you're interested and have the time, you might also want to take a look at devel/phorgeit-phorge, which is the actively maintained fork of phabricator (which apparently already had the fix to phpmailer).
Comment 5 Ivan Rozhuk 2024-12-04 16:30:51 UTC
(In reply to Michael Gmelin from comment #4)

devel/phorgeit-phorge - no, thanks )
We migrate to gitea since it have PRs from git commits/branches and it woork faster on repo import.
Phabricator in our env is in "legacy" state, only wiki migration require us to keep it.