From b4bc5340283408b26b41aa5350d8b33a6395b543 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 27 Dec 2017 07:32:21 +1030 Subject: [PATCH] Upgrade to Laravel 5.5 --- extensions/tags/src/Listener/AddDiscussionTagsRelationship.php | 2 +- extensions/tags/src/Listener/CreatePostWhenTagsAreChanged.php | 2 +- extensions/tags/src/Listener/FilterDiscussionListByTags.php | 2 +- extensions/tags/src/Listener/SaveTagsToDatabase.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/tags/src/Listener/AddDiscussionTagsRelationship.php b/extensions/tags/src/Listener/AddDiscussionTagsRelationship.php index 1eacbb831..5264bc28e 100755 --- a/extensions/tags/src/Listener/AddDiscussionTagsRelationship.php +++ b/extensions/tags/src/Listener/AddDiscussionTagsRelationship.php @@ -41,7 +41,7 @@ class AddDiscussionTagsRelationship public function getModelRelationship(GetModelRelationship $event) { if ($event->isRelationship(Discussion::class, 'tags')) { - return $event->model->belongsToMany(Tag::class, 'discussions_tags', null, null, 'tags'); + return $event->model->belongsToMany(Tag::class, 'discussions_tags', null, null, null, null, 'tags'); } } diff --git a/extensions/tags/src/Listener/CreatePostWhenTagsAreChanged.php b/extensions/tags/src/Listener/CreatePostWhenTagsAreChanged.php index 3ca19c9cb..7bed30f60 100755 --- a/extensions/tags/src/Listener/CreatePostWhenTagsAreChanged.php +++ b/extensions/tags/src/Listener/CreatePostWhenTagsAreChanged.php @@ -44,7 +44,7 @@ class CreatePostWhenTagsAreChanged $event->discussion->id, $event->actor->id, array_pluck($event->oldTags, 'id'), - $event->discussion->tags()->lists('id')->all() + $event->discussion->tags()->pluck('id')->all() ); $event->discussion->mergePost($post); diff --git a/extensions/tags/src/Listener/FilterDiscussionListByTags.php b/extensions/tags/src/Listener/FilterDiscussionListByTags.php index 49dd62b35..f5410e21d 100755 --- a/extensions/tags/src/Listener/FilterDiscussionListByTags.php +++ b/extensions/tags/src/Listener/FilterDiscussionListByTags.php @@ -53,7 +53,7 @@ class FilterDiscussionListByTags $query->whereNotExists(function ($query) { return $query->select(new Expression(1)) ->from('discussions_tags') - ->whereIn('tag_id', Tag::where('is_hidden', 1)->lists('id')) + ->whereIn('tag_id', Tag::where('is_hidden', 1)->pluck('id')) ->where('discussions.id', new Expression('discussion_id')); }); } diff --git a/extensions/tags/src/Listener/SaveTagsToDatabase.php b/extensions/tags/src/Listener/SaveTagsToDatabase.php index dc56f1668..8db8d160d 100755 --- a/extensions/tags/src/Listener/SaveTagsToDatabase.php +++ b/extensions/tags/src/Listener/SaveTagsToDatabase.php @@ -98,7 +98,7 @@ class SaveTagsToDatabase if ($discussion->exists) { $oldTags = $discussion->tags()->get(); - $oldTagIds = $oldTags->lists('id')->all(); + $oldTagIds = $oldTags->pluck('id')->all(); if ($oldTagIds == $newTagIds) { return;