Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the injected user factory in MVC and plugins #40744

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Jun 9, 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

@laoneo laoneo changed the title 5/userfactory/inject Use the injected user factory in MVC and plugins Jun 9, 2023
@Ruud68
Copy link
Contributor

Ruud68 commented Jun 14, 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.

@HLeithner
Copy link
Member

@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

@HLeithner HLeithner merged commit 4a60a88 into joomla:5.0-dev Jun 26, 2023
3 checks passed
@HLeithner
Copy link
Member

thanks

@HLeithner HLeithner deleted the 5/userfactory/inject branch June 26, 2023 07:11
@Ruud68
Copy link
Contributor

Ruud68 commented Jun 26, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants