- πΊπΈUnited States smustgrave
Moving to NW for issue summary update.
Also patch #21 had a failure, which seems releated.
In writing unit tests for various parts of Component\Plugin for
#2052109: [meta] Expand phpunit tests for \Drupal\Component\Plugin classes β
, I discovered that Drupal\Component\Plugin\Context\Context::getConstraints()
tries to access an array property of an object.
/**
* Implements \Drupal\Component\Plugin\Context\ContextInterface::getConstraints().
*/
public function getConstraints() {
if (empty($this->contextDefinition['class'])) {
throw new ContextException("An error was encountered while trying to validate the context.");
}
return array(new Type($this->contextDefinition['class']));
}
$contextDefinition
is defined as a \Drupal\Component\Plugin\Context\ContextDefinitionInterface
.
After talking about it with @EclipseGC in IRC it seems that this is a bug.
It also seems that most of the Component aspect of Context is overridden by Core, which is why this bug hadn't been found yet.
Analyze a proper solution.
Analyze the requirements for Context::getConstraints()
.
Possibly modify ContextDefinitionInterface
.
Modify Context::getConstraints()
to conform with ContextDefinitionInterface
.
Add PHPUnit test for the function Context::getConstraints()
Needs work
10.1 β¨
Last updated
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
Used to track the progress of issues reviewed by the Drupal Needs Review Queue Initiative.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Moving to NW for issue summary update.
Also patch #21 had a failure, which seems releated.