Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292445

Create test trait to set update_test module settings

$
0
0

Problem/Motivation

In Package Manager and Automatic Updates, which are both planned for core inclusion, we need to the update_test module to

  1. Set project versions
  2. 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

Remaining tasks


Viewing all articles
Browse latest Browse all 292445

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>