User tests: Successful: Unsuccessful:
A straight replacement of Factory::getConfig()
with Factory::getApplication()->getConfig()
44 instances across 22 files
Implements the change instructed in the @deprecated
notes throughout Joomla 4
Apply PR - browse around - nothing should be broken.
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
Everything still works, no deprecated notices in the debug log deprecated-core
tabs
none
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_config com_finder com_menus CLI Front End Installation Libraries Plugins |
Unless you need the full config object yes (there's a handful of places where we're performing multiple operations which i guess should be fine using getConfig
)
ok if you want it that way - closing this and will make a new clean PR in the morning
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-06-29 21:37:32 |
Closed_By | ⇒ | PhilETaylor | |
Labels |
Added:
?
|
I was just going by the Deprecated help text
'%s() is deprecated. The configuration object should be read from the application.',
I was accessing the configuration object
from the application
;-)
I guess that's open to interpretation :)
I have tested this item
Tested successfully in Beta2-dev of 29 June.
Wampserver 3.2.2 Apache 2.4.43 MySQL 8.0.20 PHP 7.4.7
So basically they are all wrong and you want to be running
->get
directly ongetApplication
and not first getting thegetConfig
?