Skip to content

Conversation

@HLeithner
Copy link
Member

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

@brianteeman
Copy link
Contributor

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

@HLeithner
Copy link
Member Author

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

@HLeithner HLeithner marked this pull request as draft May 27, 2023 11:54
…plugin-mod-1

[CMS PR 40664] SQL and ExtensionsHelper fixes
Copy link
Member

@laoneo laoneo May 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not leave the old file and do a n include of the new location for BC reasons? This looks for me like a rather hard break.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the whole point of the plugin, that you are able to disable deprecation. just require it from the new location would make no difference to now and make the plugin useless.

@brianteeman
Copy link
Contributor

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

@HLeithner
Copy link
Member Author

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.

@HLeithner HLeithner added Feature Removal Removes functionality labels Jun 3, 2023
HLeithner and others added 6 commits June 26, 2023 12:55
@brianteeman
Copy link
Contributor

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

@HLeithner
Copy link
Member Author

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

@brianteeman
Copy link
Contributor

my bad - i missed it

@HLeithner HLeithner marked this pull request as ready for review July 4, 2023 11:36
@HLeithner HLeithner merged commit eda2c2c into joomla:5.0-dev Jul 4, 2023
@HLeithner
Copy link
Member Author

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

@HLeithner HLeithner deleted the 5/feature/bc-plugin branch July 4, 2023 11:36
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jul 23, 2023
HLeithner pushed a commit that referenced this pull request Jul 24, 2023
* Add deleted files and folders from PRs #40664 , #41070 and #41101

* Remove false alarm due to missing upmerge of PR #41101
heelc29 added a commit to heelc29/joomla that referenced this pull request Jul 25, 2023
GeraintEdwards pushed a commit to GeraintEdwards/joomla-cms that referenced this pull request Aug 14, 2023
…a#41211)

* Add deleted files and folders from PRs joomla#40664 , joomla#41070 and joomla#41101

* Remove false alarm due to missing upmerge of PR joomla#41101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Language Change This is for Translators Removal Removes functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants