Page MenuHomePhorge

PHPMailer: Set defaults for required parameters followed by optional parameters in Authorise() method signature
ClosedPublic

Authored by aklapper on May 17 2024, 14:14.

Details

Summary

Required parameters $password and $username follow the optional parameter $tval.
This is deprecated since PHP 8.0 per https://www.php.net/manual/en/migration80.deprecated.php
Define defaults for those required parameters to fix the issue - https://github.com/PHPMailer/PHPMailer/blob/master/src/POP3.php#L199 seems to also have survived so far without complaints by PHP 8 users (and PHPStan also does not complain anymore after this change).

Closes T15834

Test Plan

Carefully read the code.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sgtm

Thanks for the upstream link

This revision is now accepted and ready to land.May 30 2024, 10:38
This revision now requires review to proceed.May 30 2024, 10:39
This revision is now accepted and ready to land.May 30 2024, 10:39
aklapper retitled this revision from PHPMailer: Set defaults for required parameters followed by required parameters in Authorise() method signature to PHPMailer: Set defaults for required parameters followed by optional parameters in Authorise() method signature.May 30 2024, 13:40

Since this is a third-party dependency can we check if this was fixed upstream, and that an update to phpmailer would fix this?

Oh I see you did confirm it’s fixed upstream. Should we just update the version we’re using?

In D25660#18437, @speck wrote:

Oh I see you did confirm it’s fixed upstream. Should we just update the version we’re using?

Ideally yes but the "just" is quite complex given about 13 years of no updating and no test setup locally. (Stuff like D25631 is at least pretty testable.)