PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
9 Jun 2023

Summary of Changes

Injects the user factory into the MVC classes whenever requested. Additionally it injects the user factory into plugins when they need it.

This pr reduces the usage of deprecated calls User::getInstance and Factory::getUser.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 9 Jun 2023
Category Administration com_messages com_users Front End com_contact Plugins
avatar laoneo laoneo - open - 9 Jun 2023
avatar laoneo laoneo - change - 9 Jun 2023
Status New Pending
avatar laoneo laoneo - change - 9 Jun 2023
Title
5/userfactory/inject
Use the injected user factory in MVC and plugins
avatar laoneo laoneo - edited - 9 Jun 2023
6ddb96a 9 Jun 2023 avatar laoneo cs
avatar laoneo laoneo - change - 9 Jun 2023
Labels Added: PR-5.0-dev
avatar Ruud68
Ruud68 - comment - 14 Jun 2023

Hi, not directly related to this change but I was wondering if there is some kind of (official) documentation not only on the why of these changes, but also on the how?
Currently getting several deprecated warnings in my code editor when using an (old) factory method, stating that starting from version x the DI method should be used (not stating how (and where) one would do that).

Especially when trying to 'reverse' engineer things I run into core doing it with Factory classes itself (as the move to the 'new and improved' way is still in work in progress)

Maybe I'm searching in the wrong (deprecated :)) places, so any tips / pointers are appreciated.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40744.
avatar HLeithner
HLeithner - comment - 26 Jun 2023

@bembelimen updated most of the deprecation with proper replacement instructions, which parts do you need and missed to document? and if you found a solution please add it to manual.joomla.org

avatar HLeithner HLeithner - change - 26 Jun 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-06-26 07:11:02
Closed_By HLeithner
avatar HLeithner HLeithner - close - 26 Jun 2023
avatar HLeithner HLeithner - merge - 26 Jun 2023
avatar HLeithner
HLeithner - comment - 26 Jun 2023

thanks

avatar Ruud68
Ruud68 - comment - 26 Jun 2023

For what it is worth, and for reference for other developers looking for a 'kick-ass' resource on how the new stuff works in Joomla, once again... Nicholas to the rescue :)

https://fosstodon.org/@nikosdion/110543554867355629

Add a Comment

Login with GitHub to post a comment