Managing PKP depencies with Composer

Hi all,

I did a quick experiment as follows…

  • Set up the lib/pkp submodule (pkp-lib repo) to see itself as a named library;
  • Required it using a new OJS Composer configuration via the git driver
  • Used the composer-installers-extender package to get it to install in the right place (lib/pkp rather than vendor)

This initially looks promising – it runs, and allows for the vast majority of dependencies to stay configured in pkp-lib. You can use the --prefer-source parameter to composer install to get Composer to check out using git – though that applies equally to all libraries (a considerable number!) and there doesn’t seem to be a way to set it per-package.

We would need to do this consistently for all submodules to be worthwhile, I think.

I’m still not sure how we’d treat versioning. I suppose we would use e.g. dev-stable-3_5_0 to cause OJS to check out the stable-3_5_0 HEAD for stable branches, and would manually set and commit a version number in package.json for builds.

This does still need some proving out – but it’s worth further work.

Branches:

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes