diff --git a/Entity/Repository/JobManager.php b/Entity/Repository/JobManager.php index 63c3e351..78e66ef7 100644 --- a/Entity/Repository/JobManager.php +++ b/Entity/Repository/JobManager.php @@ -173,7 +173,9 @@ public function findJobForRelatedEntity($command, $relatedEntity, array $states private function getRelatedEntityIdentifier($entity) { - assert('is_object($entity)'); + if ( ! is_object($entity)) { + throw new \RuntimeException('$entity must be an object.'); + } if ($entity instanceof \Doctrine\Common\Persistence\Proxy) { $entity->__load();