diff --git a/extensions/nicknames/extend.php b/extensions/nicknames/extend.php index 853499e099..32e47b08a7 100644 --- a/extensions/nicknames/extend.php +++ b/extensions/nicknames/extend.php @@ -52,7 +52,7 @@ ->configure(AddNicknameValidation::class), (new Extend\SimpleFlarumSearch(UserSearcher::class)) - ->setFullTextFilter(NicknameFullTextGambit::class), + ->setFullTextFilter(NicknameFullTextFilter::class), (new Extend\Policy()) ->modelPolicy(User::class, UserPolicy::class), diff --git a/extensions/nicknames/src/NicknameFullTextGambit.php b/extensions/nicknames/src/NicknameFullTextFilter.php similarity index 94% rename from extensions/nicknames/src/NicknameFullTextGambit.php rename to extensions/nicknames/src/NicknameFullTextFilter.php index 2dc8e3ccc4..9cea9543e4 100644 --- a/extensions/nicknames/src/NicknameFullTextGambit.php +++ b/extensions/nicknames/src/NicknameFullTextFilter.php @@ -14,7 +14,7 @@ use Flarum\User\UserRepository; use Illuminate\Database\Eloquent\Builder; -class NicknameFullTextGambit extends AbstractFulltextFilter +class NicknameFullTextFilter extends AbstractFulltextFilter { public function __construct( protected UserRepository $users diff --git a/extensions/sticky/src/PinStickiedDiscussionsToTop.php b/extensions/sticky/src/PinStickiedDiscussionsToTop.php index 3b4e3a625a..77b44d8028 100755 --- a/extensions/sticky/src/PinStickiedDiscussionsToTop.php +++ b/extensions/sticky/src/PinStickiedDiscussionsToTop.php @@ -11,7 +11,7 @@ use Flarum\Search\SearchCriteria; use Flarum\Search\SearchState; -use Flarum\Tags\Filter\TagFilter; +use Flarum\Tags\Search\Filter\TagFilter; class PinStickiedDiscussionsToTop { diff --git a/extensions/tags/extend.php b/extensions/tags/extend.php index c119b98610..35b6a17ad7 100644 --- a/extensions/tags/extend.php +++ b/extensions/tags/extend.php @@ -24,13 +24,13 @@ use Flarum\Tags\Api\Serializer\TagSerializer; use Flarum\Tags\Content; use Flarum\Tags\Event\DiscussionWasTagged; -use Flarum\Tags\Filter\HideHiddenTagsFromAllDiscussionsPage; -use Flarum\Tags\Filter\PostTagFilter; -use Flarum\Tags\Filter\TagFilter; use Flarum\Tags\Listener; use Flarum\Tags\LoadForumTagsRelationship; use Flarum\Tags\Post\DiscussionTaggedPost; -use Flarum\Tags\Search\Gambit\FulltextGambit; +use Flarum\Tags\Search\Filter\PostTagFilter; +use Flarum\Tags\Search\Filter\TagFilter; +use Flarum\Tags\Search\FulltextFilter; +use Flarum\Tags\Search\HideHiddenTagsFromAllDiscussionsPage; use Flarum\Tags\Search\TagSearcher; use Flarum\Tags\Tag; use Flarum\Tags\Utf8SlugDriver; @@ -142,7 +142,7 @@ ->addSearchMutator(HideHiddenTagsFromAllDiscussionsPage::class), (new Extend\SimpleFlarumSearch(TagSearcher::class)) - ->setFullTextFilter(FullTextGambit::class), + ->setFullTextFilter(FulltextFilter::class), (new Extend\ModelUrl(Tag::class)) ->addSlugDriver('default', Utf8SlugDriver::class), diff --git a/extensions/tags/src/Filter/PostTagFilter.php b/extensions/tags/src/Search/Filter/PostTagFilter.php similarity index 95% rename from extensions/tags/src/Filter/PostTagFilter.php rename to extensions/tags/src/Search/Filter/PostTagFilter.php index edba1ca29f..b694990398 100644 --- a/extensions/tags/src/Filter/PostTagFilter.php +++ b/extensions/tags/src/Search/Filter/PostTagFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Tags\Filter; +namespace Flarum\Tags\Search\Filter; use Flarum\Search\FilterInterface; use Flarum\Search\SearchState; diff --git a/extensions/tags/src/Filter/TagFilter.php b/extensions/tags/src/Search/Filter/TagFilter.php similarity index 98% rename from extensions/tags/src/Filter/TagFilter.php rename to extensions/tags/src/Search/Filter/TagFilter.php index 4e6d15c374..38a6bdc3ee 100644 --- a/extensions/tags/src/Filter/TagFilter.php +++ b/extensions/tags/src/Search/Filter/TagFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Tags\Filter; +namespace Flarum\Tags\Search\Filter; use Flarum\Http\SlugManager; use Flarum\Search\FilterInterface; diff --git a/extensions/tags/src/Search/Gambit/FulltextGambit.php b/extensions/tags/src/Search/FulltextFilter.php similarity index 91% rename from extensions/tags/src/Search/Gambit/FulltextGambit.php rename to extensions/tags/src/Search/FulltextFilter.php index 903f648c2d..af1cf2831a 100644 --- a/extensions/tags/src/Search/Gambit/FulltextGambit.php +++ b/extensions/tags/src/Search/FulltextFilter.php @@ -7,14 +7,14 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Tags\Search\Gambit; +namespace Flarum\Tags\Search; use Flarum\Search\AbstractFulltextFilter; use Flarum\Search\SearchState; use Flarum\Tags\TagRepository; use Illuminate\Database\Eloquent\Builder; -class FulltextGambit extends AbstractFulltextFilter +class FulltextFilter extends AbstractFulltextFilter { public function __construct( protected TagRepository $tags diff --git a/extensions/tags/src/Filter/HideHiddenTagsFromAllDiscussionsPage.php b/extensions/tags/src/Search/HideHiddenTagsFromAllDiscussionsPage.php similarity index 96% rename from extensions/tags/src/Filter/HideHiddenTagsFromAllDiscussionsPage.php rename to extensions/tags/src/Search/HideHiddenTagsFromAllDiscussionsPage.php index bce8df1710..59396c2888 100644 --- a/extensions/tags/src/Filter/HideHiddenTagsFromAllDiscussionsPage.php +++ b/extensions/tags/src/Search/HideHiddenTagsFromAllDiscussionsPage.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Tags\Filter; +namespace Flarum\Tags\Search; use Flarum\Search\SearchCriteria; use Flarum\Search\SearchState; diff --git a/framework/core/src/Discussion/Filter/AuthorFilter.php b/framework/core/src/Discussion/Search/Filter/AuthorFilter.php similarity index 96% rename from framework/core/src/Discussion/Filter/AuthorFilter.php rename to framework/core/src/Discussion/Search/Filter/AuthorFilter.php index 66adcfe709..3d77c73c48 100644 --- a/framework/core/src/Discussion/Filter/AuthorFilter.php +++ b/framework/core/src/Discussion/Search/Filter/AuthorFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Discussion\Filter; +namespace Flarum\Discussion\Search\Filter; use Flarum\Search\FilterInterface; use Flarum\Search\SearchState; diff --git a/framework/core/src/Discussion/Filter/CreatedFilter.php b/framework/core/src/Discussion/Search/Filter/CreatedFilter.php similarity index 97% rename from framework/core/src/Discussion/Filter/CreatedFilter.php rename to framework/core/src/Discussion/Search/Filter/CreatedFilter.php index 53d242f218..3de0d6c516 100644 --- a/framework/core/src/Discussion/Filter/CreatedFilter.php +++ b/framework/core/src/Discussion/Search/Filter/CreatedFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Discussion\Filter; +namespace Flarum\Discussion\Search\Filter; use Flarum\Search\FilterInterface; use Flarum\Search\SearchState; diff --git a/framework/core/src/Discussion/Filter/HiddenFilter.php b/framework/core/src/Discussion/Search/Filter/HiddenFilter.php similarity index 95% rename from framework/core/src/Discussion/Filter/HiddenFilter.php rename to framework/core/src/Discussion/Search/Filter/HiddenFilter.php index 85b1092084..ced42868e7 100644 --- a/framework/core/src/Discussion/Filter/HiddenFilter.php +++ b/framework/core/src/Discussion/Search/Filter/HiddenFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Discussion\Filter; +namespace Flarum\Discussion\Search\Filter; use Flarum\Search\FilterInterface; use Flarum\Search\SearchState; diff --git a/framework/core/src/Discussion/Filter/UnreadFilter.php b/framework/core/src/Discussion/Search/Filter/UnreadFilter.php similarity index 96% rename from framework/core/src/Discussion/Filter/UnreadFilter.php rename to framework/core/src/Discussion/Search/Filter/UnreadFilter.php index 322b103721..a4b442bca7 100644 --- a/framework/core/src/Discussion/Filter/UnreadFilter.php +++ b/framework/core/src/Discussion/Search/Filter/UnreadFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Discussion\Filter; +namespace Flarum\Discussion\Search\Filter; use Flarum\Discussion\DiscussionRepository; use Flarum\Search\FilterInterface; diff --git a/framework/core/src/Discussion/Search/Gambit/FulltextGambit.php b/framework/core/src/Discussion/Search/FulltextFilter.php similarity index 96% rename from framework/core/src/Discussion/Search/Gambit/FulltextGambit.php rename to framework/core/src/Discussion/Search/FulltextFilter.php index 72a8c4744b..3aa4850dbe 100644 --- a/framework/core/src/Discussion/Search/Gambit/FulltextGambit.php +++ b/framework/core/src/Discussion/Search/FulltextFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\Discussion\Search\Gambit; +namespace Flarum\Discussion\Search; use Flarum\Discussion\Discussion; use Flarum\Post\Post; @@ -15,7 +15,7 @@ use Flarum\Search\SearchState; use Illuminate\Database\Query\Expression; -class FulltextGambit extends AbstractFulltextFilter +class FulltextFilter extends AbstractFulltextFilter { public function search(SearchState $state, string $query): void { diff --git a/framework/core/src/Search/SearchServiceProvider.php b/framework/core/src/Search/SearchServiceProvider.php index 295d9e7acd..ea9251b13b 100644 --- a/framework/core/src/Search/SearchServiceProvider.php +++ b/framework/core/src/Search/SearchServiceProvider.php @@ -9,9 +9,9 @@ namespace Flarum\Search; -use Flarum\Discussion\Filter as DiscussionFilter; use Flarum\Discussion\Search\DiscussionSearcher; -use Flarum\Discussion\Search\Gambit\FulltextGambit as DiscussionFulltextFilter; +use Flarum\Discussion\Search\Filter as DiscussionFilter; +use Flarum\Discussion\Search\FulltextFilter as DiscussionFulltextFilter; use Flarum\Foundation\AbstractServiceProvider; use Flarum\Foundation\ContainerUtil; use Flarum\Group\Filter as GroupFilter; @@ -20,8 +20,8 @@ use Flarum\Http\Filter as HttpFilter; use Flarum\Post\Filter as PostFilter; use Flarum\Post\Filter\PostSearcher; -use Flarum\User\Filter as UserFilter; -use Flarum\User\Search\Gambit\FulltextGambit as UserFulltextFilter; +use Flarum\User\Search\Filter as UserFilter; +use Flarum\User\Search\FulltextFilter as UserFulltextFilter; use Flarum\User\Search\UserSearcher; use Illuminate\Contracts\Container\Container; use Illuminate\Support\Arr; diff --git a/framework/core/src/User/Filter/EmailFilter.php b/framework/core/src/User/Search/Filter/EmailFilter.php similarity index 96% rename from framework/core/src/User/Filter/EmailFilter.php rename to framework/core/src/User/Search/Filter/EmailFilter.php index 732f0a1736..dbb9867f72 100644 --- a/framework/core/src/User/Filter/EmailFilter.php +++ b/framework/core/src/User/Search/Filter/EmailFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\User\Filter; +namespace Flarum\User\Search\Filter; use Flarum\Search\FilterInterface; use Flarum\Search\SearchState; diff --git a/framework/core/src/User/Filter/GroupFilter.php b/framework/core/src/User/Search/Filter/GroupFilter.php similarity index 97% rename from framework/core/src/User/Filter/GroupFilter.php rename to framework/core/src/User/Search/Filter/GroupFilter.php index a3dd5a5329..3d9fac9a76 100644 --- a/framework/core/src/User/Filter/GroupFilter.php +++ b/framework/core/src/User/Search/Filter/GroupFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\User\Filter; +namespace Flarum\User\Search\Filter; use Flarum\Group\Group; use Flarum\Search\FilterInterface; diff --git a/framework/core/src/User/Search/Gambit/FulltextGambit.php b/framework/core/src/User/Search/FulltextFilter.php similarity index 91% rename from framework/core/src/User/Search/Gambit/FulltextGambit.php rename to framework/core/src/User/Search/FulltextFilter.php index 5b00f2efd8..f26e8e75b3 100644 --- a/framework/core/src/User/Search/Gambit/FulltextGambit.php +++ b/framework/core/src/User/Search/FulltextFilter.php @@ -7,7 +7,7 @@ * LICENSE file that was distributed with this source code. */ -namespace Flarum\User\Search\Gambit; +namespace Flarum\User\Search; use Flarum\Search\AbstractFulltextFilter; use Flarum\Search\SearchState; @@ -15,7 +15,7 @@ use Flarum\User\UserRepository; use Illuminate\Database\Eloquent\Builder; -class FulltextGambit extends AbstractFulltextFilter +class FulltextFilter extends AbstractFulltextFilter { public function __construct( protected UserRepository $users