Problem/Motivation

Library discovery Parser should allow a constant for modules and themes versions in libraries.yml.

VERSION was added in #2223143: Consolidate library extension caches into a single cache entry, a follow-up for this was mentioned but never created.

Proposed resolution

Allow EXTENSION_VERSION, THEME_VERSION to *.yml.

Or even re-use VERSION (we are already checking in the parser if it's in core or not), and introduce CORE_VERSION for the few edge cases (if any) where contrib might need to depend on Drupal core version.

Remaining tasks

MR with tests.

User interface changes

None.

Introduced terminology

API changes

API additions only.

Data model changes

None.

Release notes snippet

Allowing better caching of library assets, as they don't need to vary on every cache flush but on the actual updates.

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Title: Library discovery Parser should allow a constant for modules and themes » Library discovery Parser should allow a version constant for modules and themes

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.