Problem/Motivation

The TFAPluginManager stores config as an ImmutableConfig into a property.

This is an anti-pattern causing a read of 'tfa.settings' when it may not be needed and prevents updates to config after the service is initialized from being readable.

Steps to reproduce

Kernel Test:

    $this->assertArrayNotHasKey('tfa_test_plugins_send_false', $tfa_pm->getSendDefinitions(TRUE));
    $this->config('tfa.settings')
      ->set('send_plugins', ['tfa_test_plugins_send_false' => 'yo'])
      ->save();
    $this->assertArrayHasKey('tfa_test_plugins_send_false', $tfa_pm->getSendDefinitions(TRUE));

Proposed resolution

Move config_factory to a property and cease use of $tfaSettings.

Remaining tasks

User interface changes

None

API changes

Internal only class.

Data model changes

None

Issue fork tfa-3511840

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cmlara created an issue. See original summary.

  • cmlara committed 7064de65 on 2.x
    Issue #3511840: TfaPluginManager should use ConfigFactory not...
cmlara’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.