Feature RTC Documentation Required b/c break PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
14 Jul 2024

Summary of Changes

This is an effort to remove deprecated code from the system. The Installer class depends on the Adapter class, which in turn has been deprecated for a long time already. This PR removes the code of the Adapter class from the Installer class and replaces it with some sane methods to add adapters when required.

This PR does some cleanup and it adds the following methods:

  • loadAdapters(): This iterates over the set folder and adds all files it finds as available installer adapters. To keep it light, the array only contains the name as key and either the class name as value or an object. The object is instantiated just in time when needed.
  • getAdapters(): This method keeps the behavior of the $custom parameter, but otherwise still just returns the list of available adapters
  • getAdapter(): This new method replaces loadAdapter() and either returns an object which was previously made or instantiates it from the class stored in the $adapters array.
  • loadAdapter(): This one gets deprecated in favour of getAdapter(). Just to keep the naming consistent.
  • setAdapter(): This new method allows to hand in a name for the adapter and either a class name or an instantiated object for the respective adapter type. This would allow you to add custom adapter types and also to overwrite existing adapter types.

I reused some method names from the Adapter class. This PR is a b/c break and thus targeted towards 6.0.

Testing Instructions

  • Install an extension via the backend extension installer.
  • Install an extension via the CLI. (php cli/joomla.php extension:install)

There should be no difference between before and after applying the change and the extension should be installed like normal.

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: joomla/Manual#301

  • No documentation changes for manual.joomla.org needed

avatar Hackwar Hackwar - open - 14 Jul 2024
avatar Hackwar Hackwar - change - 14 Jul 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jul 2024
Category Administration com_joomlaupdate Libraries
avatar Hackwar Hackwar - change - 14 Jul 2024
Labels Added: b/c break PR-6.0-dev
avatar Hackwar Hackwar - change - 21 Aug 2024
Labels Added: Documentation Required
avatar Hackwar Hackwar - change - 24 Aug 2024
The description was changed
avatar Hackwar Hackwar - edited - 24 Aug 2024
avatar laoneo laoneo - change - 12 Feb 2025
Labels Added: Feature
avatar Hackwar Hackwar - change - 19 Apr 2025
The description was changed
avatar Hackwar Hackwar - edited - 19 Apr 2025
avatar muhme muhme - test_item - 30 May 2025 - Tested unsuccessfully
avatar muhme
muhme - comment - 30 May 2025

I have tested this item 🔴 unsuccessfully on ce7745c

Tested on 6.0-dev branch with local installation on macOS, PHP 8.4.5 with module zitat-service.de
Before applying the PR

  • Installed extension from web, configured and checked its working, uninstalled the extension, checked is gone
  • Installed extension with php cli/joomla.php extension:install --url and uninstalled
  • Installed extension with php cli/joomla.php extension:install --path and uninstalled

Applied the patch by gh pr checkout 43792 && brew services restart httpd

  • Set Logging 'Log Almost Everything' and 'Log Deprecated API'
  • ✅ Installed extension from web, configured and checked its working, uninstalled the extension, checked is gone
  • ✅ Installed extension with upload package file, configured and checked its working, uninstalled the extension, checked is gone
  • ✅ Installed extension from folder, configured and checked its working, uninstalled the extension, checked is gone
  • ❌ Installed extension from URL, configured and checked its working, uninstalled the extension, checked is gone
    • Error message
      php cli/joomla.php extension:install --path ~/Downloads/mod_zitat_service_de_2.0.3.zip
      In ExtensionInstallCommand.php line 73:
      
      Too few arguments to function Joomla\CMS\Console\ExtensionInstallCommand::__construct(), 0 passed in /Users/hlu/Desktop/no_backup/joomla-cms/60/libraries/src/Service/Provider/Console.php on line 160 and exactly 1 expected
      ```
      
  • php cli/joomla.php extension:install --url https://github.com/muhme/quote_joomla/releases/download/2.0.3/mod_zitat_service_de_2.0.3.zip
avatar Hackwar
Hackwar - comment - 31 May 2025

I fixed the issue. Could you please test again?

avatar muhme muhme - test_item - 1 Jun 2025 - Tested successfully
avatar muhme
muhme - comment - 1 Jun 2025

I have tested this item ✅ successfully on c4bba80


Re-Tested with fresh 6.0-dev branch plus gh pr checkout 43792 in local installation on macOS, PHP 8.4.5 with module zitat-service.de

  • Set Logging 'Log Almost Everything' and 'Log Deprecated API', both 'Behaviour - Backward Compatibility' plugins are disabled
  • ✅ Installed extension from web, configured the Site-module and checked its working, uninstalled the extension, checked is gone
  • ✅ Installed extension with upload package file, configured the Site-module and checked its working, uninstalled the extension, checked is gone
  • ✅ Installed extension from folder, configured the Site-module and checked its working, uninstalled the extension, checked is gone
  • ✅ Installed extension from URL, configured the Site-module and checked its working, uninstalled the extension, checked is gone
  • ✅ Installed extension with php cli/joomla.php extension:install --path ~/Downloads/mod_zitat_service_de_2.0.3.zip
    • [OK] Extension installed successfully.
    • Configured the Site-module and checked its working, uninstalled the extension, checked is gone
  • ✅ Installed extension with php cli/joomla.php extension:install --url https://github.com/muhme/quote_joomla/releases/download/2.0.3/mod_zitat_service_de_2.0.3.zip
    • [OK] Extension installed successfully.
    • Configured the Site-module and checked its working
  • ✅ Checked failed System Test phpmin-system-mysql, only one already known error 'PHP Warning: Undefined array key "status"', fix comes with 45547
    This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43792.
avatar Bodge-IT Bodge-IT - test_item - 6 Jun 2025 - Tested successfully
avatar Bodge-IT
Bodge-IT - comment - 6 Jun 2025

I have tested this item ✅ successfully on 870546b

Tested and works both ways.


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

avatar richard67 richard67 - alter_testresult - 10 Jun 2025 - muhme: Tested successfully
avatar richard67
richard67 - comment - 10 Jun 2025

I've restored @muhme 's test result in the issue tracker because the commit which has invalidated the human tests count was just a clean branch update.

@Bodge-IT Please, when doing branch updates which are clean, i.e. not had conflicts to be resolved, then restore any previous human tests in the issue tracker by using the "Alter test" button.

avatar richard67 richard67 - change - 10 Jun 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 10 Jun 2025

RTC


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

avatar Bodge-IT Bodge-IT - change - 11 Jun 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-06-11 07:19:48
Closed_By Bodge-IT
Labels Added: RTC
avatar Bodge-IT Bodge-IT - close - 11 Jun 2025
avatar Bodge-IT Bodge-IT - merge - 11 Jun 2025
avatar Bodge-IT
Bodge-IT - comment - 11 Jun 2025

Thanks for the persistence on this @Hackwar and to Heiko for testing so thoroughly

avatar Hackwar
Hackwar - comment - 11 Jun 2025

Thank you!!!

Add a Comment

Login with GitHub to post a comment