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
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
Comment #4
cmlara