I have a situation where I need to use \Drupal\consumers\Negotiator::negotiateFromRequest to get the consumer from the request and then act on it. But, if there is no consumer data in the request do something different. Right now, \Drupal\consumers\Negotiator::negotiateFromRequest always returns consumer because it uses whatever is configured as the default if none is found in the request.
Add a (bool) $skip_default
parameter to both \Drupal\consumers\Negotiator::negotiateFromRequest
, and \Drupal\consumers\Negotiator::doNegotiateFromRequest
so that when you're invoking the former you can optionally ask it to skip loading the default consumer and instead return NULL
.
This adds a new option to the methods, but shouldn't break any existing implementations.
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.