For #542940: [meta] Support for downloading libraries via Composer and related issues we decided that we'll only support automated downloads for libraries for which the vendor provides a "latest stable" release download URL; e.g.

In essence, Libraries API behaves exactly in the way it was designed for: Determine the actual version, decide whether that's supported, and if so proceed with loading/integration.

However, I could easily foresee cases in which a library's latest stable is compatible with, say, D7 only, but not D6. Easiest examples are probably PHP libraries; e.g., the latest stable might have been revamped/rewritten for PHP 5.3 (D8 only), and D7 and below need to grab an earlier version - or alternative latest stable download URL for PHP <5.3.

Thoughts, feedback, drinks?


RobLoach’s picture

Maybe providing "download" support for "versions" or "variants"? In the end though, it should be up to the module maintainer to define how automated downloading is handled.

  // By default, get the latest in the 4.x branch.
  $libraries['tinymce']['download']['url'] = '';

  // Provide support for the 3.x branch though.
  $libraries['tinymce']['versions']['3.8']['download']['url'] = '';

Override which version is downloaded via:

  drush libraries-make tinymce --version 3.8

... Something along those lines?

tstoeckler’s picture

Title: Introduce core compatibility for latest stable download URLs » Allow library dependencies to be versioned
Version: 7.x-2.x-dev » 8.x-3.x-dev
Issue summary: View changes

Re-targeting this for 8.x-3.x. We now have the ability of modules to declare a dependency on a library, but that dependency cannot be versioned. We definitely need to support that.