Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
30 Apr 2026

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

Currently, it is not easy for third party developers to implement a custom MVCFactory for their extensions. They would have to copy almost all the code of the core class, then add their own additional code on top. See this long discussion if you are interested in understanding the full scope of the issue.

This PR refactors the current code to make using a custom MVCFactory in third party extensions much easier. Instead of copying core code and modifying it, third party developers can now simply extend the core class and add their own logic:

  • Want to use a custom MVCFactory implementation? Override createMVCFactory()
  • Want to access the component namespace? Use getNamespace()
  • Want to inject additional services into MVCFactory so they are available in controllers, models and views? Override injectServicesIntoFactory()
  • Want to inject the container into MVCFactory so heavy services are only resolved when actually needed? Override injectServicesIntoFactory() and pass the container through

Also, the change here is backward compatible. For an example, I made an example of using custom MVCFactory to make controller, models, and views classes overridable (mean you can add a new controller class, extends the original class and only override the method you need) at https://github.com/joomla/joomla-cms/compare/6.2-dev...joomdonation:joomla-cms:sample_overridable_mvc_with_com_contact?expand=1

Testing Instructions

  • Use Joomla 6.2
  • Apply patch and access to random pages on your site (frontend and backend), make sure nothing is broken.

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

Works, easier for third party extensions implement their own custom MVC classes.

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

26970b6 30 Apr 2026 avatar joomdonation CS
avatar joomdonation joomdonation - open - 30 Apr 2026
avatar joomdonation joomdonation - change - 30 Apr 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2026
Category Libraries
avatar joomdonation joomdonation - change - 30 Apr 2026
The description was changed
avatar joomdonation joomdonation - edited - 30 Apr 2026
avatar brianteeman
brianteeman - comment - 30 Apr 2026

can this really be done in a minor release?

avatar joomdonation
joomdonation - comment - 30 Apr 2026

@brianteeman Should be fine because it does not introduce any break incompatible changes. Just make it easier for third party developers to implement and use custom MVCFactory for their extensions if needed.

avatar exlemor exlemor - test_item - 2 May 2026 - Tested successfully
avatar exlemor
exlemor - comment - 2 May 2026

I have tested this item ✅ successfully on 26970b6

I have tested this successfully. Thanks @joomdonation. To try to make sure this was 'safe', I opened every link/page on the backend there are a lot more than I thought lol and did actions on each page like turn on article, turn off, feature, unfeature, send PM, cleared access logs, reindex smart-search (not knowing what I needed to test, I tried testing everything ;) ) and hundreds of others and tested dozens+ of front-end links as well... had Global Configuration set to Maximum Error Reporting and checked console for every screen - 0 errors - hopefully I didn't miss anything.


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

avatar exlemor
exlemor - comment - 2 May 2026

I have tested this item ✅ successfully on 26970b6

I have tested this successfully. Thanks @joomdonation. To try to make sure this was 'safe', I opened every link/page on the backend there are a lot more than I thought lol and did actions on each page like turn on article, turn off, feature, unfeature, send PM, cleared access logs, reindex smart-search (not knowing what I needed to test, I tried testing everything ;) ) and hundreds of others and tested dozens+ of front-end links as well... had Global Configuration set to Maximum Error Reporting and checked console for every screen - 0 errors - hopefully I didn't miss anything.


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

avatar joomdonation
joomdonation - comment - 2 May 2026

Thanks @exlemor. That's more than enough.

Add a Comment

Login with GitHub to post a comment