Replies: 1 comment
-
Any thoughts? Is there no way to load in another composers classmap from an extensions vendor dependencies into Joomlas autoloader? Am I missing something with the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Joomla is replacing composer autoloader, but does not provide functionality to add a class map. So if my extension is using composer and I want to be able to reach my dependencies in my vendor folder then Joomla won't be able to unless I register my composer autoloader resulting in two autoloaders for no real reason.
Ideally we should just be able to define a path to a classmap in the XML same as we do with namespace. So currently we have the below.
<namespace path="src">Joomla\Component\Content</namespace>
This could be adjusted to support another top level node like the following.
<classmap>src/vendor/classmap.php</classmap>
Maybe a better structure can be proposed or just an attribute of namespace even like the following.
<namespace path="src" classmap="src/vendor/classmap.php">Joomla\Component\Content</namespace>
I'm also unsure if the above works in library extensions, but I would hope it would as needing a system plugin to load libraries shouldn't be necessary.
Beta Was this translation helpful? Give feedback.
All reactions