From 941c305104c3dc50b48a0e6f361e1cbcb15729bf Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 29 Aug 2026 01:52:31 +0930 Subject: [PATCH] fix: resolve larastan class.notFound errors - Add missing FractalService import to Groups/GroupCommentService and Groups/GroupPostService (wrong namespace resolution) - Update Inbox handler traits to use App\Models\* namespace instead of old App\* references (Status, Profile, DirectMessage, Media, Follower, Like, Instance, Story, User, FollowRequest, Notification, UserFilter, StoryView) - Update HttpClientMigrationTest to use App\Models\* namespace --- app/Services/Groups/GroupCommentService.php | 1 + app/Services/Groups/GroupPostService.php | 1 + .../ActivityPub/Inbox/HandlesAnnouncements.php | 2 +- app/Util/ActivityPub/Inbox/HandlesCreates.php | 14 +++++++------- app/Util/ActivityPub/Inbox/HandlesDeletes.php | 8 ++++---- app/Util/ActivityPub/Inbox/HandlesFlags.php | 6 +++--- app/Util/ActivityPub/Inbox/HandlesFollows.php | 4 ++-- app/Util/ActivityPub/Inbox/HandlesLikes.php | 2 +- app/Util/ActivityPub/Inbox/HandlesStories.php | 8 ++++---- app/Util/ActivityPub/Inbox/HandlesUndos.php | 10 +++++----- app/Util/ActivityPub/Inbox/HandlesUpdates.php | 2 +- app/Util/ActivityPub/Inbox/InboxHelpers.php | 4 ++-- tests/Feature/HttpClientMigrationTest.php | 8 ++++---- 13 files changed, 36 insertions(+), 34 deletions(-) diff --git a/app/Services/Groups/GroupCommentService.php b/app/Services/Groups/GroupCommentService.php index 50fd75af5..1feb5974b 100644 --- a/app/Services/Groups/GroupCommentService.php +++ b/app/Services/Groups/GroupCommentService.php @@ -3,6 +3,7 @@ namespace App\Services\Groups; use App\Models\GroupComment; +use App\Services\FractalService; use App\Transformer\Api\GroupPostTransformer; use Illuminate\Support\Facades\Cache; diff --git a/app/Services/Groups/GroupPostService.php b/app/Services/Groups/GroupPostService.php index 0b7e40e86..8df097ec7 100644 --- a/app/Services/Groups/GroupPostService.php +++ b/app/Services/Groups/GroupPostService.php @@ -4,6 +4,7 @@ namespace App\Services\Groups; use App\Models\Group; use App\Models\GroupPost; +use App\Services\FractalService; use App\Transformer\Api\GroupPostTransformer; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; diff --git a/app/Util/ActivityPub/Inbox/HandlesAnnouncements.php b/app/Util/ActivityPub/Inbox/HandlesAnnouncements.php index 21cdf15a9..2a5b6d62b 100644 --- a/app/Util/ActivityPub/Inbox/HandlesAnnouncements.php +++ b/app/Util/ActivityPub/Inbox/HandlesAnnouncements.php @@ -2,9 +2,9 @@ namespace App\Util\ActivityPub\Inbox; +use App\Models\Status; use App\Services\NotificationService; use App\Services\ReblogService; -use App\Status; use App\Util\ActivityPub\Helpers; trait HandlesAnnouncements diff --git a/app/Util/ActivityPub/Inbox/HandlesCreates.php b/app/Util/ActivityPub/Inbox/HandlesCreates.php index f64f9861d..950a102c0 100644 --- a/app/Util/ActivityPub/Inbox/HandlesCreates.php +++ b/app/Util/ActivityPub/Inbox/HandlesCreates.php @@ -2,22 +2,22 @@ namespace App\Util\ActivityPub\Inbox; -use App\DirectMessage; use App\Jobs\PushNotificationPipeline\MentionPushNotifyPipeline; -use App\Media; use App\Models\Conversation; +use App\Models\DirectMessage; +use App\Models\Media; +use App\Models\Notification; use App\Models\PollVote; -use App\Notification; -use App\Profile; +use App\Models\Profile; +use App\Models\Status; +use App\Models\User; +use App\Models\UserFilter; use App\Services\FollowerService; use App\Services\NotificationAppGatewayService; use App\Services\NotificationService; use App\Services\PollService; use App\Services\PushNotificationService; use App\Services\SanitizeService; -use App\Status; -use App\User; -use App\UserFilter; use App\Util\ActivityPub\Helpers; use Illuminate\Support\Arr; use Illuminate\Support\Str; diff --git a/app/Util/ActivityPub/Inbox/HandlesDeletes.php b/app/Util/ActivityPub/Inbox/HandlesDeletes.php index 387f05121..7862c6ca7 100644 --- a/app/Util/ActivityPub/Inbox/HandlesDeletes.php +++ b/app/Util/ActivityPub/Inbox/HandlesDeletes.php @@ -6,10 +6,10 @@ use App\Jobs\DeletePipeline\DeleteRemoteProfilePipeline; use App\Jobs\HomeFeedPipeline\FeedRemoveRemotePipeline; use App\Jobs\StatusPipeline\RemoteStatusDelete; use App\Jobs\StoryPipeline\StoryExpire; -use App\Notification; -use App\Profile; -use App\Status; -use App\Story; +use App\Models\Notification; +use App\Models\Profile; +use App\Models\Status; +use App\Models\Story; use App\Util\ActivityPub\Helpers; trait HandlesDeletes diff --git a/app/Util/ActivityPub/Inbox/HandlesFlags.php b/app/Util/ActivityPub/Inbox/HandlesFlags.php index 1f038b660..ed68e6898 100644 --- a/app/Util/ActivityPub/Inbox/HandlesFlags.php +++ b/app/Util/ActivityPub/Inbox/HandlesFlags.php @@ -2,11 +2,11 @@ namespace App\Util\ActivityPub\Inbox; -use App\Instance; +use App\Models\Instance; +use App\Models\Profile; use App\Models\RemoteReport; -use App\Profile; +use App\Models\Status; use App\Services\SanitizeService; -use App\Status; use App\Util\ActivityPub\Helpers; trait HandlesFlags diff --git a/app/Util/ActivityPub/Inbox/HandlesFollows.php b/app/Util/ActivityPub/Inbox/HandlesFollows.php index c0019d45b..1987f8ec6 100644 --- a/app/Util/ActivityPub/Inbox/HandlesFollows.php +++ b/app/Util/ActivityPub/Inbox/HandlesFollows.php @@ -2,9 +2,9 @@ namespace App\Util\ActivityPub\Inbox; -use App\Follower; -use App\FollowRequest; use App\Jobs\FollowPipeline\FollowPipeline; +use App\Models\Follower; +use App\Models\FollowRequest; use App\Services\FollowerService; use App\Services\RelationshipService; use App\Util\ActivityPub\Helpers; diff --git a/app/Util/ActivityPub/Inbox/HandlesLikes.php b/app/Util/ActivityPub/Inbox/HandlesLikes.php index b644f3def..634122e00 100644 --- a/app/Util/ActivityPub/Inbox/HandlesLikes.php +++ b/app/Util/ActivityPub/Inbox/HandlesLikes.php @@ -3,7 +3,7 @@ namespace App\Util\ActivityPub\Inbox; use App\Jobs\LikePipeline\LikePipeline; -use App\Like; +use App\Models\Like; use App\Util\ActivityPub\Helpers; trait HandlesLikes diff --git a/app/Util/ActivityPub/Inbox/HandlesStories.php b/app/Util/ActivityPub/Inbox/HandlesStories.php index acfec3c24..d93fb2ce5 100644 --- a/app/Util/ActivityPub/Inbox/HandlesStories.php +++ b/app/Util/ActivityPub/Inbox/HandlesStories.php @@ -2,16 +2,16 @@ namespace App\Util\ActivityPub\Inbox; -use App\DirectMessage; use App\Jobs\StoryPipeline\StoryFetch; use App\Models\Conversation; +use App\Models\DirectMessage; +use App\Models\Status; +use App\Models\Story; +use App\Models\StoryView; use App\Services\FollowerService; use App\Services\NotificationService; use App\Services\SanitizeService; use App\Services\StoryIndexService; -use App\Status; -use App\Story; -use App\StoryView; use App\Util\ActivityPub\Helpers; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; diff --git a/app/Util/ActivityPub/Inbox/HandlesUndos.php b/app/Util/ActivityPub/Inbox/HandlesUndos.php index fd3039404..ee93af1a5 100644 --- a/app/Util/ActivityPub/Inbox/HandlesUndos.php +++ b/app/Util/ActivityPub/Inbox/HandlesUndos.php @@ -2,16 +2,16 @@ namespace App\Util\ActivityPub\Inbox; -use App\Follower; -use App\FollowRequest; use App\Jobs\HomeFeedPipeline\FeedRemoveRemotePipeline; -use App\Like; -use App\Profile; +use App\Models\Follower; +use App\Models\FollowRequest; +use App\Models\Like; +use App\Models\Profile; +use App\Models\Status; use App\Services\FollowerService; use App\Services\ReblogService; use App\Services\RelationshipService; use App\Services\StatusService; -use App\Status; use App\Util\ActivityPub\Helpers; trait HandlesUndos diff --git a/app/Util/ActivityPub/Inbox/HandlesUpdates.php b/app/Util/ActivityPub/Inbox/HandlesUpdates.php index 10f85e98f..fb7b3a06e 100644 --- a/app/Util/ActivityPub/Inbox/HandlesUpdates.php +++ b/app/Util/ActivityPub/Inbox/HandlesUpdates.php @@ -4,7 +4,7 @@ namespace App\Util\ActivityPub\Inbox; use App\Jobs\ProfilePipeline\HandleUpdateActivity; use App\Jobs\StatusPipeline\StatusRemoteUpdatePipeline; -use App\Status; +use App\Models\Status; use App\Util\ActivityPub\Helpers; use App\Util\ActivityPub\Validator\UpdatePersonValidator; diff --git a/app/Util/ActivityPub/Inbox/InboxHelpers.php b/app/Util/ActivityPub/Inbox/InboxHelpers.php index 02d2e0fc4..184c32b83 100644 --- a/app/Util/ActivityPub/Inbox/InboxHelpers.php +++ b/app/Util/ActivityPub/Inbox/InboxHelpers.php @@ -2,8 +2,8 @@ namespace App\Util\ActivityPub\Inbox; -use App\Notification; -use App\Profile; +use App\Models\Notification; +use App\Models\Profile; use App\Services\AccountService; use App\Services\UserFilterService; use App\Util\ActivityPub\Helpers; diff --git a/tests/Feature/HttpClientMigrationTest.php b/tests/Feature/HttpClientMigrationTest.php index eff0d028d..3cf001fcd 100644 --- a/tests/Feature/HttpClientMigrationTest.php +++ b/tests/Feature/HttpClientMigrationTest.php @@ -1,13 +1,13 @@