function system_post_update_migrate_compress_setting
Same name and namespace in other branches
- main core/modules/system/system.post_update.php \system_post_update_migrate_compress_setting()
Migrate to new compress setting.
File
-
core/
modules/ system/ system.post_update.php, line 155
Code
function system_post_update_migrate_compress_setting() : void {
$performanceConfig = \Drupal::configFactory()->getEditable('system.performance');
$performanceConfig->set('css.compress', (bool) $performanceConfig->get('css.gzip'));
$performanceConfig->set('js.compress', (bool) $performanceConfig->get('js.gzip'));
$performanceConfig->clear('css.gzip');
$performanceConfig->clear('js.gzip');
$performanceConfig->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.