diff --git a/.circleci/config.yml b/.circleci/config.yml index ba36559bc..c33688f69 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: build: docker: # Specify the version you desire here - - image: cimg/php:8.2.5 + - image: cimg/php:8.3.8 # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b739cd4f..2272b30a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - Update ApiV1Controller, add support for notification filter types ([f61159a1](https://github.com/pixelfed/pixelfed/commit/f61159a1)) - Update ApiV1Dot1Controller, fix mutual api ([a8bb97b2](https://github.com/pixelfed/pixelfed/commit/a8bb97b2)) - Update ApiV1Controller, fix /api/v1/favourits pagination ([72f68160](https://github.com/pixelfed/pixelfed/commit/72f68160)) +- Update RegisterController, update username constraints, require atleast one alpha char ([dd6e3cc2](https://github.com/pixelfed/pixelfed/commit/dd6e3cc2)) +- Update AdminUser, fix entity casting ([cb5620d4](https://github.com/pixelfed/pixelfed/commit/cb5620d4)) +- ([](https://github.com/pixelfed/pixelfed/commit/)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.12.3 (2024-07-01)](https://github.com/pixelfed/pixelfed/compare/v0.12.2...v0.12.3) diff --git a/app/Console/Commands/DeleteRemoteProfile.php b/app/Console/Commands/DeleteRemoteProfile.php new file mode 100644 index 000000000..e5fb741a1 --- /dev/null +++ b/app/Console/Commands/DeleteRemoteProfile.php @@ -0,0 +1,51 @@ + strlen($value) > 2 + ? Profile::whereNotNull('domain')->where('username', 'like', $value.'%')->pluck('username', 'id')->all() + : [] + ); + $profile = Profile::whereNotNull('domain')->find($id); + + if (! $profile) { + $this->error('Could not find profile.'); + exit; + } + + $confirmed = confirm('Are you sure you want to delete '.$profile->username.'\'s account? This action cannot be reversed.'); + DeleteRemoteProfilePipeline::dispatch($profile)->onQueue('adelete'); + $this->info('Dispatched delete job, it may take a few minutes...'); + exit; + } +} diff --git a/app/Http/Controllers/Api/AdminApiController.php b/app/Http/Controllers/Api/AdminApiController.php index 69ba54cee..21a832a76 100644 --- a/app/Http/Controllers/Api/AdminApiController.php +++ b/app/Http/Controllers/Api/AdminApiController.php @@ -2,45 +2,40 @@ namespace App\Http\Controllers\Api; -use Illuminate\Http\Request; +use App\AccountInterstitial; use App\Http\Controllers\Controller; +use App\Http\Resources\AdminInstance; +use App\Http\Resources\AdminUser; +use App\Instance; +use App\Jobs\DeletePipeline\DeleteAccountPipeline; +use App\Jobs\DeletePipeline\DeleteRemoteProfilePipeline; use App\Jobs\StatusPipeline\StatusDelete; -use Auth, Cache, DB; -use Carbon\Carbon; -use App\{ - AccountInterstitial, - Instance, - Like, - Notification, - Media, - Profile, - Report, - Status, - User -}; use App\Models\Conversation; use App\Models\RemoteReport; +use App\Notification; +use App\Profile; +use App\Report; use App\Services\AccountService; use App\Services\AdminStatsService; use App\Services\ConfigCacheService; use App\Services\InstanceService; use App\Services\ModLogService; -use App\Services\SnowflakeService; -use App\Services\StatusService; -use App\Services\PublicTimelineService; use App\Services\NetworkTimelineService; use App\Services\NotificationService; -use App\Http\Resources\AdminInstance; -use App\Http\Resources\AdminUser; -use App\Jobs\DeletePipeline\DeleteAccountPipeline; -use App\Jobs\DeletePipeline\DeleteRemoteProfilePipeline; -use App\Jobs\DeletePipeline\DeleteRemoteStatusPipeline; +use App\Services\PublicTimelineService; +use App\Services\SnowflakeService; +use App\Services\StatusService; +use App\Status; +use App\User; +use Cache; +use DB; +use Illuminate\Http\Request; class AdminApiController extends Controller { public function supported(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); @@ -50,7 +45,7 @@ class AdminApiController extends Controller public function getStats(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); @@ -59,12 +54,13 @@ class AdminApiController extends Controller $res['autospam_count'] = AccountInterstitial::whereType('post.autospam') ->whereNull('appeal_handled_at') ->count(); + return $res; } public function autospam(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); @@ -73,26 +69,27 @@ class AdminApiController extends Controller ->whereNull('appeal_handled_at') ->latest() ->simplePaginate(6) - ->map(function($report) { + ->map(function ($report) { $r = [ 'id' => $report->id, 'type' => $report->type, 'item_id' => $report->item_id, 'item_type' => $report->item_type, - 'created_at' => $report->created_at + 'created_at' => $report->created_at, ]; - if($report->item_type === 'App\\Status') { + if ($report->item_type === 'App\\Status') { $status = StatusService::get($report->item_id, false); - if(!$status) { + if (! $status) { return; } $r['status'] = $status; - if($status['in_reply_to_id']) { + if ($status['in_reply_to_id']) { $r['parent'] = StatusService::get($status['in_reply_to_id'], false); } } + return $r; }); @@ -101,14 +98,14 @@ class AdminApiController extends Controller public function autospamHandle(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:write'), 404); $this->validate($request, [ 'action' => 'required|in:dismiss,approve,dismiss-all,approve-all,delete-post,delete-account', - 'id' => 'required' + 'id' => 'required', ]); $action = $request->input('action'); @@ -122,18 +119,19 @@ class AdminApiController extends Controller $user = $appeal->user; $profile = $user->profile; - if($action == 'dismiss') { + if ($action == 'dismiss') { $appeal->is_spam = true; $appeal->appeal_handled_at = $now; $appeal->save(); - Cache::forget('pf:bouncer_v0:exemption_by_pid:' . $profile->id); - Cache::forget('pf:bouncer_v0:recent_by_pid:' . $profile->id); + Cache::forget('pf:bouncer_v0:exemption_by_pid:'.$profile->id); + Cache::forget('pf:bouncer_v0:recent_by_pid:'.$profile->id); Cache::forget('admin-dash:reports:spam-count'); + return $res; } - if($action == 'delete-post') { + if ($action == 'delete-post') { $appeal->appeal_handled_at = now(); $appeal->is_spam = true; $appeal->save(); @@ -148,10 +146,11 @@ class AdminApiController extends Controller PublicTimelineService::deleteByProfileId($profile->id); StatusDelete::dispatch($appeal->status)->onQueue('high'); Cache::forget('admin-dash:reports:spam-count'); + return $res; } - if($action == 'delete-account') { + if ($action == 'delete-account') { abort_if($user->is_admin, 400, 'Cannot delete an admin account.'); $appeal->appeal_handled_at = now(); $appeal->is_spam = true; @@ -167,22 +166,24 @@ class AdminApiController extends Controller PublicTimelineService::deleteByProfileId($profile->id); DeleteAccountPipeline::dispatch($appeal->user)->onQueue('high'); Cache::forget('admin-dash:reports:spam-count'); + return $res; } - if($action == 'dismiss-all') { + if ($action == 'dismiss-all') { AccountInterstitial::whereType('post.autospam') ->whereItemType('App\Status') ->whereNull('appeal_handled_at') ->whereUserId($appeal->user_id) ->update(['appeal_handled_at' => $now, 'is_spam' => true]); - Cache::forget('pf:bouncer_v0:exemption_by_pid:' . $appeal->user->profile_id); - Cache::forget('pf:bouncer_v0:recent_by_pid:' . $appeal->user->profile_id); + Cache::forget('pf:bouncer_v0:exemption_by_pid:'.$appeal->user->profile_id); + Cache::forget('pf:bouncer_v0:recent_by_pid:'.$appeal->user->profile_id); Cache::forget('admin-dash:reports:spam-count'); + return $res; } - if($action == 'approve') { + if ($action == 'approve') { $status = $appeal->status; $status->is_nsfw = $meta->is_nsfw; $status->scope = 'public'; @@ -198,29 +199,30 @@ class AdminApiController extends Controller Notification::whereAction('autospam.warning') ->whereProfileId($appeal->user->profile_id) ->get() - ->each(function($n) use($appeal) { + ->each(function ($n) use ($appeal) { NotificationService::del($appeal->user->profile_id, $n->id); $n->forceDelete(); }); - Cache::forget('pf:bouncer_v0:exemption_by_pid:' . $appeal->user->profile_id); - Cache::forget('pf:bouncer_v0:recent_by_pid:' . $appeal->user->profile_id); + Cache::forget('pf:bouncer_v0:exemption_by_pid:'.$appeal->user->profile_id); + Cache::forget('pf:bouncer_v0:recent_by_pid:'.$appeal->user->profile_id); Cache::forget('admin-dash:reports:spam-count'); + return $res; } - if($action == 'approve-all') { + if ($action == 'approve-all') { AccountInterstitial::whereType('post.autospam') ->whereItemType('App\Status') ->whereNull('appeal_handled_at') ->whereUserId($appeal->user_id) ->get() - ->each(function($report) use($meta) { + ->each(function ($report) use ($meta) { $report->is_spam = false; $report->appeal_handled_at = now(); $report->save(); $status = Status::find($report->item_id); - if($status) { + if ($status) { $status->is_nsfw = $meta->is_nsfw; $status->scope = 'public'; $status->visibility = 'public'; @@ -231,14 +233,15 @@ class AdminApiController extends Controller Notification::whereAction('autospam.warning') ->whereProfileId($report->user->profile_id) ->get() - ->each(function($n) use($report) { + ->each(function ($n) use ($report) { NotificationService::del($report->user->profile_id, $n->id); $n->forceDelete(); }); }); - Cache::forget('pf:bouncer_v0:exemption_by_pid:' . $appeal->user->profile_id); - Cache::forget('pf:bouncer_v0:recent_by_pid:' . $appeal->user->profile_id); + Cache::forget('pf:bouncer_v0:exemption_by_pid:'.$appeal->user->profile_id); + Cache::forget('pf:bouncer_v0:recent_by_pid:'.$appeal->user->profile_id); Cache::forget('admin-dash:reports:spam-count'); + return $res; } @@ -247,44 +250,48 @@ class AdminApiController extends Controller public function modReports(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); $reports = Report::whereNull('admin_seen') - ->orderBy('created_at','desc') + ->orderBy('created_at', 'desc') ->paginate(6) - ->map(function($report) { + ->map(function ($report) { $r = [ 'id' => $report->id, 'type' => $report->type, 'message' => $report->message, 'object_id' => $report->object_id, 'object_type' => $report->object_type, - 'created_at' => $report->created_at + 'created_at' => $report->created_at, ]; - if($report->profile_id) { + if ($report->profile_id) { $r['reported_by_account'] = AccountService::get($report->profile_id, true); } - if($report->object_type === 'App\\Status') { + if ($report->object_type === 'App\\Status') { $status = StatusService::get($report->object_id, false); - if(!$status) { + if (! $status) { return; } $r['status'] = $status; - if($status['in_reply_to_id']) { + if (isset($status['in_reply_to_id'])) { $r['parent'] = StatusService::get($status['in_reply_to_id'], false); } } - if($report->object_type === 'App\\Profile') { - $r['account'] = AccountService::get($report->object_id, false); + if ($report->object_type === 'App\\Profile') { + $acct = AccountService::get($report->object_id, true); + if ($acct) { + $r['account'] = $acct; + } } + return $r; }) ->filter() @@ -295,14 +302,14 @@ class AdminApiController extends Controller public function modReportHandle(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:write'), 404); $this->validate($request, [ - 'action' => 'required|string', - 'id' => 'required' + 'action' => 'required|string', + 'id' => 'required', ]); $action = $request->input('action'); @@ -311,10 +318,10 @@ class AdminApiController extends Controller $actions = [ 'ignore', 'cw', - 'unlist' + 'unlist', ]; - if (!in_array($action, $actions)) { + if (! in_array($action, $actions)) { return abort(403); } @@ -355,7 +362,7 @@ class AdminApiController extends Controller public function getConfiguration(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); @@ -366,42 +373,43 @@ class AdminApiController extends Controller [ 'name' => 'ActivityPub Federation', 'description' => 'Enable activitypub federation support, compatible with Pixelfed, Mastodon and other platforms.', - 'key' => 'federation.activitypub.enabled' + 'key' => 'federation.activitypub.enabled', ], [ 'name' => 'Open Registration', 'description' => 'Allow new account registrations.', - 'key' => 'pixelfed.open_registration' + 'key' => 'pixelfed.open_registration', ], [ 'name' => 'Stories', 'description' => 'Enable the ephemeral Stories feature.', - 'key' => 'instance.stories.enabled' + 'key' => 'instance.stories.enabled', ], [ 'name' => 'Require Email Verification', 'description' => 'Require new accounts to verify their email address.', - 'key' => 'pixelfed.enforce_email_verification' + 'key' => 'pixelfed.enforce_email_verification', ], [ 'name' => 'AutoSpam Detection', 'description' => 'Detect and remove spam from public timelines.', - 'key' => 'pixelfed.bouncer.enabled' + 'key' => 'pixelfed.bouncer.enabled', ], ]) - ->map(function($s) { - $s['state'] = (bool) config_cache($s['key']); - return $s; - }); + ->map(function ($s) { + $s['state'] = (bool) config_cache($s['key']); + + return $s; + }); } public function updateConfiguration(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:write'), 404); @@ -410,7 +418,7 @@ class AdminApiController extends Controller $this->validate($request, [ 'key' => 'required', - 'value' => 'required' + 'value' => 'required', ]); $allowedKeys = [ @@ -423,50 +431,51 @@ class AdminApiController extends Controller $key = $request->input('key'); $value = (bool) filter_var($request->input('value'), FILTER_VALIDATE_BOOLEAN); - abort_if(!in_array($key, $allowedKeys), 400, 'Invalid cache key.'); + abort_if(! in_array($key, $allowedKeys), 400, 'Invalid cache key.'); ConfigCacheService::put($key, $value); - return collect([ + return collect([ [ 'name' => 'ActivityPub Federation', 'description' => 'Enable activitypub federation support, compatible with Pixelfed, Mastodon and other platforms.', - 'key' => 'federation.activitypub.enabled' + 'key' => 'federation.activitypub.enabled', ], [ 'name' => 'Open Registration', 'description' => 'Allow new account registrations.', - 'key' => 'pixelfed.open_registration' + 'key' => 'pixelfed.open_registration', ], [ 'name' => 'Stories', 'description' => 'Enable the ephemeral Stories feature.', - 'key' => 'instance.stories.enabled' + 'key' => 'instance.stories.enabled', ], [ 'name' => 'Require Email Verification', 'description' => 'Require new accounts to verify their email address.', - 'key' => 'pixelfed.enforce_email_verification' + 'key' => 'pixelfed.enforce_email_verification', ], [ 'name' => 'AutoSpam Detection', 'description' => 'Detect and remove spam from public timelines.', - 'key' => 'pixelfed.bouncer.enabled' + 'key' => 'pixelfed.bouncer.enabled', ], ]) - ->map(function($s) { - $s['state'] = (bool) config_cache($s['key']); - return $s; - }); + ->map(function ($s) { + $s['state'] = (bool) config_cache($s['key']); + + return $s; + }); } public function getUsers(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); @@ -477,27 +486,29 @@ class AdminApiController extends Controller $q = $request->input('q'); $sort = $request->input('sort', 'desc') === 'asc' ? 'asc' : 'desc'; $res = User::whereNull('status') - ->when($q, function($query, $q) { - return $query->where('username', 'like', '%' . $q . '%'); + ->when($q, function ($query, $q) { + return $query->where('username', 'like', '%'.$q.'%'); }) ->orderBy('id', $sort) ->cursorPaginate(10); + return AdminUser::collection($res); } public function getUser(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); $id = $request->input('user_id'); - $key = 'pf-admin-api:getUser:byId:' . $id; - if($request->has('refresh')) { + $key = 'pf-admin-api:getUser:byId:'.$id; + if ($request->has('refresh')) { Cache::forget($key); } - return Cache::remember($key, 86400, function() use($id) { + + return Cache::remember($key, 86400, function () use ($id) { $user = User::findOrFail($id); $profile = $user->profile; $account = AccountService::get($user->profile_id, true); @@ -510,8 +521,8 @@ class AdminApiController extends Controller 'moderation' => [ 'unlisted' => (bool) $profile->unlisted, 'cw' => (bool) $profile->cw, - 'no_autolink' => (bool) $profile->no_autolink - ] + 'no_autolink' => (bool) $profile->no_autolink, + ], ]]); return $res; @@ -520,7 +531,7 @@ class AdminApiController extends Controller public function userAdminAction(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:write'), 404); @@ -528,7 +539,7 @@ class AdminApiController extends Controller $this->validate($request, [ 'id' => 'required', 'action' => 'required|in:unlisted,cw,no_autolink,refresh_stats,verify_email,delete', - 'value' => 'sometimes' + 'value' => 'sometimes', ]); $id = $request->input('id'); @@ -538,8 +549,8 @@ class AdminApiController extends Controller abort_if($user->is_admin == true && $action !== 'refresh_stats', 400, 'Cannot moderate admin accounts'); - if($action === 'delete') { - if(config('pixelfed.account_deletion') == false) { + if ($action === 'delete') { + if (config('pixelfed.account_deletion') == false) { abort(404); } @@ -567,7 +578,7 @@ class AdminApiController extends Controller PublicTimelineService::deleteByProfileId($profile->id); NetworkTimelineService::deleteByProfileId($profile->id); - if($profile->user_id) { + if ($profile->user_id) { DB::table('oauth_access_tokens')->whereUserId($user->id)->delete(); DB::table('oauth_auth_codes')->whereUserId($user->id)->delete(); $user->email = $user->id; @@ -586,11 +597,12 @@ class AdminApiController extends Controller AccountService::del($profile->id); DeleteRemoteProfilePipeline::dispatch($profile)->onQueue('high'); } + return [ 'status' => 200, 'msg' => 'deleted', ]; - } else if($action === 'refresh_stats') { + } elseif ($action === 'refresh_stats') { $profile->following_count = DB::table('followers')->whereProfileId($user->profile_id)->count(); $profile->followers_count = DB::table('followers')->whereFollowingId($user->profile_id)->count(); $statusCount = Status::whereProfileId($user->profile_id) @@ -600,7 +612,7 @@ class AdminApiController extends Controller ->count(); $profile->status_count = $statusCount; $profile->save(); - } else if($action === 'verify_email') { + } elseif ($action === 'verify_email') { $user->email_verified_at = now(); $user->save(); @@ -612,11 +624,11 @@ class AdminApiController extends Controller ->action('admin.user.moderate') ->metadata([ 'action' => 'Manually verified email address', - 'message' => 'Success!' + 'message' => 'Success!', ]) ->accessLevel('admin') ->save(); - } else if($action === 'unlisted') { + } elseif ($action === 'unlisted') { ModLogService::boot() ->objectUid($profile->id) ->objectId($profile->id) @@ -625,13 +637,13 @@ class AdminApiController extends Controller ->action('admin.user.moderate') ->metadata([ 'action' => $action, - 'message' => 'Success!' + 'message' => 'Success!', ]) ->accessLevel('admin') ->save(); - $profile->unlisted = !$profile->unlisted; + $profile->unlisted = ! $profile->unlisted; $profile->save(); - } else if($action === 'cw') { + } elseif ($action === 'cw') { ModLogService::boot() ->objectUid($profile->id) ->objectId($profile->id) @@ -640,13 +652,13 @@ class AdminApiController extends Controller ->action('admin.user.moderate') ->metadata([ 'action' => $action, - 'message' => 'Success!' + 'message' => 'Success!', ]) ->accessLevel('admin') ->save(); - $profile->cw = !$profile->cw; + $profile->cw = ! $profile->cw; $profile->save(); - } else if($action === 'no_autolink') { + } elseif ($action === 'no_autolink') { ModLogService::boot() ->objectUid($profile->id) ->objectId($profile->id) @@ -655,11 +667,11 @@ class AdminApiController extends Controller ->action('admin.user.moderate') ->metadata([ 'action' => $action, - 'message' => 'Success!' + 'message' => 'Success!', ]) ->accessLevel('admin') ->save(); - $profile->no_autolink = !$profile->no_autolink; + $profile->no_autolink = ! $profile->no_autolink; $profile->save(); } else { $profile->{$action} = filter_var($request->input('value'), FILTER_VALIDATE_BOOLEAN); @@ -673,7 +685,7 @@ class AdminApiController extends Controller ->action('admin.user.moderate') ->metadata([ 'action' => $action, - 'message' => 'Success!' + 'message' => 'Success!', ]) ->accessLevel('admin') ->save(); @@ -687,14 +699,14 @@ class AdminApiController extends Controller 'moderation' => [ 'unlisted' => (bool) $profile->unlisted, 'cw' => (bool) $profile->cw, - 'no_autolink' => (bool) $profile->no_autolink - ] + 'no_autolink' => (bool) $profile->no_autolink, + ], ]]); } public function instances(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:write'), 404); @@ -711,19 +723,19 @@ class AdminApiController extends Controller $sortBy = $request->input('sort_by', 'id'); $filter = $request->input('filter'); - $res = Instance::when($q, function($query, $q) { - return $query->where('domain', 'like', '%' . $q . '%'); - }) - ->when($filter, function($query, $filter) { - if($filter === 'all') { + $res = Instance::when($q, function ($query, $q) { + return $query->where('domain', 'like', '%'.$q.'%'); + }) + ->when($filter, function ($query, $filter) { + if ($filter === 'all') { return $query; } else { return $query->where($filter, true); } }) - ->when($sortBy, function($query, $sortBy) use($sort) { + ->when($sortBy, function ($query, $sortBy) use ($sort) { return $query->orderBy($sortBy, $sort); - }, function($query) { + }, function ($query) { return $query->orderBy('id', 'desc'); }) ->cursorPaginate(10) @@ -734,7 +746,7 @@ class AdminApiController extends Controller public function getInstance(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); @@ -747,7 +759,7 @@ class AdminApiController extends Controller public function moderateInstance(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:write'), 404); @@ -755,7 +767,7 @@ class AdminApiController extends Controller $this->validate($request, [ 'id' => 'required', 'key' => 'required|in:unlisted,auto_cw,banned', - 'value' => 'required' + 'value' => 'required', ]); $id = $request->input('id'); @@ -773,7 +785,7 @@ class AdminApiController extends Controller public function refreshInstanceStats(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin == 1, 404); abort_unless($request->user()->tokenCan('admin:write'), 404); @@ -793,51 +805,51 @@ class AdminApiController extends Controller public function getAllStats(Request $request) { - abort_if(!$request->user() || !$request->user()->token(), 404); + abort_if(! $request->user() || ! $request->user()->token(), 404); abort_unless($request->user()->is_admin === 1, 404); abort_unless($request->user()->tokenCan('admin:read'), 404); - if($request->has('refresh')) { + if ($request->has('refresh')) { Cache::forget('admin-api:instance-all-stats-v1'); } - return Cache::remember('admin-api:instance-all-stats-v1', 1209600, function() { + return Cache::remember('admin-api:instance-all-stats-v1', 1209600, function () { $days = range(1, 7); $res = [ 'cached_at' => now()->format('c'), ]; $minStatusId = SnowflakeService::byDate(now()->subDays(7)); - foreach($days as $day) { + foreach ($days as $day) { $label = now()->subDays($day)->format('D'); $labelShort = substr($label, 0, 1); $res['users']['days'][] = [ 'date' => now()->subDays($day)->format('M j Y'), 'label_full' => $label, 'label' => $labelShort, - 'count' => User::whereDate('created_at', now()->subDays($day))->count() + 'count' => User::whereDate('created_at', now()->subDays($day))->count(), ]; $res['posts']['days'][] = [ 'date' => now()->subDays($day)->format('M j Y'), 'label_full' => $label, 'label' => $labelShort, - 'count' => Status::whereNull('uri')->where('id', '>', $minStatusId)->whereDate('created_at', now()->subDays($day))->count() + 'count' => Status::whereNull('uri')->where('id', '>', $minStatusId)->whereDate('created_at', now()->subDays($day))->count(), ]; $res['instances']['days'][] = [ 'date' => now()->subDays($day)->format('M j Y'), 'label_full' => $label, 'label' => $labelShort, - 'count' => Instance::whereDate('created_at', now()->subDays($day))->count() + 'count' => Instance::whereDate('created_at', now()->subDays($day))->count(), ]; } $res['users']['total'] = DB::table('users')->count(); $res['users']['min'] = collect($res['users']['days'])->min('count'); $res['users']['max'] = collect($res['users']['days'])->max('count'); - $res['users']['change'] = collect($res['users']['days'])->sum('count');; + $res['users']['change'] = collect($res['users']['days'])->sum('count'); $res['posts']['total'] = DB::table('statuses')->whereNull('uri')->count(); $res['posts']['min'] = collect($res['posts']['days'])->min('count'); $res['posts']['max'] = collect($res['posts']['days'])->max('count'); diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 3e45ec9e1..fce3e20ed 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -3805,11 +3805,11 @@ class ApiV1Controller extends Controller return false; } } - if ($i['visibility'] === 'private') { - if ((int) $i['account']['id'] !== $pid) { - return FollowerService::follows($pid, $i['account']['id'], true); - } - } + // if ($i['visibility'] === 'private') { + // if ((int) $i['account']['id'] !== $pid) { + // return FollowerService::follows($pid, $i['account']['id'], true); + // } + // } if ($onlyMedia == true) { if (! isset($i['media_attachments']) || ! count($i['media_attachments'])) { return false; diff --git a/app/Http/Resources/AdminUser.php b/app/Http/Resources/AdminUser.php index 75bac9f62..390c5c00e 100644 --- a/app/Http/Resources/AdminUser.php +++ b/app/Http/Resources/AdminUser.php @@ -2,8 +2,8 @@ namespace App\Http\Resources; -use Illuminate\Http\Resources\Json\JsonResource; use App\Services\AccountService; +use Illuminate\Http\Resources\Json\JsonResource; class AdminUser extends JsonResource { @@ -18,8 +18,8 @@ class AdminUser extends JsonResource $account = AccountService::get($this->profile_id, true); $res = [ - 'id' => $this->id, - 'profile_id' => $this->profile_id, + 'id' => (string) $this->id, + 'profile_id' => (string) $this->profile_id, 'name' => $this->name, 'username' => $this->username, 'is_admin' => (bool) $this->is_admin, @@ -28,17 +28,18 @@ class AdminUser extends JsonResource 'two_factor_enabled' => (bool) $this->{'2fa_enabled'}, 'register_source' => $this->register_source, 'app_register_ip' => $this->app_register_ip, + 'has_interstitial' => (bool) $this->has_interstitial, 'last_active_at' => $this->last_active_at, 'created_at' => $this->created_at, ]; - if($account) { + if ($account) { $res['avatar'] = $account['avatar']; $res['bio'] = $account['note_text']; - $res['statuses_count'] = $account['statuses_count']; - $res['following_count'] = $account['following_count']; - $res['followers_count'] = $account['followers_count']; - $res['is_private'] = $account['locked']; + $res['statuses_count'] = (int) $account['statuses_count']; + $res['following_count'] = (int) $account['following_count']; + $res['followers_count'] = (int) $account['followers_count']; + $res['is_private'] = (bool) $account['locked']; } return $res; diff --git a/app/Jobs/StatusPipeline/RemoteStatusDelete.php b/app/Jobs/StatusPipeline/RemoteStatusDelete.php index a81607755..65b72c104 100644 --- a/app/Jobs/StatusPipeline/RemoteStatusDelete.php +++ b/app/Jobs/StatusPipeline/RemoteStatusDelete.php @@ -109,7 +109,7 @@ class RemoteStatusDelete implements ShouldQueue, ShouldBeUniqueUntilProcessing } StatusService::del($status->id, true); - AccountStatService::decrementPostCount($status->profile_id); + // AccountStatService::decrementPostCount($status->profile_id); return $this->unlinkRemoveMedia($status); } @@ -176,11 +176,11 @@ class RemoteStatusDelete implements ShouldQueue, ShouldBeUniqueUntilProcessing StatusView::whereStatusId($status->id)->delete(); Status::whereInReplyToId($status->id)->update(['in_reply_to_id' => null]); - $status->delete(); - StatusService::del($status->id, true); AccountService::del($status->profile_id); + $status->forceDelete(); + return 1; } } diff --git a/app/User.php b/app/User.php index a39f650be..6ec31e969 100644 --- a/app/User.php +++ b/app/User.php @@ -8,10 +8,13 @@ use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use App\Util\RateLimit\User as UserRateLimit; use App\Services\AvatarService; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use NotificationChannels\WebPush\HasPushSubscriptions; +use NotificationChannels\Expo\ExpoPushToken; class User extends Authenticatable { - use Notifiable, SoftDeletes, HasApiTokens, UserRateLimit; + use Notifiable, SoftDeletes, HasApiTokens, UserRateLimit, HasFactory, HasPushSubscriptions; /** * The attributes that should be mutated to dates. @@ -23,6 +26,7 @@ class User extends Authenticatable 'email_verified_at' => 'datetime', '2fa_setup_at' => 'datetime', 'last_active_at' => 'datetime', + 'expo_token' => ExpoPushToken::class ]; /** @@ -115,4 +119,8 @@ class User extends Authenticatable return AvatarService::get($this->profile_id); } + public function routeNotificationForExpo(): ?ExpoPushToken + { + return $this->expo_token; + } } diff --git a/composer.json b/composer.json index 24112cbf9..de544cb59 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ "doctrine/dbal": "^3.0", "intervention/image": "^2.4", "jenssegers/agent": "^2.6", + "laravel-notification-channels/expo": "^1.3.0|^2.0", "laravel-notification-channels/webpush": "^8.0", "laravel/framework": "^11.0", "laravel/helpers": "^1.1", diff --git a/composer.lock b/composer.lock index 12fde064d..1f8509874 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "55dc6d48024fd1d158f8777eda3ea624", + "content-hash": "fbadeaf1fbbd9e0f64feaa1433ca7dd0", "packages": [ { "name": "aws/aws-crt-php", @@ -62,16 +62,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.315.2", + "version": "3.316.3", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "0d9911bf67e0f2c4b6965d7f10840b11f323e6b2" + "reference": "e832e594b3c213760e067e15ef2739f77505e832" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0d9911bf67e0f2c4b6965d7f10840b11f323e6b2", - "reference": "0d9911bf67e0f2c4b6965d7f10840b11f323e6b2", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e832e594b3c213760e067e15ef2739f77505e832", + "reference": "e832e594b3c213760e067e15ef2739f77505e832", "shasum": "" }, "require": { @@ -151,9 +151,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.315.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.316.3" }, - "time": "2024-06-28T19:07:22+00:00" + "time": "2024-07-12T18:07:23+00:00" }, { "name": "bacon/bacon-qr-code", @@ -524,16 +524,16 @@ }, { "name": "dflydev/dot-access-data", - "version": "v3.0.2", + "version": "v3.0.3", "source": { "type": "git", "url": "https://github.com/dflydev/dflydev-dot-access-data.git", - "reference": "f41715465d65213d644d3141a6a93081be5d3549" + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", - "reference": "f41715465d65213d644d3141a6a93081be5d3549", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f", "shasum": "" }, "require": { @@ -593,9 +593,9 @@ ], "support": { "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", - "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3" }, - "time": "2022-10-27T11:44:00+00:00" + "time": "2024-07-08T12:26:09+00:00" }, { "name": "doctrine/cache", @@ -1557,24 +1557,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "autoload": { @@ -1603,7 +1603,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -1615,26 +1615,26 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:16:48+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "version": "7.9.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a629e5b69db96eb4939c1b34114130077dd4c6fc", + "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1645,9 +1645,9 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1725,7 +1725,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/guzzle/guzzle/tree/7.9.1" }, "funding": [ { @@ -1741,20 +1741,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2024-07-19T16:19:57+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { @@ -1762,7 +1762,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -1808,7 +1808,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "source": "https://github.com/guzzle/promises/tree/2.0.3" }, "funding": [ { @@ -1824,20 +1824,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:19:20+00:00" + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "shasum": "" }, "require": { @@ -1852,8 +1852,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -1924,7 +1924,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.7.0" }, "funding": [ { @@ -1940,7 +1940,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-07-18T11:15:46+00:00" }, { "name": "guzzlehttp/uri-template", @@ -2247,6 +2247,65 @@ ], "time": "2020-06-13T08:05:20+00:00" }, + { + "name": "laravel-notification-channels/expo", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/laravel-notification-channels/expo.git", + "reference": "d718a89dfc4997aba69b673f5db416ac833188e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel-notification-channels/expo/zipball/d718a89dfc4997aba69b673f5db416ac833188e9", + "reference": "d718a89dfc4997aba69b673f5db416ac833188e9", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/guzzle": "~6.0 || ~7.0", + "illuminate/notifications": "~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0 || ~11.0", + "illuminate/support": "~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0 || ~11.0", + "php": ">=7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^6.18", + "phpunit/phpunit": "^8.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NotificationChannels\\Expo\\ExpoServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "NotificationChannels\\Expo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nick Pratley", + "email": "nick@npratley.net", + "homepage": "https://npratley.net/", + "role": "Developer" + } + ], + "description": "Expo Notifications driver for Laravel", + "homepage": "https://github.com/laravel-notification-channels/expo", + "support": { + "issues": "https://github.com/laravel-notification-channels/expo/issues", + "source": "https://github.com/laravel-notification-channels/expo/tree/1.3.1" + }, + "time": "2024-03-15T00:24:58+00:00" + }, { "name": "laravel-notification-channels/webpush", "version": "8.0.0", @@ -2307,16 +2366,16 @@ }, { "name": "laravel/framework", - "version": "v11.13.0", + "version": "v11.16.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "92deaa4f037ff100e36809443811301819a8cf84" + "reference": "bd4808aaf103ccb5cb4b00bcee46140c070c0ec4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/92deaa4f037ff100e36809443811301819a8cf84", - "reference": "92deaa4f037ff100e36809443811301819a8cf84", + "url": "https://api.github.com/repos/laravel/framework/zipball/bd4808aaf103ccb5cb4b00bcee46140c070c0ec4", + "reference": "bd4808aaf103ccb5cb4b00bcee46140c070c0ec4", "shasum": "" }, "require": { @@ -2369,6 +2428,7 @@ }, "provide": { "psr/container-implementation": "1.1|2.0", + "psr/log-implementation": "1.0|2.0|3.0", "psr/simple-cache-implementation": "1.0|2.0|3.0" }, "replace": { @@ -2421,7 +2481,7 @@ "nyholm/psr7": "^1.2", "orchestra/testbench-core": "^9.1.5", "pda/pheanstalk": "^5.0", - "phpstan/phpstan": "^1.4.7", + "phpstan/phpstan": "^1.11.5", "phpunit/phpunit": "^10.5|^11.0", "predis/predis": "^2.0.2", "resend/resend-php": "^0.10.0", @@ -2508,7 +2568,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-27T09:04:50+00:00" + "time": "2024-07-16T14:33:07+00:00" }, { "name": "laravel/helpers", @@ -2569,16 +2629,16 @@ }, { "name": "laravel/horizon", - "version": "v5.24.5", + "version": "v5.25.0", "source": { "type": "git", "url": "https://github.com/laravel/horizon.git", - "reference": "3c359e3a9ebd3e3be012a15eedf2d64ef8b82540" + "reference": "81e62cee5b3feaf169d683b8890e33bf454698ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/horizon/zipball/3c359e3a9ebd3e3be012a15eedf2d64ef8b82540", - "reference": "3c359e3a9ebd3e3be012a15eedf2d64ef8b82540", + "url": "https://api.github.com/repos/laravel/horizon/zipball/81e62cee5b3feaf169d683b8890e33bf454698ab", + "reference": "81e62cee5b3feaf169d683b8890e33bf454698ab", "shasum": "" }, "require": { @@ -2642,9 +2702,9 @@ ], "support": { "issues": "https://github.com/laravel/horizon/issues", - "source": "https://github.com/laravel/horizon/tree/v5.24.5" + "source": "https://github.com/laravel/horizon/tree/v5.25.0" }, - "time": "2024-05-31T16:18:41+00:00" + "time": "2024-07-05T16:46:31+00:00" }, { "name": "laravel/passport", @@ -4209,16 +4269,16 @@ }, { "name": "nesbot/carbon", - "version": "3.6.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "39c8ef752db6865717cc3fba63970c16f057982c" + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/39c8ef752db6865717cc3fba63970c16f057982c", - "reference": "39c8ef752db6865717cc3fba63970c16f057982c", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cb4374784c87d0a0294e8513a52eb63c0aff3139", + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139", "shasum": "" }, "require": { @@ -4311,7 +4371,7 @@ "type": "tidelift" } ], - "time": "2024-06-20T15:52:59+00:00" + "time": "2024-07-16T22:29:20+00:00" }, { "name": "nette/schema", @@ -4463,16 +4523,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.0.2", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { @@ -4483,7 +4543,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -4515,9 +4575,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2024-07-01T20:03:41+00:00" }, { "name": "nunomaduro/termwind", @@ -5057,16 +5117,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -5074,13 +5134,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -5116,7 +5176,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -5128,7 +5188,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T21:59:55+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "phpseclib/phpseclib", @@ -9844,23 +9904,23 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.6.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.2", + "graham-campbell/result-type": "^1.1.3", "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2", + "phpoption/phpoption": "^1.9.3", "symfony/polyfill-ctype": "^1.24", "symfony/polyfill-mbstring": "^1.24", "symfony/polyfill-php80": "^1.24" @@ -9877,7 +9937,7 @@ "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "5.6-dev" @@ -9912,7 +9972,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -9924,7 +9984,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:43:29+00:00" + "time": "2024-07-20T21:52:34+00:00" }, { "name": "voku/portable-ascii", @@ -10626,16 +10686,16 @@ }, { "name": "laravel/pint", - "version": "v1.16.1", + "version": "v1.16.2", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "9266a47f1b9231b83e0cfd849009547329d871b1" + "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/9266a47f1b9231b83e0cfd849009547329d871b1", - "reference": "9266a47f1b9231b83e0cfd849009547329d871b1", + "url": "https://api.github.com/repos/laravel/pint/zipball/51f1ba679a6afe0315621ad143d788bd7ded0eca", + "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca", "shasum": "" }, "require": { @@ -10688,7 +10748,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-06-18T16:50:05+00:00" + "time": "2024-07-09T15:58:08+00:00" }, { "name": "laravel/telescope", @@ -10904,38 +10964,38 @@ }, { "name": "nunomaduro/collision", - "version": "v8.1.1", + "version": "v8.3.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9" + "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/13e5d538b95a744d85f447a321ce10adb28e9af9", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b49f5b2891ce52726adfd162841c69d4e4c84229", + "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229", "shasum": "" }, "require": { "filp/whoops": "^2.15.4", "nunomaduro/termwind": "^2.0.1", "php": "^8.2.0", - "symfony/console": "^7.0.4" + "symfony/console": "^7.1.2" }, "conflict": { "laravel/framework": "<11.0.0 || >=12.0.0", "phpunit/phpunit": "<10.5.1 || >=12.0.0" }, "require-dev": { - "larastan/larastan": "^2.9.2", - "laravel/framework": "^11.0.0", - "laravel/pint": "^1.14.0", - "laravel/sail": "^1.28.2", - "laravel/sanctum": "^4.0.0", + "larastan/larastan": "^2.9.8", + "laravel/framework": "^11.16.0", + "laravel/pint": "^1.16.2", + "laravel/sail": "^1.30.2", + "laravel/sanctum": "^4.0.2", "laravel/tinker": "^2.9.0", - "orchestra/testbench-core": "^9.0.0", - "pestphp/pest": "^2.34.1 || ^3.0.0", - "sebastian/environment": "^6.0.1 || ^7.0.0" + "orchestra/testbench-core": "^9.2.1", + "pestphp/pest": "^2.34.9 || ^3.0.0", + "sebastian/environment": "^6.1.0 || ^7.0.0" }, "type": "library", "extra": { @@ -10997,7 +11057,7 @@ "type": "patreon" } ], - "time": "2024-03-06T16:20:09+00:00" + "time": "2024-07-16T22:41:01+00:00" }, { "name": "phar-io/manifest", @@ -11119,16 +11179,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "11.0.4", + "version": "11.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "4dc2b7a606073f0fb80da09842ffb068b627c38f" + "reference": "19b6365ab8b59a64438c0c3f4241feeb480c9861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4dc2b7a606073f0fb80da09842ffb068b627c38f", - "reference": "4dc2b7a606073f0fb80da09842ffb068b627c38f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/19b6365ab8b59a64438c0c3f4241feeb480c9861", + "reference": "19b6365ab8b59a64438c0c3f4241feeb480c9861", "shasum": "" }, "require": { @@ -11185,7 +11245,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.4" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.5" }, "funding": [ { @@ -11193,20 +11253,20 @@ "type": "github" } ], - "time": "2024-06-29T08:26:25+00:00" + "time": "2024-07-03T05:05:37+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "99e95c94ad9500daca992354fa09d7b99abe2210" + "reference": "6ed896bf50bbbfe4d504a33ed5886278c78e4a26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/99e95c94ad9500daca992354fa09d7b99abe2210", - "reference": "99e95c94ad9500daca992354fa09d7b99abe2210", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6ed896bf50bbbfe4d504a33ed5886278c78e4a26", + "reference": "6ed896bf50bbbfe4d504a33ed5886278c78e4a26", "shasum": "" }, "require": { @@ -11246,7 +11306,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.0.1" }, "funding": [ { @@ -11254,20 +11314,20 @@ "type": "github" } ], - "time": "2024-02-02T06:05:04+00:00" + "time": "2024-07-03T05:06:37+00:00" }, { "name": "phpunit/php-invoker", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5d8d9355a16d8cc5a1305b0a85342cfa420612be" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5d8d9355a16d8cc5a1305b0a85342cfa420612be", - "reference": "5d8d9355a16d8cc5a1305b0a85342cfa420612be", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { @@ -11310,7 +11370,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -11318,20 +11378,20 @@ "type": "github" } ], - "time": "2024-02-02T06:05:50+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "d38f6cbff1cdb6f40b03c9811421561668cc133e" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/d38f6cbff1cdb6f40b03c9811421561668cc133e", - "reference": "d38f6cbff1cdb6f40b03c9811421561668cc133e", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { @@ -11370,7 +11430,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -11378,20 +11438,20 @@ "type": "github" } ], - "time": "2024-02-02T06:06:56+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "7.0.0", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8a59d9e25720482ee7fcdf296595e08795b84dc5" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8a59d9e25720482ee7fcdf296595e08795b84dc5", - "reference": "8a59d9e25720482ee7fcdf296595e08795b84dc5", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { @@ -11430,7 +11490,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.0" + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -11438,20 +11498,20 @@ "type": "github" } ], - "time": "2024-02-02T06:08:01+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "11.2.5", + "version": "11.2.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "be9e3ed32a1287a9bfda15936cc86fef4e4cf591" + "reference": "a7a29e8d3113806f18f99d670f580a30e8ffff39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/be9e3ed32a1287a9bfda15936cc86fef4e4cf591", - "reference": "be9e3ed32a1287a9bfda15936cc86fef4e4cf591", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a7a29e8d3113806f18f99d670f580a30e8ffff39", + "reference": "a7a29e8d3113806f18f99d670f580a30e8ffff39", "shasum": "" }, "require": { @@ -11461,25 +11521,25 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0", - "phpunit/php-file-iterator": "^5.0", - "phpunit/php-invoker": "^5.0", - "phpunit/php-text-template": "^4.0", - "phpunit/php-timer": "^7.0", - "sebastian/cli-parser": "^3.0", - "sebastian/code-unit": "^3.0", - "sebastian/comparator": "^6.0", - "sebastian/diff": "^6.0", - "sebastian/environment": "^7.0", - "sebastian/exporter": "^6.1.2", - "sebastian/global-state": "^7.0", - "sebastian/object-enumerator": "^6.0", - "sebastian/type": "^5.0", - "sebastian/version": "^5.0" + "phpunit/php-code-coverage": "^11.0.5", + "phpunit/php-file-iterator": "^5.0.1", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.1", + "sebastian/comparator": "^6.0.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.1.3", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.0.1", + "sebastian/version": "^5.0.1" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -11522,7 +11582,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.2.5" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.2.8" }, "funding": [ { @@ -11538,20 +11598,20 @@ "type": "tidelift" } ], - "time": "2024-06-20T13:11:31+00:00" + "time": "2024-07-18T14:56:37+00:00" }, { "name": "sebastian/cli-parser", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "00a74d5568694711f0222e54fb281e1d15fdf04a" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/00a74d5568694711f0222e54fb281e1d15fdf04a", - "reference": "00a74d5568694711f0222e54fb281e1d15fdf04a", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { @@ -11587,7 +11647,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -11595,20 +11655,20 @@ "type": "github" } ], - "time": "2024-03-02T07:26:58+00:00" + "time": "2024-07-03T04:41:36+00:00" }, { "name": "sebastian/code-unit", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "6634549cb8d702282a04a774e36a7477d2bd9015" + "reference": "6bb7d09d6623567178cf54126afa9c2310114268" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6634549cb8d702282a04a774e36a7477d2bd9015", - "reference": "6634549cb8d702282a04a774e36a7477d2bd9015", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268", "shasum": "" }, "require": { @@ -11644,7 +11704,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", "security": "https://github.com/sebastianbergmann/code-unit/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" }, "funding": [ { @@ -11652,20 +11712,20 @@ "type": "github" } ], - "time": "2024-02-02T05:50:41+00:00" + "time": "2024-07-03T04:44:28+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "df80c875d3e459b45c6039e4d9b71d4fbccae25d" + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/df80c875d3e459b45c6039e4d9b71d4fbccae25d", - "reference": "df80c875d3e459b45c6039e4d9b71d4fbccae25d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", "shasum": "" }, "require": { @@ -11700,7 +11760,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" }, "funding": [ { @@ -11708,20 +11768,20 @@ "type": "github" } ], - "time": "2024-02-02T05:52:17+00:00" + "time": "2024-07-03T04:45:54+00:00" }, { "name": "sebastian/comparator", - "version": "6.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "bd0f2fa5b9257c69903537b266ccb80fcf940db8" + "reference": "131942b86d3587291067a94f295498ab6ac79c20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/bd0f2fa5b9257c69903537b266ccb80fcf940db8", - "reference": "bd0f2fa5b9257c69903537b266ccb80fcf940db8", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/131942b86d3587291067a94f295498ab6ac79c20", + "reference": "131942b86d3587291067a94f295498ab6ac79c20", "shasum": "" }, "require": { @@ -11777,7 +11837,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/6.0.0" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.0.1" }, "funding": [ { @@ -11785,20 +11845,20 @@ "type": "github" } ], - "time": "2024-02-02T05:53:45+00:00" + "time": "2024-07-03T04:48:07+00:00" }, { "name": "sebastian/complexity", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "88a434ad86150e11a606ac4866b09130712671f0" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/88a434ad86150e11a606ac4866b09130712671f0", - "reference": "88a434ad86150e11a606ac4866b09130712671f0", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { @@ -11835,7 +11895,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -11843,20 +11903,20 @@ "type": "github" } ], - "time": "2024-02-02T05:55:19+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "6.0.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ab83243ecc233de5655b76f577711de9f842e712" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ab83243ecc233de5655b76f577711de9f842e712", - "reference": "ab83243ecc233de5655b76f577711de9f842e712", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { @@ -11902,7 +11962,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -11910,20 +11970,20 @@ "type": "github" } ], - "time": "2024-03-02T07:30:33+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "7.1.0", + "version": "7.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4eb3a442574d0e9d141aab209cd4aaf25701b09a" + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4eb3a442574d0e9d141aab209cd4aaf25701b09a", - "reference": "4eb3a442574d0e9d141aab209cd4aaf25701b09a", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", "shasum": "" }, "require": { @@ -11938,7 +11998,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "7.1-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -11966,7 +12026,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/7.1.0" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" }, "funding": [ { @@ -11974,20 +12034,20 @@ "type": "github" } ], - "time": "2024-03-23T08:56:34+00:00" + "time": "2024-07-03T04:54:44+00:00" }, { "name": "sebastian/exporter", - "version": "6.1.2", + "version": "6.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "507d2333cbc4e6ea248fbda2d45ee1511e03da13" + "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/507d2333cbc4e6ea248fbda2d45ee1511e03da13", - "reference": "507d2333cbc4e6ea248fbda2d45ee1511e03da13", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", + "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", "shasum": "" }, "require": { @@ -12044,7 +12104,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.2" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.3" }, "funding": [ { @@ -12052,20 +12112,20 @@ "type": "github" } ], - "time": "2024-06-18T11:19:56+00:00" + "time": "2024-07-03T04:56:19+00:00" }, { "name": "sebastian/global-state", - "version": "7.0.1", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c3a307e832f2e69c7ef869e31fc644fde0e7cb3e" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c3a307e832f2e69c7ef869e31fc644fde0e7cb3e", - "reference": "c3a307e832f2e69c7ef869e31fc644fde0e7cb3e", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { @@ -12106,7 +12166,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -12114,20 +12174,20 @@ "type": "github" } ], - "time": "2024-03-02T07:32:10+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "376c5b3f6b43c78fdc049740bca76a7c846706c0" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/376c5b3f6b43c78fdc049740bca76a7c846706c0", - "reference": "376c5b3f6b43c78fdc049740bca76a7c846706c0", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { @@ -12164,7 +12224,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -12172,20 +12232,20 @@ "type": "github" } ], - "time": "2024-02-02T06:00:36+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "6.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "f75f6c460da0bbd9668f43a3dde0ec0ba7faa678" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f75f6c460da0bbd9668f43a3dde0ec0ba7faa678", - "reference": "f75f6c460da0bbd9668f43a3dde0ec0ba7faa678", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { @@ -12222,7 +12282,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.0" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -12230,20 +12290,20 @@ "type": "github" } ], - "time": "2024-02-02T06:01:29+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "bb2a6255d30853425fd38f032eb64ced9f7f132d" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/bb2a6255d30853425fd38f032eb64ced9f7f132d", - "reference": "bb2a6255d30853425fd38f032eb64ced9f7f132d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { @@ -12278,7 +12338,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -12286,20 +12346,20 @@ "type": "github" } ], - "time": "2024-02-02T06:02:18+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "6.0.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2f15508e17af4ea35129bbc32ce28a814d9c7426" + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2f15508e17af4ea35129bbc32ce28a814d9c7426", - "reference": "2f15508e17af4ea35129bbc32ce28a814d9c7426", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "shasum": "" }, "require": { @@ -12342,7 +12402,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" }, "funding": [ { @@ -12350,20 +12410,20 @@ "type": "github" } ], - "time": "2024-06-17T05:22:57+00:00" + "time": "2024-07-03T05:10:34+00:00" }, { "name": "sebastian/type", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8502785eb3523ca0dd4afe9ca62235590020f3f" + "reference": "fb6a6566f9589e86661291d13eba708cce5eb4aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8502785eb3523ca0dd4afe9ca62235590020f3f", - "reference": "b8502785eb3523ca0dd4afe9ca62235590020f3f", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb6a6566f9589e86661291d13eba708cce5eb4aa", + "reference": "fb6a6566f9589e86661291d13eba708cce5eb4aa", "shasum": "" }, "require": { @@ -12399,7 +12459,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/5.0.1" }, "funding": [ { @@ -12407,20 +12467,20 @@ "type": "github" } ], - "time": "2024-02-02T06:09:34+00:00" + "time": "2024-07-03T05:11:49+00:00" }, { "name": "sebastian/version", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "13999475d2cb1ab33cb73403ba356a814fdbb001" + "reference": "45c9debb7d039ce9b97de2f749c2cf5832a06ac4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/13999475d2cb1ab33cb73403ba356a814fdbb001", - "reference": "13999475d2cb1ab33cb73403ba356a814fdbb001", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/45c9debb7d039ce9b97de2f749c2cf5832a06ac4", + "reference": "45c9debb7d039ce9b97de2f749c2cf5832a06ac4", "shasum": "" }, "require": { @@ -12453,7 +12513,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/version/tree/5.0.1" }, "funding": [ { @@ -12461,7 +12521,7 @@ "type": "github" } ], - "time": "2024-02-02T06:10:47+00:00" + "time": "2024-07-03T05:13:08+00:00" }, { "name": "theseer/tokenizer", diff --git a/config/horizon.php b/config/horizon.php index 22d74be35..a155e9536 100644 --- a/config/horizon.php +++ b/config/horizon.php @@ -90,6 +90,7 @@ return [ 'redis:story' => 30, 'redis:mmo' => 30, 'redis:intbg' => 30, + 'redis:adelete' => 30, 'redis:groups' => 30, ], @@ -174,7 +175,7 @@ return [ 'production' => [ 'supervisor-1' => [ 'connection' => 'redis', - 'queue' => ['high', 'default', 'follow', 'shared', 'inbox', 'feed', 'low', 'story', 'delete', 'mmo', 'intbg', 'groups'], + 'queue' => ['high', 'default', 'follow', 'shared', 'inbox', 'feed', 'low', 'story', 'delete', 'mmo', 'intbg', 'groups', 'adelete'], 'balance' => env('HORIZON_BALANCE_STRATEGY', 'auto'), 'minProcesses' => env('HORIZON_MIN_PROCESSES', 1), 'maxProcesses' => env('HORIZON_MAX_PROCESSES', 20), @@ -188,7 +189,7 @@ return [ 'local' => [ 'supervisor-1' => [ 'connection' => 'redis', - 'queue' => ['high', 'default', 'follow', 'shared', 'inbox', 'feed', 'low', 'story', 'delete', 'mmo', 'intbg', 'groups'], + 'queue' => ['high', 'default', 'follow', 'shared', 'inbox', 'feed', 'low', 'story', 'delete', 'mmo', 'intbg', 'groups', 'adelete'], 'balance' => 'auto', 'minProcesses' => 1, 'maxProcesses' => 20, diff --git a/config/instance.php b/config/instance.php index 3c931cf7e..c3912740f 100644 --- a/config/instance.php +++ b/config/instance.php @@ -36,7 +36,7 @@ return [ 'network' => [ 'cached' => env('PF_NETWORK_TIMELINE') ? env('INSTANCE_NETWORK_TIMELINE_CACHED', false) : false, 'cache_dropoff' => env('INSTANCE_NETWORK_TIMELINE_CACHE_DROPOFF', 100), - 'max_hours_old' => env('INSTANCE_NETWORK_TIMELINE_CACHE_MAX_HOUR_INGEST', 6), + 'max_hours_old' => env('INSTANCE_NETWORK_TIMELINE_CACHE_MAX_HOUR_INGEST', 2160), ], ], diff --git a/config/services.php b/config/services.php index 58db77fe5..8f00697b5 100644 --- a/config/services.php +++ b/config/services.php @@ -35,4 +35,7 @@ return [ 'secret' => env('STRIPE_SECRET'), ], + 'expo' => [ + 'access_token' => env('EXPO_ACCESS_TOKEN'), + ], ]; diff --git a/database/migrations/2024_07_22_065800_add_expo_token_to_users_table.php b/database/migrations/2024_07_22_065800_add_expo_token_to_users_table.php new file mode 100644 index 000000000..4f7c4688d --- /dev/null +++ b/database/migrations/2024_07_22_065800_add_expo_token_to_users_table.php @@ -0,0 +1,36 @@ +string('expo_token')->nullable(); + $table->boolean('notify_like')->default(true); + $table->boolean('notify_follow')->default(true); + $table->boolean('notify_mention')->default(true); + $table->boolean('notify_comment')->default(true); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('expo_token'); + $table->dropColumn('notify_like'); + $table->dropColumn('notify_follow'); + $table->dropColumn('notify_mention'); + $table->dropColumn('notify_comment'); + }); + } +};