? Maintainers Checked PR-4.3-dev ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
19 Jun 2022

Pull Request for Issue # .

Summary of Changes

With #37498 being merged into 4.2, we can now replace deprecated method Factory::getUser() in components model classes with new method $this->getCurrentUser()

Testing Instructions

  1. Use Joomla 4.2 nightly build
  2. Apply patch
  3. Access to random pages (frontend, backend), make sure nothing is broken.

Actual result BEFORE applying this Pull Request

Works, but uses deprecated methods.

Expected result AFTER applying this Pull Request

Works, without using deprecated methods.

avatar joomdonation joomdonation - open - 19 Jun 2022
avatar joomdonation joomdonation - change - 19 Jun 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jun 2022
Category Administration com_associations com_banners com_categories com_config com_contact com_content com_contenthistory com_fields com_finder com_installer com_joomlaupdate com_languages com_menus com_messages
avatar laoneo
laoneo - comment - 20 Jun 2022

I'm wondering if we should fallback here to Factory::getUser instead of an empty user?

avatar joomdonation
joomdonation - comment - 20 Jun 2022

Factory::getUser would be more safe, I think (I believe in site, administrator and api applications, the fallback is not needed). I just don't know how it is used in installation and console apps.

avatar laoneo
laoneo - comment - 20 Jun 2022

Do you want to do it here or a separate one?

avatar joomdonation
joomdonation - comment - 20 Jun 2022

Better in the separate PR, please

avatar laoneo
laoneo - comment - 20 Jun 2022

Here we go #38106.

avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar HLeithner HLeithner - change - 27 Jun 2022
Labels Added: ? Maintainers Checked ?
avatar laoneo
laoneo - comment - 1 Jul 2022

Would be good to postpone this for 4.3. What do you think @joomdonation?

avatar joomdonation
joomdonation - comment - 1 Jul 2022

@laoneo Yes, no rush. Let's give maintainers more time to review to see if there is any flow with this change.

avatar laoneo laoneo - change - 3 Jul 2022
Title
[4.2] Replace Factory::getUser() by $this->getCurrentUser() in components models
[4.3] Replace Factory::getUser() by $this->getCurrentUser() in components models
avatar laoneo laoneo - edited - 3 Jul 2022
avatar jwaisner
jwaisner - comment - 28 Jul 2022

I have tested this item successfully on c19a04a

Tested good on frontend and backend pages in Joomla 4.3 dev

Drone is erroring out but looks like a timeout issue so I do not believe this related.


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

avatar jwaisner jwaisner - test_item - 28 Jul 2022 - Tested successfully
avatar RickR2H
RickR2H - comment - 29 Jul 2022

I have tested this item successfully on c19a04a


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

avatar RickR2H RickR2H - change - 29 Jul 2022
Status Pending Ready to Commit
avatar RickR2H
RickR2H - comment - 29 Jul 2022

RTC


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

avatar RickR2H RickR2H - test_item - 29 Jul 2022 - Tested successfully
avatar laoneo laoneo - change - 30 Jul 2022
Labels Added: ? PR-4.3-dev
Removed: ?
avatar laoneo laoneo - change - 12 Aug 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-08-12 12:52:26
Closed_By laoneo
avatar laoneo laoneo - close - 12 Aug 2022
avatar laoneo laoneo - merge - 12 Aug 2022
avatar laoneo
laoneo - comment - 12 Aug 2022

Thanks!

Add a Comment

Login with GitHub to post a comment