User tests: Successful: Unsuccessful:
Pull Request resolves # .
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:
createMVCFactory()getNamespace()injectServicesIntoFactory()injectServicesIntoFactory() and pass the container throughAlso, 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
Works
Works, easier for third party extensions implement their own custom MVC classes.
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
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
@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.
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.
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.
can this really be done in a minor release?