Problem/Motivation
During installation a profile can override configuration provided by modules. However this is limited to install time. If a profile wants to provide a different default for a module that is installed after the profile installed it can't. This was a designed limitation of the ConfigInstaller. However, it is apparent that we have use cases for this. Not least with the testing profile in core which wants to disable translation download. To do this it has the file core/profiles/testing/config/optional/locale.settings.yml. This currently does not work, which results in the test run downloading translations unnecessarily.
Another upside of this change is that we become more friendly to distributions as they can override configuration for modules they don't enable but want to provide a specific opinionated default config for in case the user does install that module.
Proposed resolution
Always check the profile module's optional and default configuration folders for overrides regardless of whether we're doing an installation.
Remaining tasks
Review
Commit
User interface changes
None
API changes
None
Data model changes
None
Why this issue should be an RC target
- We assume in our testing profile it works like this
- I think given the testing ramifications - always downloading translations - it helps make the test infrastructure performant
- It empowers distributions
The patch includes a signature change for a protected method.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2584419-9.patch | 9.74 KB | alexpott |
| #9 | 2-9-interdiff.txt | 2.86 KB | alexpott |
| #2 | 2584419-2.patch | 9.5 KB | alexpott |
| #2 | 2584419-2.test-only.patch | 1.05 KB | alexpott |
Comments
Comment #2
alexpottComment #3
alexpottComment #5
berdirSo we're still downloading translations for every locale test that's enabling translations in the UI at the moment?
Comment #6
alexpott@Berdir yerp
Comment #7
alexpottComment #8
berdirComment is still singular.
Are we allowed to change a protected method or not? :)
Ha ;)
"We are at war with Eastasia. We've always been at war with Eastasia."
Comment #9
alexpottThanks @Berdir
@internalunless explicitly marked with@apiI think committers should discuss this issue as possible rc target:
Comment #10
xjmRegarding the protected methods and whether BC can be broken, there is discussion of that on #2116841: [policy] Decide what the Drupal Public API should be and how to manage it but not yet on #2550249: [meta] Document @internal APIs both explicitly in phpdoc and implicitly in d.o documentation.
Comment #11
xjmAdding the RC targeting reasoning to the summary.
Comment #12
xjmDiscussed with alexpott and agreed that this makes sense as an RC target. There is no direct disruption for RC, just expanded functionality, but it would not be advisable to change the behavior after RC.
Comment #13
xjmComment #14
duaelfrSteps to review:
core/modules/locale/config/install/locale.settings.ymltocore/profiles/minimal/config/optional/locale.settings.ymlcore/profiles/minimal/config/optional/locale.settings.ymltranslate_english: falsetotranslate_english: true$ drush si minimal -y$ drush en -y locale$ drush cget locale.settingExpected result:
Before:
After:
Good job :)
Comment #17
catchCommitted/pushed to 8.0.x, thanks!
Comment #18
andypostThat needs change record because solves a lot of problems for distributions and profiles