Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Remove deprecated $join parameters #486

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading