Problem/Motivation
While working on #3355087: Support for non-bundle entity types I used an entity type that does not implement EntityPublishedInterface and caused a crash at scheduler.module:828/836
Drupal\Tests\scheduler\Functional\SchedulerDeleteEntityTest::testDeleteEntityWithPastDates with data set "#entity_test_no_bundle"
Error: Call to undefined method Drupal\entity_test\Entity\EntityTestNoBundle::setUnpublished()
/builds/issue/scheduler-3355087/scheduler.module:836
Steps to reproduce
Proposed resolution
if ($entity instanceof EntityPublishedInterface) {
$entity->setPublished(); // or setUnpublished()
}
Or validate scheduler plugins are targeting entity types which implement EntityPublishedInterface
Comments