From 16cbaf890a6d3c7e6365cc423a8fbd6c08fa141f Mon Sep 17 00:00:00 2001 From: Art4 Date: Tue, 25 Feb 2025 08:39:31 +0000 Subject: [PATCH] Deprecate BaseRepository::_selectOne() --- src/BaseRepository.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/BaseRepository.php b/src/BaseRepository.php index afbb688bd9..ead4bf73bf 100644 --- a/src/BaseRepository.php +++ b/src/BaseRepository.php @@ -148,18 +148,13 @@ abstract class BaseRepository } /** - * @param array $condition - * @param array $params - * @return BaseEntity + * @deprecated 2025.05 Use `\Friendica\BaseRepository::_selectFirstRowAsArray()` instead + * * @throws NotFoundException */ protected function _selectOne(array $condition, array $params = []): BaseEntity { - $fields = $this->db->selectFirst(static::$table_name, [], $condition, $params); - - if (!$this->db->isResult($fields)) { - throw new NotFoundException(); - } + $fields = $this->_selectFirstRowAsArray( $condition, $params); return $this->factory->createFromTableRow($fields); }