Problem/Motivation
Drupal\Core\Entity\Sql\DefaultTableMapping says it requires ContentEntityTypeInterface in the constructor. However all the calls that are done by this class can be satisfied if the $entity_type implements Drupal\Core\Entity\EntityTypeInterface
This is relevant in case we want to support EntityListBuilders for non Content Entities, discovered as part of: #2401463: Make dblog entities
Proposed resolution
Replace ContentEntityTypeInterface with EntityTypeInterface in the DefaultTableMapping class.
Remaining tasks
Not sure if we want tests for this. In theory it should be covered by some of the existing EntityListBuilder tests since they call this class when sorting the table.
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
Comments
Comment #2
dagmarComment #3
dagmarComment #6
smustgrave commentedRunning against 9.5 now.
Is this a task more then a bug? If it's a bug will it require test cases?
Comment #7
smustgrave commented9.5 passed and the change is small and easy to review. Looks good.
Comment #8
alexpottI'm sympathetic to what the issue is trying to do but I'm not sure it is practical for the following reasons:
I think limiting this to ContentEntityTypeInterface is pragmatic. Going to ping entity system maintainers before closing as works as designed.
Comment #9
alexpottDiscussed with @larowlan who pointed out that
Given this and #8 I'm closing this issue.