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.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Feature
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-05-09 11:25:08 |
Closed_By | ⇒ | rdeutz |
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
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.