Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Adds Drupal 9 support, big thanks to @padorok , I basically cloned his fixed copy of libraries and pushed it up. This wasn't enough, so I am following up with alpha3 which fixes the remaining deprecated call issues for libraries.
This is the first alpha release of this module for Drupal 8.
The API has not yet been stabilized and the module is still in a very unfinished state in general, but since people are using it and for exmaple Thunder depends on it, this alpha at least gives people a stable version to work from.
This brings contains a number of fixes including a couple new features.
Downloading libraries
Most prominently, Libraries API now has support for downloading external libraries for you using Drush. In particular, there is now a drush libraries-download command. In order to support this, libraries need to provide a download file url in their metadata. See hook_libraries_info() for more information.
Please note that you need to clear caches after applying this update!
The most important change of this release is that theme-provided library information now actually works. Themes can implement hook_libraries_info() in their template.php just like modules. This supposedly worked in 7.x-2.1 already but did not work correctly.
This is the first stable release in the 7.x-2.x branch.
The following commits have been made since the 7.x-2.0-alpha2 release:
#1606018 by chemical: Tests fail if the module is downloaded from Drupal.org.
#1386250 by tstoeckler: Clarify module and library installation in README.txt.
#1578618 by iamEAP: Fixed Fatal cache flush failure on major version upgrades.
#1449346 by tstoeckler, sun: Clean-up libraries.test
For a detailed list of commits since the 1.0 release, see the release note of the 7.x-2.0-alpha1 and the 7.x-2.0-alpha2 releases.
Most importantly, Libraries API can now manage the library information for you. The idea is that you declare the library information once in hook_libraries_info() and the simply use libraries_load() to load it. Also see the handbook for more information.
This is the first alpha release of the 2.x branch of Libraries API.
You can do a lot more than libraries_get_path() now, see the libraries.api.php file now shipped with the module. A lot is still unfinished and in flux, but if your use-case is not supported by our API yet, we hope to see you in our issue queue!