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

[10.x] Allow Expression at more places in Query Builder #50402

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
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
22 changes: 11 additions & 11 deletions src/Illuminate/Database/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public function ignoreIndex($index)
* Add a join clause to the query.
*
* @param \Illuminate\Contracts\Database\Query\Expression|string $table
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string|null $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @param string $type
Expand Down Expand Up @@ -550,7 +550,7 @@ public function join($table, $first, $operator = null, $second = null, $type = '
* Add a "join where" clause to the query.
*
* @param \Illuminate\Contracts\Database\Query\Expression|string $table
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string $second
* @param string $type
Expand All @@ -566,7 +566,7 @@ public function joinWhere($table, $first, $operator, $second, $type = 'inner')
*
* @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query
* @param string $as
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string|null $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @param string $type
Expand Down Expand Up @@ -623,7 +623,7 @@ public function leftJoinLateral($query, string $as)
* Add a left join to the query.
*
* @param \Illuminate\Contracts\Database\Query\Expression|string $table
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string|null $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @return $this
Expand All @@ -637,7 +637,7 @@ public function leftJoin($table, $first, $operator = null, $second = null)
* Add a "join where" clause to the query.
*
* @param \Illuminate\Contracts\Database\Query\Expression|string $table
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @return $this
Expand All @@ -652,7 +652,7 @@ public function leftJoinWhere($table, $first, $operator, $second)
*
* @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query
* @param string $as
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string|null $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @return $this
Expand Down Expand Up @@ -680,7 +680,7 @@ public function rightJoin($table, $first, $operator = null, $second = null)
* Add a "right join where" clause to the query.
*
* @param \Illuminate\Contracts\Database\Query\Expression|string $table
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string $second
* @return $this
Expand All @@ -695,7 +695,7 @@ public function rightJoinWhere($table, $first, $operator, $second)
*
* @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query
* @param string $as
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string|null $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @return $this
Expand All @@ -709,7 +709,7 @@ public function rightJoinSub($query, $as, $first, $operator = null, $second = nu
* Add a "cross join" clause to the query.
*
* @param \Illuminate\Contracts\Database\Query\Expression|string $table
* @param \Closure|string|null $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string|null $first
* @param string|null $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @return $this
Expand Down Expand Up @@ -1029,7 +1029,7 @@ public function orWhereNot($column, $operator = null, $value = null)
/**
* Add a "where" clause comparing two columns to the query.
*
* @param string|array $first
* @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
* @param string|null $operator
* @param string|null $second
* @param string|null $boolean
Expand Down Expand Up @@ -1066,7 +1066,7 @@ public function whereColumn($first, $operator = null, $second = null, $boolean =
/**
* Add an "or where" clause comparing two columns to the query.
*
* @param string|array $first
* @param \Illuminate\Contracts\Database\Query\Expression|string|array $first
* @param string|null $operator
* @param string|null $second
* @return $this
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Query/JoinClause.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function __construct(Builder $parentQuery, $type, $table)
*
* on `contacts`.`user_id` = `users`.`id` and `contacts`.`info_id` = `info`.`id`
*
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string|null $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @param string $boolean
Expand All @@ -102,7 +102,7 @@ public function on($first, $operator = null, $second = null, $boolean = 'and')
/**
* Add an "or on" clause to the join.
*
* @param \Closure|string $first
* @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first
* @param string|null $operator
* @param \Illuminate\Contracts\Database\Query\Expression|string|null $second
* @return \Illuminate\Database\Query\JoinClause
Expand Down
Loading