User tests: Successful: Unsuccessful:
Pull Request resolves # .
Deprecates the static functions in the MailTemplate class as they are not used in core at all. Additionally it injects a database object to prevent depreacted Factory::getDbo() calls.
Mail is sent.
Mail is sent.
\Joomla\CMS\Mail\MailTemplate::createTemplate('com_mails.prtest','test subject','test body',[]); to the file /administrator/components/com_mails/src/View/Templates/HtmlView.php on line 97.\Joomla\CMS\Mail\MailTemplate::createTemplate('com_mails.prtest', 'test subject edited', 'test body edited', []);-\Joomla\CMS\Mail\MailTemplate::deleteTemplate('com_mails.prtest');All the checks above are successful.
All the checks above are successful.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org: #47717
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_config Libraries |
| Labels |
Added:
PR-6.2-dev
|
||
| Labels |
Added:
Feature
|
||
| Title |
|
||||||
Using now the replacement functions in the component and reverted the none deprecated code to not use the component.
I'm having issues commenting in the code directly, so here the comments not in line with the actual code:
I have problems with calling the model of com_mails, since it breaks the layers of a proper system. A library should never call code from a higher layer and only go to lower layers. So we shouldn't really call component code in the libraries, similar to that we can't call CMS code in the Joomla framework.
Also, when you deprecate something, please directly use the new code in the method and don't leave two separate implementations for the same feature in the codebase.