Problem/Motivation

LastTweetsManager uses ConfigFactory::getEditable() to get the configuration, although there is no need to change the configuration inside that service. It should use ConfigFactory::get() to get an immutable config object instead.

Apart from not adhering to the best practice, there are other issues with it: The config object returned by getEditable() will not contain config overrides. If you use configuration management and don't want to store your secrets in git (in this case Twitter access tokens), a common approach is to override the configuration with the correct secrets in settings.php. Those secrets will not be loaded when loading the configuration with getEditable().

CommentFileSizeAuthor
#2 3201915-02.patch743 bytesfeyp

Comments

FeyP created an issue. See original summary.

feyp’s picture

Assigned: feyp » Unassigned
Status: Active » Needs review
StatusFileSize
new743 bytes

Attached is a patch against 8.x-2.x.

sgostanyan’s picture

Status: Needs review » Fixed

Added in release 2.9

Status: Fixed » Closed (fixed)

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