On Thu, May 15, 2014 at 9:12 AM, Cor Bosman <[email protected]> wrote:
> On 15 May 2014, at 08:44, Thomas Bruederli <[email protected]> wrote:
>
>> (cc'ing the mailing list as this is an interesting topic for all
>> plugin developers)
>>
>> I suggest to specify the dependencies in your plugin's composer.json
>> file which is used to register it in our new plugins repository at
>> http://plugins.roundcube.net.
>>
>> If the external libraries are also available as composer packages,
>> like phpseclib, just add them to the "require" section of your
>> composer.json file and you're done. When installing Roundcube plugins
>> through composer, all the dependencies are downloaded and installed to
>> vendor/xxx. Roundcube also includes composer's autoloader and
>> therefore all classes from the external libraries are automatically
>> available to your plugin without having to require or include
>> anything.
>>
>> I hope this helps.
>
> Wont this create vendor conflicts?
>
> A quick test seems to suggest that if 1 plugin requires say version 1.*, and 
> another version 2.* this wont work.
> Looks like only 1 of the 2 gets installed.

That seems to be true but also would be the base with PEAR et al. If
your plugin for some reason cannot work with the latest version
available through composer, you can still put a vendorized copy into
your plugin folder and do the (auto)loading yourself.

We didn't want to get all into packages and dependency management and
thus chose an existing solution. And as all existing package managers
have some issues, we/you have to deal with them as they hit us/you.

~Thomas
_______________________________________________
Roundcube Development discussion mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/dev

Reply via email to