By stefan.r on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Issue links:
Description:
When running set() or setData() on a configuration object, any objects implementing MarkupInterface within this configuration object will be automatically cast to string. This means that:
$object = new TranslatableMarkup('something bar');
$this->config->set('foo', $object);
// The following will evaluate to TRUE:
$this->config->get('foo') === 'bar';
This has been introduced as a development aid as it should never be necessary to store TranslatableMarkup in configuration.
For more information, see ConfigBase::set(), ConfigBase::setData() and ConfigBase::castSafeStrings().
Impacts:
Module developers