Problem/Motivation
CSS/JS aggregates directory is hardcoded to public://{css,js}
. In some cases it is legitimate to store aggregates in a different path. For example, to store public:// is in a slower filesystem and css/js in a faster one. At present this can only be achieved by putting symlinks in place, and it is not a desirable solution for several reasons (file_exists() performance, or a tangled setup).
Proposed resolution
Make css/js aggregates path configurable.
Remaining tasks
* Create patch
* Review patch
* Create a change record?
User interface changes
No.
API changes
A developer must start using the configurable path instead of the hardcoded one.
$css_base_path = "public://css";
$js_base_path = "public://js";
$css_base_path = \Drupal::config('system.file')->get('assets.css_base_path');
$js_base_path = \Drupal::config('system.file')->get('assets.js_base_path');
Data model changes
No.
Release notes snippet
CSS/JS aggregated paths are not hardcoded to public://css
and public://js
anymore. Developers now must obtain this paths from the system.file<code> config object, under <code>assets.css_base_path
or system.file.assets.css_base_path
keys respectively.