-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer #322
Composer #322
Conversation
Needs some small changes to use in 3.x. For 4.0 we will need to completely refactor the component as I have many errors. |
Added the autoloader to JFormFieldReleases. |
There is something I dislike about this way. Due to how composer works, it will load all dependencies of Joomla/Github as well. But those are already present in the Joomla CMS vendor folder. So we're duplicating those classes here;:
From reading, it should be possible to declare those in a "provide" block in the composer.json file, however I couldn't make it work so composer wouldn't pull those classes in. |
Indeed, we could add an alert. Looking into it now.
That is over my skills but I see that the new vendor folder is a huge 1,8 Mb on disk... for 211 items... |
I guess missing in patch the vendor folder in localise.xml. |
True, I have to add that folder into the XML. |
Added the vendor folder to the XML. |
@infograf768 Figured it out with some help. Now it only contains the stuff which isn't already in Joomla. |
Test looks OK here on 3.8.4 |
Note
may I suggest to post somewhere a tutorial as this would be extremely useful for 3rd party devs? |
Thanks. Will now take care of min version. |
I wouldn't know where to do that so it would be found by developers. Basically it would be this lines in the composer.json: com_localise/component/composer.json Lines 14 to 22 in 7799bc4
Now composer will not install the mentioned packages as dependencies. It's a hack but works. |
@infograf768 Can you test if that works?
It would add the Joomla/Github package from Composer and load it through the composer autoloader.
I haven't tested it yet myself, just threw this together 馃槃
I did it using a second composer.json file because we need the classes in the component directory.