Feature Language Change PR-5.0-dev Removal Pending

User tests: Successful: Unsuccessful:

avatar HLeithner
HLeithner
27 May 2023

Add a plugin which provides backward compatibility for the deprecation which has been deprecated prior Joomla! 5.0. This plugin will be activated for upgrades automatically and maybe be disabled for new Joomla! 5 installations.
At this point in time it's not clear we introduce an additional XML parameter which defines the needed b/c plugin version (for example 4.0 means that the extension needs the backward compatible polyfills based on Joomla 4.0 version and needs the plugin in Joomla 5).

Cleanup is still needed

  • For example some version strings in the plugin are not correct.

Summary of Changes

Current Status of the plugin:

  • Add the plugin
  • Remove the automatically loaded classmap for J-prefixed classes and moves it to the plugin
  • Fix HTMLHelper using the correct Namespace and by default not longer the JHtml Namespace with fallback
  • Fix JTable using the correct Namespace and by default not longer the JTable Namespace with fallback
  • Update Tests to use correct namespaces

Testing Instructions

Use an joomla 4 extension which needs one or all of the polyfills and try it with activated and disabled plugin.

Actual result BEFORE applying this Pull Request

Works.

Expected result AFTER applying this Pull Request

Works with active plugin, may crash without active plugin if the extension uses b/c code.

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

7706768 12 Mar 2023 avatar HLeithner cs
avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2023
Category Unit Tests Administration Language & Strings SQL Installation Libraries Front End Plugins
avatar HLeithner HLeithner - open - 27 May 2023
avatar HLeithner HLeithner - change - 27 May 2023
Status New Pending
avatar brianteeman
brianteeman - comment - 27 May 2023

Please can you suggest an extension that can be used to test the plugin with

avatar HLeithner
HLeithner - comment - 27 May 2023

at the moment I think not even Joomla it self works without the plugin... I will change it to draft for the moment.

avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2023
Category Unit Tests Administration Language & Strings SQL Installation Libraries Front End Plugins Administration Language & Strings SQL Installation Postgresql Libraries Front End Plugins Unit Tests
avatar HLeithner HLeithner - change - 27 May 2023
Labels Added: ? Language Change PR-5.0-dev
avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2023
Category Unit Tests Administration Language & Strings SQL Installation Libraries Front End Plugins Postgresql SQL Administration com_admin Postgresql Language & Strings Installation Libraries Front End Plugins Unit Tests
avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2023
Category Unit Tests Administration Language & Strings SQL Installation Libraries Front End Plugins Postgresql com_admin SQL Administration com_admin Postgresql com_associations com_banners com_categories com_contact com_content com_fields com_finder com_menus com_modules com_newsfeeds com_plugins com_tags com_workflow Language & Strings Front End Installation Libraries
avatar HLeithner HLeithner - change - 27 May 2023
Labels Removed: ?
avatar brianteeman
brianteeman - comment - 27 May 2023

Speaking from past experience the main problem that we have to avoid with this plugin is not the code but the communication of what it does. If it is not enabled by default then we will get lots of issues reported on forums etc where the first response to any issue will always be to enable the plugin even if it is completely unrelated

avatar HLeithner
HLeithner - comment - 27 May 2023

Speaking from past experience the main problem that we have to avoid with this plugin is not the code but the communication of what it does. If it is not enabled by default then we will get lots of issues reported on forums etc where the first response to any issue will always be to enable the plugin even if it is completely unrelated

True, that's one of the concerns I was thinking about and started to talk to benjamin.

For upgrades, I think having it always active is the safest way for us and the b/c promise

Multiple options came to my mind on new installations (which may also could effect upgrades)

  1. Auto activate on new installs (that would make the plugin less useful because you need to be proactive. But wouldn't be to worse in combination with quick icon and deprecation report.
  2. Not activate it on new installs and add a xml parameter to the extensions which defines the combat version. As explained in the description. Set your extension to be fully compatible with 5.0 would not enable the plugin in j5. Set the extension to 4.0 would automatically activate the b/c plugin on installation/upgrade of the extension. This would also allow us to show extensions which need the plugin.
  3. Automatically activate the plugin on extension installation.
  4. Disable the plugin and add post installation message
  5. Let the extension activate the plugin when it needs it.

Options 3-4 are not so good options in my opinion. 1 or 2 would work. In both cases I would like to add a quick Icon telling the site owner that the plugin is enabled and that x extensions doesn't announce full compatibility with Joomla 5.

I would also like to collect the calls to deprecated functions (based on our existing deprecation log) and show it to the user and of course to the extension developer. Not sure if this works in all situation but could provide some help.

avatar brianteeman
brianteeman - comment - 27 May 2023

Glad to hear this is on your radar

avatar HLeithner HLeithner - change - 26 Jun 2023
Labels Added: Feature Removal
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jul 2023
Category Administration Language & Strings SQL Installation Libraries Front End Postgresql com_admin com_associations com_banners com_categories com_contact com_content com_fields com_finder com_menus com_modules com_newsfeeds com_plugins com_tags com_workflow SQL Administration com_admin Postgresql com_associations com_banners com_categories com_contact com_content com_fields com_finder com_menus com_modules com_newsfeeds com_plugins com_tags com_workflow Language & Strings Front End Installation
avatar brianteeman
brianteeman - comment - 3 Jul 2023

please add the plugin to libraries\src\Extension\ExtensionHelper.php

avatar HLeithner
HLeithner - comment - 3 Jul 2023

please add the plugin to libraries\src\Extension\ExtensionHelper.php

do you mean this entry? https://github.com/joomla/joomla-cms/pull/40664/files#diff-45688fa5398ae3d4bab3daa80bc4d2ea4785370233b82a7326f9676f965ec9ebR286

avatar brianteeman
brianteeman - comment - 3 Jul 2023

my bad - i missed it

avatar HLeithner HLeithner - close - 4 Jul 2023
avatar HLeithner HLeithner - merge - 4 Jul 2023
avatar HLeithner HLeithner - change - 4 Jul 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-07-04 11:36:09
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 4 Jul 2023

I'm merging this for now for a minimal impact version of the plugin as base for other deprecations.

Add a Comment

Login with GitHub to post a comment