Unit/System Tests PR-7.0-dev Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
7 Jun 2026
  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Deprecated classes, assets and classnames can be moved to the compatibility plugin, but not single deprecated functions. In core we have a lot of deprecated functions which are widely used in the past in template overrides or other custom PHP code. Removing them would be a hard backwards compatibility break. This pr introduces a switch for deprecated functions, enabled in the compatibility plugin. This is a fallback for sites with old code or unmaintained extensions to give them an extra two years to update that code.

Testing Instructions

Add the following code to the file /components/com_content/src/Dispatcher/Dispatcher.php after line 36:
\Joomla\CMS\Factory::getConfig();

Load the site home page with the compatibility 7 plugin enabled and disabled.

Actual result BEFORE applying this Pull Request

It works with the plugin enabled and disabled.

Expected result AFTER applying this Pull Request

It shows an error when the plugin is disabled and loads fine when enabled.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org: joomla/Manual#671

  • No documentation changes for manual.joomla.org needed

d784f88 7 Jun 2026 avatar laoneo user
avatar laoneo laoneo - open - 7 Jun 2026
avatar laoneo laoneo - change - 7 Jun 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2026
Category Libraries Front End Plugins
362f803 7 Jun 2026 avatar laoneo cs
avatar laoneo laoneo - change - 7 Jun 2026
Labels Added: PR-7.0-dev
a1bc31e 7 Jun 2026 avatar laoneo text
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2026
Category Libraries Front End Plugins Libraries Front End Plugins Unit Tests
ab2f276 7 Jun 2026 avatar laoneo text
avatar laoneo laoneo - change - 7 Jun 2026
Labels Added: Unit/System Tests
avatar joomdonation
joomdonation - comment - 8 Jun 2026

From PHP manual:

Passing [E_USER_ERROR](https://www.php.net/manual/en/errorfunc.constants.php#constant.e-user-error) as the error_level is now deprecated. Throw an [Exception](https://www.php.net/manual/en/class.exception.php) or call [exit()](https://www.php.net/manual/en/function.exit.php) instead.

Maybe throw BadMethodCallException could be a better choice here.

avatar joomdonation
joomdonation - comment - 8 Jun 2026

From PHP manual:

Passing E_USER_ERROR as the error_level is now deprecated. Throw an Exception or call exit() instead.

Maybe throw BadMethodCallException could be a better choice here.

avatar laoneo
laoneo - comment - 8 Jun 2026

I had exceptions first, but then you copy basically the same text as in trigger_error. Till we have a decision if this is an acceptable way to transition from widely used deprecated code I leave it as it is. But I was not aware that the constant was deprecated, definitely worth then to switch to exception.

avatar laoneo laoneo - change - 8 Jun 2026
The description was changed
avatar laoneo laoneo - edited - 8 Jun 2026
c7e12eb 9 Jun 2026 avatar laoneo move
avatar github-actions[bot]
github-actions[bot] - comment - 9 Jun 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

avatar richard67
richard67 - comment - 10 Jun 2026

For now, I moved the switch to the compat6 plugin as the 7 one is not working.

@laoneo As this has been fixed meanwhile, please remove that sentence from the PR description.

avatar laoneo laoneo - change - 10 Jun 2026
The description was changed
avatar laoneo laoneo - edited - 10 Jun 2026
avatar laoneo laoneo - change - 17 Jun 2026
The description was changed
avatar laoneo laoneo - edited - 17 Jun 2026
avatar laoneo laoneo - change - 17 Jun 2026
The description was changed
avatar laoneo laoneo - edited - 17 Jun 2026
avatar HLeithner HLeithner - change - 17 Jun 2026
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-06-17 12:15:50
Closed_By HLeithner
avatar HLeithner HLeithner - close - 17 Jun 2026
avatar HLeithner HLeithner - merge - 17 Jun 2026
avatar HLeithner
HLeithner - comment - 17 Jun 2026

thanks

Add a Comment

Login with GitHub to post a comment