User tests: Successful: Unsuccessful:
Pull Request for Issue # .
In Joomla 4, the right way to create a model object is use MVCFactory
after bootComponent
. For example https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_categories/src/Helper/CategoriesHelper.php#L99
However, there are still some places in our code use old method (create model class directly using new ModelClassName
syntax). This PR improves code to make it consistent in our whole codebase.
The modified code is random in our CMS, so I think the best way is someone with code review skill to review the code and make sure it is all correct. Or maybe @wilsonge will need to review and merge base on code review.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_admin Modules Front End com_contact Plugins |
Labels |
Added:
?
|
I’m happy with most places on review.
Only thing I wouldn’t mind tested is the script.php part doing a J3 to j4 upgrade - just because I don’t know exactly where that runs in the upgrade cycle and whether we’ll be exclusively using the j4 files everywhere (I think it will be fine - but better safe than sorry)
@wilsonge I installed Joomla 3.10.0 nightly, tested the update process and it is working well, so I think it is fine.
For technical information, the code which is changed here will be executed when finaliseUpgrade
method of UpdateModel
is called. It is called when:
finalise
method of UpdateController
. This is run in Joomla context, so it is fine (I tested in above test) (somewhere during update process, there is a redirection to index.php?option=com_joomlaupdate&task=update.finalise)If it is needed, I will remove the code which I changed in com_admin/script.php to be safe. Let me know if you want me to do that.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-30 01:31:25 |
Closed_By | ⇒ | wilsonge |
I’m happy with that explanation. Thanks!
@joomdonation There are PHP code style errors: https://ci.joomla.org/joomla/joomla-cms/44216/1/6