[dokuwiki] Using composer to add 3rd party libraries?

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: DokuWiki Mailinglist <dokuwiki@xxxxxxxxxxxxx>
  • Date: Thu, 8 Jan 2015 16:22:21 +0100

Hi *,

lately I was thinking about using composer to add 3rd party libs to
DokuWiki. Here are just a few rough thoughts and I would appreciate
your feedback on it.

I would add the composer.json, composer.lock and the vendors directory
to git and check everything in after an install/update.

composer.json, composer.lock would be added to the .gitattributes file
to be ignored on export.

Both would ensure a checkout still runs out of the box without the
need for running composer. It would also make sure our release process
(and what the upgrade plugin does) remains the same.

Developers could use composer to easily update the libraries to their
latest versions.

I would not open composer functionality to plugin developers.

Things that could be added via composer: geshi, less [2].

I'm in the process to refactor zip/tar handling into it's own library
currently. Maybe even our HTTP client would be useful outside of
DokuWiki, using composer would give us an easy way to modularize
certain parts of DokuWiki out of the main project while still having a
way to easily pull them back in without having to fiddle with
submodules or similar that would complicate releasing/exporting.

We would have less control over contents though. Eg. when pulling via
composer we would get whatever the library author packed. Including
samples and documentation. Before we usually just picked what we
wanted.

Andi

[1] https://getcomposer.org/
[2] see https://github.com/splitbrain/dokuwiki/pull/983

-- 
splitbrain.org
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: