mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Deprecate BaseRepository::_selectOne()
set BaseRepository::_selectFirstRowAsArray() as final
This commit is contained in:
parent
7ce6afd151
commit
e1eb6fff83
1 changed files with 3 additions and 1 deletions
|
@ -136,7 +136,7 @@ abstract class BaseRepository
|
|||
*
|
||||
* @return array The resulted fields as array
|
||||
*/
|
||||
protected function _selectFirstRowAsArray(array $condition, array $params = []): array
|
||||
final protected function _selectFirstRowAsArray(array $condition, array $params = []): array
|
||||
{
|
||||
$fields = $this->db->selectFirst(static::$table_name, [], $condition, $params);
|
||||
|
||||
|
@ -154,6 +154,8 @@ abstract class BaseRepository
|
|||
*/
|
||||
protected function _selectOne(array $condition, array $params = []): BaseEntity
|
||||
{
|
||||
@trigger_error('`' . __METHOD__ . '()` is deprecated since 2025.05 and will be removed after 5 months, use `\Friendica\BaseRepository::_selectFirstRowAsArray()` instead.', E_USER_DEPRECATED);
|
||||
|
||||
$fields = $this->_selectFirstRowAsArray( $condition, $params);
|
||||
|
||||
return $this->factory->createFromTableRow($fields);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue