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

Do not throw an exception when a context is missing while applying context mapping to a plugin if that context was previously set

$
0
0

Problem/Motivation

\Drupal\Core\Plugin\Context\ContextHandlerInterface::applyContextMapping() applies a set of contexts to a given plugin.
If any of the contexts required by the plugin are not present in those passed to the method, an exception is thrown.

However, if the plugin already had that context set, there is no reason to throw the exception

Proposed resolution

If a context is "missing" from those being applied, only throw an exception if the plugin doesn't already have that context

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 294715

Trending Articles



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