This is a master issue to track progress of the 8.x-3.x release of Libraries API. This will be a completely revamped release. We want to tackle the following components. To be able to grasp the overall plan, each of the components are explained in detail here as they are planned to be implemented at any given time. The specifics of each component is to be discussed in the respective meta-issue.
- Libraries 7.x-2.x already supported 3 types of libraries (JS, CSS, PHP). We want to
- Support more library types (Autoload, PEAR, ...)
- Allow certain libraries to have their own business logic with regards to loading, etc. One example would be supporting jQuery.noConflict() in order to allow loading multiple versions of jQuery on one page.
Both of these points can be easily achieved in an object-oriented fashion. Since (a) we gain automatic autoloading of the Library information files and (b) Drupal 8 is moving towards an object-oriented design, this seems like a natural fit. We will organize both our own files, as well as the Library classes in accordance with PSR-0.
- We want to provide a central repository of the Library classes described above. We need a canonical list of library machine names each of which maps to a certain Library class, which is canonically developed/maintained. The current proposal is to develop a libraries.drupal.org site, which acts as that repository. How the code for the class will be maintained will have to be discussed. Given a library machine name, Libraries API will then query that central repository to obtain the Library class. How this can happen safely and conveniently will also have to be discussed. There was also an alternate idea to commit the Library classes directly to the Libraries API module. That would make things easier for users, but comes with an increased maintenance effort.
- Since http://packagist.org/, which uses Composer, seems to be the PHP package archive, we want to download all libraries, including JS and CSS libraries from there. That means that if a certain library does not have a
composer.jsonfile, and/or a package on http://packagist.org/, this needs to added "upstream" first, in order for Libraries API to support it. Each Library class will include a method called "getComposerURL", which Libraries API will use to download the library.