Skip to content

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Jul 14, 2024

Summary of Changes

This PR removes the deprecated classes Adapter and AdapterInstance. It depends on #43792 and #43793. Those PRs remove the dependency on these classes. Thus this PR can only be merged when those 2 have been merged.

Testing Instructions

Codereview.

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: CMS Adapter removed Manual#301

  • No documentation changes for manual.joomla.org needed

@Hackwar Hackwar added the b/c break This item changes the behavior in an incompatible why. HEADS UP label Jul 14, 2024
@laoneo
Copy link
Member

laoneo commented Feb 10, 2025

Can they be moved to the compat plugin instead and then remove in 7?

@Hackwar
Copy link
Member Author

Hackwar commented Feb 14, 2025

These classes have been broken sind Joomla 1.5 and have been deprecated since Joomla 4.3. It is impossible to use them without mostly re-implementing them entirely in your own class. There is NO code out there, which can use these classes. There is no gain whatsoever in keeping them.

@exlemor
Copy link

exlemor commented Jun 17, 2025

I have tested this item ✅ successfully on 933e78d

I have successfully confirmed that those 2 files are deleted and the change to the file plugins/behaviour/compat6/src/classmap/classmap.php have been made in the Download package.


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

@muhme
Copy link
Contributor

muhme commented Jun 27, 2025

I have tested this item ✅ successfully on 933e78d

Tested with JBT and current 6.0-dev

  • Enable 'Behaviour - Backward Compatibility 6' plugin and set 'Classes Aliases' Yes
  • Create override: administrator backend -> System -> Site Templates -> Cassiopeia Details and Files -> Create Overrides -> com_content -> article
    • See 'Override created in /templates/cassiopeia/html/com_content/article'
  • Edit templates/cassiopeia/html/com_content/article/default.php file in inserting following lines after last use line 23:
    echo "Overwrite is used";
    new JAdapter(null, __DIR__, 'Test');
    class MyTestAdapter extends JAdapterInstance
    {
    }
    
  • Create an article and show the single article, it must containt Overwrite is used and should work
  • Installed this PR
    • ✅ Checked libraries/src/Adapter/AdapterInstance.php and libraries/src/Adapter/Adapter.php are deleted
    • ✅ Checked AdapterInstance and Adapter are removed from plugins/behaviour/compat6/src/classmap/classmap.php
    • ✅ Article view fails with Class "JAdapter" not found even if 'Behaviour - Backward Compatibility 6' plugin is enabled and 'Classes Aliases' set Yes
      This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43794.

@Hackwar Hackwar added the RTC This Pull Request is Ready To Commit label Jul 29, 2025
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 30, 2025
@Bodge-IT Bodge-IT merged commit 7faf4e2 into joomla:6.0-dev Jul 30, 2025
40 checks passed
@Bodge-IT
Copy link
Contributor

Thanks for the work on this @Hackwar, nice to get that group of PRs done. Thanks to testers @muhme & @exlemor for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b/c break This item changes the behavior in an incompatible why. HEADS UP Feature PR-6.0-dev
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants