From df8445867376279108376d42961403cb32e72ca7 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Thu, 27 May 2021 00:43:26 +0300 Subject: [PATCH 1/4] fix: getRelationQuery error due to breaking change --- src/Relations/HasMany.php | 16 ---------------- src/Relations/HasOne.php | 16 ---------------- 2 files changed, 32 deletions(-) diff --git a/src/Relations/HasMany.php b/src/Relations/HasMany.php index b10426635..a9a6ce6c8 100644 --- a/src/Relations/HasMany.php +++ b/src/Relations/HasMany.php @@ -58,22 +58,6 @@ public function getRelationCountQuery(Builder $query, Builder $parent) return $query->select($foreignKey)->where($foreignKey, 'exists', true); } - /** - * Add the constraints for a relationship query. - * @param Builder $query - * @param Builder $parent - * @param array|mixed $columns - * @return Builder - */ - public function getRelationQuery(Builder $query, Builder $parent, $columns = ['*']) - { - $query->select($columns); - - $key = $this->wrap($this->getQualifiedParentKeyName()); - - return $query->where($this->getHasCompareKey(), 'exists', true); - } - /** * Get the name of the "where in" method for eager loading. * @param \Illuminate\Database\Eloquent\Model $model diff --git a/src/Relations/HasOne.php b/src/Relations/HasOne.php index 91741c297..38cb46c8d 100644 --- a/src/Relations/HasOne.php +++ b/src/Relations/HasOne.php @@ -58,22 +58,6 @@ public function getRelationCountQuery(Builder $query, Builder $parent) return $query->select($foreignKey)->where($foreignKey, 'exists', true); } - /** - * Add the constraints for a relationship query. - * @param Builder $query - * @param Builder $parent - * @param array|mixed $columns - * @return Builder - */ - public function getRelationQuery(Builder $query, Builder $parent, $columns = ['*']) - { - $query->select($columns); - - $key = $this->wrap($this->getQualifiedParentKeyName()); - - return $query->where($this->getForeignKeyName(), 'exists', true); - } - /** * Get the name of the "where in" method for eager loading. * @param \Illuminate\Database\Eloquent\Model $model From a8aec3bee02ddb8baee92bb8b8c66f10bfbf5091 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Thu, 27 May 2021 00:47:37 +0300 Subject: [PATCH 2/4] fix: queue job test --- tests/QueueTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/QueueTest.php b/tests/QueueTest.php index aa01d0791..a0bcbc17d 100644 --- a/tests/QueueTest.php +++ b/tests/QueueTest.php @@ -39,6 +39,7 @@ public function testQueueJobLifeCycle(): void 'job' => 'test', 'maxTries' => null, 'maxExceptions' => null, + 'failOnTimeout' => false, 'backoff' => null, 'timeout' => null, 'data' => ['action' => 'QueueJobLifeCycle'], From 8b44a1c285ed550423df534a2372cfd12721171a Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Thu, 27 May 2021 00:55:32 +0300 Subject: [PATCH 3/4] feat: remove unused getRelationCountQuery --- src/Relations/HasMany.php | 13 ------------- src/Relations/HasOne.php | 13 ------------- 2 files changed, 26 deletions(-) diff --git a/src/Relations/HasMany.php b/src/Relations/HasMany.php index a9a6ce6c8..0698e4ba9 100644 --- a/src/Relations/HasMany.php +++ b/src/Relations/HasMany.php @@ -45,19 +45,6 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, return $query->select($foreignKey)->where($foreignKey, 'exists', true); } - /** - * Add the constraints for a relationship count query. - * @param Builder $query - * @param Builder $parent - * @return Builder - */ - public function getRelationCountQuery(Builder $query, Builder $parent) - { - $foreignKey = $this->getHasCompareKey(); - - return $query->select($foreignKey)->where($foreignKey, 'exists', true); - } - /** * Get the name of the "where in" method for eager loading. * @param \Illuminate\Database\Eloquent\Model $model diff --git a/src/Relations/HasOne.php b/src/Relations/HasOne.php index 38cb46c8d..5e2e786e4 100644 --- a/src/Relations/HasOne.php +++ b/src/Relations/HasOne.php @@ -45,19 +45,6 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, return $query->select($foreignKey)->where($foreignKey, 'exists', true); } - /** - * Add the constraints for a relationship count query. - * @param Builder $query - * @param Builder $parent - * @return Builder - */ - public function getRelationCountQuery(Builder $query, Builder $parent) - { - $foreignKey = $this->getForeignKeyName(); - - return $query->select($foreignKey)->where($foreignKey, 'exists', true); - } - /** * Get the name of the "where in" method for eager loading. * @param \Illuminate\Database\Eloquent\Model $model From 924c28585864851fc6728789234912ddec869ff5 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Thu, 27 May 2021 09:42:23 +0300 Subject: [PATCH 4/4] feat: remove unused getPlainForeignKey --- src/Relations/HasMany.php | 9 --------- src/Relations/HasOne.php | 9 --------- 2 files changed, 18 deletions(-) diff --git a/src/Relations/HasMany.php b/src/Relations/HasMany.php index 0698e4ba9..933a87b54 100644 --- a/src/Relations/HasMany.php +++ b/src/Relations/HasMany.php @@ -17,15 +17,6 @@ public function getForeignKeyName() return $this->foreignKey; } - /** - * Get the plain foreign key. - * @return string - */ - public function getPlainForeignKey() - { - return $this->getForeignKeyName(); - } - /** * Get the key for comparing against the parent key in "has" query. * @return string diff --git a/src/Relations/HasOne.php b/src/Relations/HasOne.php index 5e2e786e4..f2a5a9b33 100644 --- a/src/Relations/HasOne.php +++ b/src/Relations/HasOne.php @@ -26,15 +26,6 @@ public function getHasCompareKey() return $this->getForeignKeyName(); } - /** - * Get the plain foreign key. - * @return string - */ - public function getPlainForeignKey() - { - return $this->getForeignKeyName(); - } - /** * @inheritdoc */