Install specific plugin version

Hello,

I’m quite new to Grav, have 2 sites running on it. Because more people are working on the projects, we need to reproduce the site from our Git repository almost 1:1. The problem are plugins, because GPM installs the newest version of a plugin by default. So it’s not possible get the same version of Grav and it’s plugins every time I build the project.

So how to install a specific plugin version during project installation? I have only 3 ideas.

  1. Add /user/plugins/* to Git repository (don’t like it, there are vendor dirs etc.)
  2. Use gpm direct-install (don’t like that since direct-install doesn’t install dependencies)
  3. Add /user/plugins/*/blueprint.yaml to Git repository? (didn’t try that but dependencies are specified like { name: form, version: '>=3.0.0' } so again, GPM would probably try to install the newest versions of the depencencies which could result in incompatibility).

Are there any other options? Which one is the best?

Thank you.

@netmagnet, Recently a feature request has been created on github. The request suggested something like:

$ bin/gpm install plugin:1.2.3

If you have extra info to share, or want to give it a thumbs up, you can do so at the feature request.

Have you considered adding a composer.json/composer.lock file in the root of the site, containing all dependencies in the site, and run composer install?