-
Notifications
You must be signed in to change notification settings - Fork 0
Remove Query\Builder::__constructor overload
#26
Conversation
dc0ef90 to
9ba9607
Compare
| * @inheritdoc | ||
| */ | ||
| public function raw($expression = null) | ||
| public function raw($value = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get the argument name from the parent method.
9ba9607 to
027166e
Compare
jmikola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming no behavioral changes (see question).
| * @inheritdoc | ||
| */ | ||
| public function raw($expression = null) | ||
| public function raw($value = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is related to https://github.com/GromNaN/laravel-mongodb/pull/26/files#r1300010923.
| public function newQuery() | ||
| { | ||
| return new self($this->connection, $this->processor); | ||
| return new self($this->connection, null, $this->processor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a null second argument equivalent to constructing a new Grammar object (perhaps by way of calling Connection::getQueryGrammar()), as was done in the original overridden constructor (before the changes in this PR)?
Just want to confirm there's no behavioral change here.
|
Moved to mongodb/laravel-mongodb#2570 |
The constructor don't need to be overloaded to set the default grammar. It is read from the connection by default.
https://github.com/laravel/framework/blob/10.x/src/Illuminate/Database/Query/Builder.php#L246