Skip to content

[4.2] PHP8.2 deprecated relative callables#39500

Merged
HLeithner merged 2 commits intojoomla:4.2-devfrom
heelc29:4.2/php82/relative-callables/mail
Jan 12, 2023
Merged

[4.2] PHP8.2 deprecated relative callables#39500
HLeithner merged 2 commits intojoomla:4.2-devfrom
heelc29:4.2/php82/relative-callables/mail

Conversation

@heelc29
Copy link
Copy Markdown
Contributor

@heelc29 heelc29 commented Dec 26, 2022

Summary of Changes

Callables that are not accepted by the $callable() syntax (but are accepted by call_user_func()) are deprecated.

https://www.php.net/manual/en/migration82.deprecated.php#migration82.deprecated.core.relative-callables
https://wiki.php.net/rfc/deprecate_partially_supported_callables

Testing Instructions

Change following line in MailTemplate to $this->mailer->addRecipient($recipient->mail, $recipient->name); to use the function of the Mail class (because I don't find any use in the core)

$this->mailer->addAddress($recipient->mail, $recipient->name);

Actual result BEFORE applying this Pull Request

PHP Deprecated: Use of "parent" in callables is deprecated in libraries/src/Mail/Mail.php on line 301

Expected result AFTER applying this Pull Request

No deprecated message

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

@laoneo laoneo added the PHP 8.x PHP 8.x deprecated issues label Jan 3, 2023
@laoneo
Copy link
Copy Markdown
Member

laoneo commented Jan 11, 2023

I have tested this item ✅ successfully on 2ca3012

Tested while sending a mail with DPCalendar


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39500.

@joomdonation
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on da9204e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39500.

@joomdonation
Copy link
Copy Markdown
Contributor

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39500.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 12, 2023
@HLeithner HLeithner merged commit 36f5a14 into joomla:4.2-dev Jan 12, 2023
@HLeithner
Copy link
Copy Markdown
Member

Thanks

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 12, 2023
@Quy Quy added this to the Joomla! 4.2.7 milestone Jan 13, 2023
@heelc29 heelc29 deleted the 4.2/php82/relative-callables/mail branch January 15, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP 8.x PHP 8.x deprecated issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants