? ? Pending

User tests: Successful: Unsuccessful:

avatar sergeytolkachyov
sergeytolkachyov
22 Nov 2022

Update code base from old to new sintax

Summary of Changes

Factory::getDbo changed to Factory::getContainer()->get(DatabaseInterface::class)

Testing Instructions

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

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

avatar sergeytolkachyov sergeytolkachyov - open - 22 Nov 2022
avatar sergeytolkachyov sergeytolkachyov - change - 22 Nov 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Nov 2022
Category Libraries
avatar sergeytolkachyov sergeytolkachyov - change - 22 Nov 2022
The description was changed
avatar sergeytolkachyov sergeytolkachyov - edited - 22 Nov 2022
avatar sergeytolkachyov sergeytolkachyov - change - 22 Nov 2022
The description was changed
avatar sergeytolkachyov sergeytolkachyov - edited - 22 Nov 2022
avatar sergeytolkachyov sergeytolkachyov - change - 24 Nov 2022
Labels Added: ?
avatar joomdonation
joomdonation - comment - 5 Dec 2022

@sergeytolkachyov Could not say that I understand these container stuffs, however, base on what I see from core code and by reading comments from maintainers on other similar PRs in the past, you should use Factory::getContainer()->get(DatabaseInterface::class) instead of using Factory::getContainer()->get('DatabaseDriver') as how you are doing here. See https://github.com/joomla/joomla-cms/blob/4.2-dev/modules/mod_finder/src/Helper/FinderHelper.php#L82 for an example

avatar sergeytolkachyov sergeytolkachyov - change - 17 Feb 2023
The description was changed
avatar sergeytolkachyov sergeytolkachyov - edited - 17 Feb 2023
avatar sergeytolkachyov
sergeytolkachyov - comment - 17 Feb 2023

@sergeytolkachyov Could not say that I understand these container stuffs, however, base on what I see from core code and by reading comments from maintainers on other similar PRs in the past, you should use Factory::getContainer()->get(DatabaseInterface::class) instead of using Factory::getContainer()->get('DatabaseDriver') as how you are doing here. See https://github.com/joomla/joomla-cms/blob/4.2-dev/modules/mod_finder/src/Helper/FinderHelper.php#L82 for an example

Thank you, I changed it

avatar joomdonation joomdonation - test_item - 17 Feb 2023 - Tested successfully
avatar joomdonation
joomdonation - comment - 17 Feb 2023

I have tested this item successfully on d9dbca3

Both code review and run some code to test the methods which are affected by this change.


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

avatar joomdonation
joomdonation - comment - 17 Feb 2023

If someone wants to do real test, add this line of code below to index.php file of your template, then access to backend and see data for the phpass lib displayed:

$lib = \Joomla\CMS\Helper\LibraryHelper::getLibrary('phpass');
var_dump($lib);

I also tested saveParams method, too. So maybe you just need to do a code review should be enough.

avatar alikon alikon - test_item - 18 Feb 2023 - Tested successfully
avatar alikon
alikon - comment - 18 Feb 2023

I have tested this item successfully on d9dbca3


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

avatar richard67 richard67 - change - 18 Feb 2023
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 18 Feb 2023

RTC this time with the issue tracker.


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

avatar sergeytolkachyov sergeytolkachyov - change - 20 Feb 2023
Labels Added: ?
avatar laoneo laoneo - close - 23 Feb 2023
avatar laoneo laoneo - merge - 23 Feb 2023
avatar laoneo laoneo - change - 23 Feb 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-02-23 13:53:53
Closed_By laoneo
avatar laoneo
laoneo - comment - 23 Feb 2023

Thanks!

Add a Comment

Login with GitHub to post a comment