Skip to content

[6.2] Use cache controller factory to create cache controller in Stats plugin#47960

Merged
laoneo merged 4 commits into
joomla:6.2-devfrom
joomdonation:replace_deprecated_cache_code_in_stats_plugin
Jun 18, 2026
Merged

[6.2] Use cache controller factory to create cache controller in Stats plugin#47960
laoneo merged 4 commits into
joomla:6.2-devfrom
joomdonation:replace_deprecated_cache_code_in_stats_plugin

Conversation

@joomdonation

Copy link
Copy Markdown
Contributor

Pull Request resolves # .

  • 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

Our System - Joomla! Statistics still uses deprecated method Cache::getInstance method to create cache controller. This PR updates plugin, inject cache controller factory and use that injected factory to create cache controller instead.

Testing Instructions

  • Use Joomla 6.2
  • Go to System -> Global Configuration, System tab, set System Cache to one of the two ON options
  • Go to System -> Plugins, find System - Joomla! Statistics plugin. Click on it to edit and set Interval (hours) to 0, set Mode to Ask Again, Status to Enabled . Save it.
  • When the page reloaded, there will be a popup as you whether you want to Enable Joomla Statistics?, click on No button
  • Refresh the page, make sure the plugin is now disabled.

If you understand our cache API, code review should be faster. The idea is the plugin should still work the same as before

Actual result BEFORE applying this Pull Request

Works, but use deprecated code to create cache controller

Expected result AFTER applying this Pull Request

Works, without using deprecated code. The cache controller factory is properly injected into plugin.

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:

  • No documentation changes for manual.joomla.org needed

@laoneo laoneo added the Architecture Pull requests which improve the architecture. label Jun 18, 2026
@laoneo laoneo merged commit 79244ca into joomla:6.2-dev Jun 18, 2026
57 checks passed
@laoneo laoneo added this to the Joomla! 6.2.0 milestone Jun 18, 2026
@laoneo

laoneo commented Jun 18, 2026

Copy link
Copy Markdown
Member

Thanks!

@joomdonation joomdonation deleted the replace_deprecated_cache_code_in_stats_plugin branch June 19, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Pull requests which improve the architecture. PR-6.2-dev

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants