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

Deprecate using the simpleConfigUpdate action on config entities, and introduce a new setProperties action to replace the invalid use cases

$
0
0

Problem/Motivation

\Drupal\Core\Config\Action\Plugin\ConfigAction\SimpleConfigUpdate::apply() can change config entities. It shouldn't be used for that, though, because it totally bypasses the entity API and the many important hooks in it.

Proposed resolution

Deprecate using simpleConfigUpdate on config entities.

Meanwhile, create a new setProperties action that only works on config entities, but has the same syntax as simpleConfigUpdate (and is essentially a wrapper around set()).

API changes

The simpleConfigUpdate config action will raise a deprecation error in certain (fairly common) situations.

This will also render the set and setMultiple config actions largely redundant, but the cost of implementing those is very cheap (they're just one-line annotations) so there's no real need to deprecate or remove them.


Viewing all articles
Browse latest Browse all 292436

Trending Articles



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