Problem/Motivation
In Package Manager and Automatic Updates, which are both planned for core inclusion, we need to the update_test module to
- Set project versions
- Set fixture update XML files to use
We are duplicating logic in the Update module for this. The Update module itself is also duplicating a lot of logic.
There around 30 instances of $this->config('update_test.settings')->set
were we save either system_info
or 'xml_map'
. Even though I(tedbow) am an Update module maintainer I often just have to grep the code base to remember where these settings take effect(update_test_system_info_alter and \Drupal\update_test\Controller\UpdateTestController)
Proposed resolution
Create UpdateTestTrait
which will have 2 methods to update system_info
and 'xml_map'
. Replace all calls to save 'update_test.settings'
with calls to this trait.
The methods on this trait should have @see
to where these settings are used in the update_test
module