Skip to content

Commit

Permalink
API Remove deprecated $join parameters (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Jan 9, 2025
1 parent 4ea6402 commit f985ce7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Versioned.php
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,6 @@ public function stagesDifferRecursive(): bool
* @param string $filter
* @param string $sort
* @param string $limit
* @param string $join Deprecated, use leftJoin($table, $joinClause) instead
* @return ArrayList<Versioned_Version>
*/
public function Versions($filter = "", $sort = "", $limit = "", $join = "")
Expand All @@ -2002,7 +2001,7 @@ public function Versions($filter = "", $sort = "", $limit = "", $join = "")
$oldMode = static::get_reading_mode();
static::set_stage(static::DRAFT);

$list = DataObject::get(DataObject::getSchema()->baseDataClass($owner), $filter, $sort, $join, $limit);
$list = DataObject::get(DataObject::getSchema()->baseDataClass($owner), $filter, $sort, $limit);

$query = $list->dataQuery()->query();

Expand Down Expand Up @@ -2483,7 +2482,6 @@ public static function prepopulate_versionnumber_cache($class, $stage, $idList =
* @param string $stage The name of the stage.
* @param string $filter A filter to be inserted into the WHERE clause.
* @param string $sort A sort expression to be inserted into the ORDER BY clause.
* @param string $join Deprecated, use leftJoin($table, $joinClause) instead
* @param int $limit A limit on the number of records returned from the database.
* @param string $containerClass The container class for the result set (default is DataList)
*
Expand All @@ -2494,12 +2492,11 @@ public static function get_by_stage(
$stage,
$filter = '',
$sort = '',
$join = '',
$limit = null,
$containerClass = DataList::class
) {
ReadingMode::validateStage($stage);
$result = DataObject::get($class, $filter, $sort, $join, $limit, $containerClass);
$result = DataObject::get($class, $filter, $sort, $limit, $containerClass);
return $result->setDataQueryParam([
'Versioned.mode' => 'stage',
'Versioned.stage' => $stage
Expand Down

0 comments on commit f985ce7

Please sign in to comment.