User tests: Successful: Unsuccessful:
This is an effort to remove deprecated code from the system. The Updater 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 Updater class and replaces it with some sane methods to add adapters when required.
This PR does some cleanup and it adds the following methods:
I reused some method names from the Adapter class. This PR is a b/c break and thus targeted towards 6.0. This is the corresponding PR to #43792 for the Updater classes.
Install an old version of an extension and then run an update for it, both via the normal extension updater and by installing a newer package over the old one. This should work the same both before and after applying the change.
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
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
PR-6.0-dev
|
Labels |
Added:
Feature
|
Yes, this is still a necessary PR.
...Awaiting capability to run updater
I have tested this item ✅ successfully on 0fbb612
Tested before PR with JBT, current 6.0-dev branch, PHP 8.4.7, enabled 'Log Almost Everything' and 'Log Deprecated API'
Installed 60 joomla-cms-43793, PHP 8.4.7, enabled 'Log Almost Everything' and 'Log Deprecated API'
docker exec jbt-60 php cli/joomla.php extension:install --path /var/www/html/tmp/mod_zitat_service_de_2.0.1.zip
docker exec jbt-60 php cli/joomla.php extension:install --path /var/www/html/tmp/mod_zitat_service_de_2.0.3.zip
updat
results in following, please check by your own:$ grep -i updat joomla-60/administrator/logs/deprecated.php
2025-06-12T09:08:46+00:00 WARNING 10.0.0.1 deprecated Use method "getUrl" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetUrl" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:08:46+00:00 WARNING 10.0.0.1 deprecated Use method "getHeaders" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetHeaders" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:09:28+00:00 WARNING 10.0.0.1 deprecated Use method "getUrl" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetUrl" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:09:28+00:00 WARNING 10.0.0.1 deprecated Use method "getHeaders" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetHeaders" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:09:28+00:00 WARNING 10.0.0.1 deprecated Use method "getUrl" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetUrl" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:09:28+00:00 WARNING 10.0.0.1 deprecated Use method "getHeaders" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetHeaders" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:09:28+00:00 WARNING 10.0.0.1 deprecated Use method "getUrl" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetUrl" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:09:28+00:00 WARNING 10.0.0.1 deprecated Use method "getHeaders" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetHeaders" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:19:15+00:00 WARNING 10.0.0.1 deprecated Use method "getUrl" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetUrl" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
2025-06-12T09:19:15+00:00 WARNING 10.0.0.1 deprecated Use method "getHeaders" for value pre-processing is deprecated, and will not work in Joomla 6. Use "onGetHeaders" instead. Event Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent - [ROOT]/libraries/src/Event/AbstractEvent.php - Line 168
Thank you for testing. As far as I can see, none of the warnings you got are related to this PR, right?
Thank you for testing. As far as I can see, none of the warnings you got are related to this PR, right?
It seems so, as the deprecations are from different files, as touched with this PR. I was uncertain how to check. I checked now again with the three file names they are touched by the PR and result is zero ✅ 👍 😄
Unfortunately I had to do one more cleanup by removing a duplicate call to getAdapter()
.
Unfortunately I had to do one more cleanup by removing a duplicate call to
getAdapter()
.
Null problemo, let me know when you're done, then I'll test again – my module is now Joomla 6 ready, this was my main effort; maybe put it on DRAFT by then?
It is ready. You can test this now.
I have tested this item ✅ successfully on b0685d4
Retestet with JBT and grafted 6.0.0-alpha2-dev+pr.43793 from current prebuild packages
I have tested this item ✅ successfully on b0685d4
I have successfully tested this.
Used JoomDonation v5.10.9 to update to JoomDonation v5.11.0, also upgraded 2 different Language Packs to latest version.
(I also tried installing a few J6 compatible apps as a test, like Regular Labs Cache Cleaner 9.60 and others)
(the Joomla Updater did NOT find the updated version of JoomDonation online, but I was able to install v5.11 on top of v5.10.9 via uploading the file)
I did NOT test over CLI or locally. I only tested via online my hosting testing environments.
@ exlemor Thank you for testing 👍
the Joomla Updater did NOT find the updated version of JoomDonation online
If you check the update XML https://joomdonation.com/updates/jdonation.xml, there is no 6.0 target platform, so no update is offered correctly.
Status | Pending | ⇒ | Ready to Commit |
Thanks for testing, RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-06-17 07:27:48 |
Closed_By | ⇒ | Bodge-IT | |
Labels |
Added:
RTC
|
I can't begin to express how happy I am that this is finally done. Thank you to all who tested, reviewed and now merged. I've been trying to fix the adapter classes during the development of 1.6 and tried again in 2.5 and 3.5. For 4.0 unfortunately I didn't get around to fixing this, but now for 6.0 we can finally get rid of this.
@Hackwar, sorry Hannes more conflicts need fixing. If we can sort this and #43792, we can merge #43794.