Problem/Motivation
In TypedData land, you deal with DataDefinition objects:
DataDefinition::create('string');
EntityDataDefinition::create('node');
With ContextDefinitions, you don't have that luxury:
new ContextDefinition('string');
new ContextDefinition('entity:node');
With #2671964: ContextHandler cannot validate constraints, there is new entity-specific logic that should not be intermixed with the generic ContextDefinition class.
Proposed resolution
Deprecate using the constructor directly (is this possible?)
Add ::create()
Use EntityDataDefinition where possible
Remove all strpos()
checks for 'entity:'