General developer forum

Support for Library inclusion via Composer

Picture of Andrew Nicols
Re: Support for Library inclusion via Composer
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi Mark,

Thanks for the feedback.

Yes -- I think that the retention of the "Download and run" approach is important, and we would have to ensure that the documentation is clear.

Essentially installation is just a case of running composer install --no-dev. This makes use of the composer.lock file that we ship with Moodle.

Installation of developer components is just a case of removing the --no-dev argument.

The reason that I am proposing that we do not support composer in plugins yet is for several reasons:

  • it's unclear how we should handle potential conflicts between the two. If one plugin demands version X of a dependency, but another plugin demands version Y, what should happen?
  • same question with regards core and plugins?
  • we need to look at how we handle installation of all plugin dependencies in a sane fashion. I'm aware that there is a wikimedia dependency for exactly this purpose so this may help solve the issue
  • it would be good to solve any potential issues in core before we roll out to plugins

Personally I would like to see us roll this out to plugins too, but I think we may need to do this in a two-step fashion initially.


Average of ratings: Useful (1)