Feature No Code Attached Yet
avatar robbiejackson
robbiejackson
10 Aug 2023

For components, modules and plugins, if the extension developer is using namespaces, but hasn't supplied a services/provider.php file, then get Joomla to use a default services/provider.php file.

This could use default Extension and Dispatcher classes (MVCComponent for components), and include standard Factory classes (eg helper for modules). As it is, a lot of services/provider.php files differ only in the extension name and namespace (and type for plugins).

The big advantage of this in my opinion is that it would make it much easier for novice Joomla extension developers. As it stands, this file is the first thing they're faced with, and in my experience is very offputting because of its complexity. I suspect it might also be a barrier to developers upgrading their extensions from Joomla 3.

From an implementation viewpoint, for basic extensions all the information to generate a default services/provider.php file is known, so I think it could be done 'on the fly' when loading that extension, or the file could be generated as part of the installation of the extension, maybe based on some indicator in the manifest XML file.

avatar robbiejackson robbiejackson - open - 10 Aug 2023
avatar robbiejackson robbiejackson - change - 10 Aug 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 10 Aug 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Aug 2023
avatar richard67 richard67 - change - 10 Aug 2023
Labels Added: Feature
avatar richard67 richard67 - labeled - 10 Aug 2023
avatar rdeutz
rdeutz - comment - 27 Apr 2024

I don’t like the idea, I think it is good to have an entry point for an extension, it makes debugging easier. But I have added it to the agenda for the next CMS Maintainers meeting.

avatar rdeutz rdeutz - change - 9 May 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-05-09 11:25:08
Closed_By rdeutz
avatar rdeutz rdeutz - close - 9 May 2024
avatar rdeutz
rdeutz - comment - 9 May 2024

We discussed this yesterday in the weekly maintainers meeting. We think it is a good idea at the first look but it will cause more problems as it solves. Having a server provider file also makes it clearer what the extension will do.

Thank you for the suggestion

Add a Comment

Login with GitHub to post a comment