Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 303159

Provide a mechanism for dynamic library declarations

$
0
0

This came up in #2350877: Deprecate/rename drupal_add_feed(), drupal_add_html_head(), drupal_add_html_head_link(), drupal_add_http_header(), and allow to be set declaratively in #attached, resp. #2358727: Figure out what if anything libraries API needs for #attached support

Problem/Motivation

There is currently no way to dynamically register libraries. Libraries API will certainly need to do this in contrib, and there are other use-cases as well.

You could always use hook_library_info_alter()to also register new ones, but it results in a alter/weight hell.

Proposed resolution

Introduce a

hook_library_info_build()

which will be fired before executing hook_library_info_alter()

Remaining tasks

User interface changes

API changes

https://www.drupal.org/node/2402315

Contributor tasks needed
TaskNovice task?Contributor instructionsComplete?
Update the issue summaryAdd the mentioned API additition and add a beta evaluation

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue priorityCritical because this blocks a stable release of Libraries API
Unfrozen changesNot unfrozen.
Prioritized changesThe main goal of this issue is to move Drupal 8 closer to a releasable state by unblocking a stable release of Libraries API.
DisruptionDisruption is minimum because this doesn't replace existing functions.

Viewing all articles
Browse latest Browse all 303159


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>