User tests: Successful: Unsuccessful:
Pull Request resolves # .
com_content HTML services still use deprecated methods: Factory::getUser() and Factory::getDatabase(). This PR update code to remove the usages of these deprecated methods:
There should be same changes applied for other components.
Access to frontend of your site, login using your admin account. Access to an article details page and make sure edit icon is still being displayed OK (no error)
Works but use deprecated methods
Works without using deprecated methods.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_content |
| Labels |
Added:
PR-6.2-dev
|
||
I would say these kind of classes are not designed for direct instance class. The right usages would be boot the component and then use HTMLHelper to call these methods. For example HTMLHelper::_('contentadministrator.association', $item->id)
If we still worry about this, then Yes, we can only do these kind of changes in next major release.
Changes in components don't fall under our BC promise, so it can go into minor. I personally would do it in major, but this is up to the RM and not me to decide.
Or stabilizing the code like I did in com_fields https://github.com/joomla/joomla-cms/blob/6.2-dev/administrator/components/com_fields/src/Model/FieldModel.php#L351-L358
Or stabilizing the code like I did in com_fields https://github.com/joomla/joomla-cms/blob/6.2-dev/administrator/components/com_fields/src/Model/FieldModel.php#L351-L358
Yes. I updated code to use services from container if not injected. Thanks
As this is done in com_content it is possible that extensions are using this class. This will throw an exception then as no database is available. In the upgrade document should be documented that that a database and user factory needs to be injected to stay on the safe side.