? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
30 Jun 2020

Summary of Changes

A straight replacement of Factory::getConfig() with Factory::getApplication()->get() and $app->get() etc..

44 instances across 22 files

Implements the change instructed in the @deprecated notes throughout Joomla 4

Testing Instructions

Apply PR - browse around - nothing should be broken.

Actual result BEFORE applying this Pull Request

Enabling System debug plugin with all options enabled to log all things and deprecated
Note that Factory::getConfig in libraries/src/Log/Logger/FormattedtextLogger.php is logged in the deprecated-core tab

Expected result AFTER applying this Pull Request

Everything still works, no deprecated notices in the debug log deprecated-core tabs

Nothing should break as the changes are swapping apples for apples from another store.

Documentation Changes Required

none

Additional notes...

@wilsonge I have gone through each line, selecting an appropriate method of getting the config I believe. I reuse $app or $this->app where Factory::getApplication has already been called.

@infograf768 There is a complexity in the Language Installer, Please can I ask you to look over that change that includes reloading the configuration and injecting it back into the application in https://github.com/joomla/joomla-cms/pull/29854/files#diff-14ba76332f3c8fb4af43ae3d16937a2bR72 I have no idea if this even works so it needs real life testing, and I dont know how to test that with Joomla 4 languages?!

avatar PhilETaylor PhilETaylor - open - 30 Jun 2020
avatar PhilETaylor PhilETaylor - change - 30 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2020
Category Administration com_config com_finder com_menus CLI Front End Installation Libraries Plugins
avatar PhilETaylor PhilETaylor - change - 30 Jun 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 30 Jun 2020
avatar PhilETaylor PhilETaylor - change - 30 Jun 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 30 Jun 2020
avatar PhilETaylor PhilETaylor - change - 30 Jun 2020
Title
Move from Factory::getConfig to getting config from application
[4.0] Move from Factory::getConfig to getting config from application
avatar PhilETaylor PhilETaylor - edited - 30 Jun 2020
avatar PhilETaylor PhilETaylor - change - 30 Jun 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 30 Jun 2020
avatar ceford ceford - test_item - 1 Jul 2020 - Tested successfully
avatar ceford
ceford - comment - 1 Jul 2020

I have tested this item successfully on dc1a542

I did not find log entries - maybe my logging is not set up properly or I did not trigger the calls. However I searched for Factory::getConfig with and without the patch. Without the patch there were plenty. With the patch only one, in com_patchtester. So I think this justifies a pass.


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

avatar infograf768
infograf768 - comment - 1 Jul 2020

@ceford Have you tested a clean install including languages?
#29854 (comment)

avatar PhilETaylor
PhilETaylor - comment - 1 Jul 2020

Thanks for testing, I'll be back on this shortly today.

avatar PhilETaylor PhilETaylor - change - 1 Jul 2020
Labels Added: ?
avatar PhilETaylor
PhilETaylor - comment - 1 Jul 2020

Ok I have wrapped the call with file_exists, this seems to work as the override of the configuration is only needed after creation of the configuration.php file anyway (it seems). Please test :-) and thanks for your time.

avatar ceford
ceford - comment - 1 Jul 2020

I neglected to set Debug to Yes in my previous test. Having done that it still passes. No deprecations with the patch applied, plenty with.


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

avatar Quy
Quy - comment - 1 Jul 2020

Something is going on where it constantly logs me out just navigating around in the administration area. Nothing in PHP error log.

avatar PhilETaylor
PhilETaylor - comment - 1 Jul 2020

Cool I’ll test that when next at my desk - thanks for testing. I can’t say I experienced that myself in my initial testing.

avatar PhilETaylor
PhilETaylor - comment - 1 Jul 2020

Something is going on where it constantly logs me out just navigating around in the administration area. Nothing in PHP error log.

Sorry I have been unable to replicate that in the last hour...

avatar infograf768
infograf768 - comment - 2 Jul 2020

Looks like working here. I am not logged out.

avatar toivo toivo - test_item - 5 Jul 2020 - Tested successfully
avatar toivo
toivo - comment - 5 Jul 2020

I have tested this item successfully on d5f3054

Tested successfully in Beta3-dev of 5 July. Only one deprecated message when a new user was created from the back end.


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

avatar PhilETaylor
PhilETaylor - comment - 8 Jul 2020

@infograf768 if you could mark your test as successful then we are closer to RTC please :) :)

avatar infograf768 infograf768 - test_item - 8 Jul 2020 - Tested successfully
avatar infograf768
infograf768 - comment - 8 Jul 2020

I have tested this item successfully on e642711


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

avatar infograf768 infograf768 - change - 8 Jul 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 8 Jul 2020

rtc


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

avatar bonzani bonzani - test_item - 20 Jul 2020 - Tested successfully
avatar bonzani
bonzani - comment - 20 Jul 2020

I have tested this item successfully on e642711


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

avatar wilsonge wilsonge - change - 25 Jul 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-07-25 18:35:09
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 25 Jul 2020
avatar wilsonge wilsonge - merge - 25 Jul 2020
avatar wilsonge
wilsonge - comment - 25 Jul 2020

Thanks!

Add a Comment

Login with GitHub to post a comment