fix doctrine syntax & remove HistoryRepository.php