Commit Graph

37 Commits (5ebc1af91e96ca065ea55f20e94de5d874a442c8)

Author SHA1 Message Date
Your Name e7b70c6084 refactor: extract duplicate patterns into shared methods
1. Add FractalService with static item() and collection() helpers
   replacing 22 call sites that repeated the 4-line Fractal Manager
   + ArraySerializer boilerplate.

2. Add AccountInterstitial::createFromStatus() factory method
   consolidating 4 identical 15-line blocks that create interstitials
   with status metadata.

3. Add NotificationService::createNotification() to handle the
   repeated pattern of creating, caching, and registering a
   notification in the recipient's feed.

4. Add NotificationService::firstOrCreateNotification() for
   idempotent notifications (share/boost, mention) that should
   only notify once per actor+action+item combination.
4 weeks ago
Your Name 9c9e2a5a22 refactor: extract shared ActivityPub pool delivery into ActivityPubDeliveryService
Add ActivityPubDeliveryService::pool() using Laravel's Http::pool() to
consolidate the duplicated delivery pattern found across 10 jobs.

Updated jobs:
- StatusActivityPubDeliver
- StatusDelete
- StatusLocalUpdateActivityPubDeliverPipeline
- FanoutDeletePipeline
- SharePipeline
- UndoSharePipeline
- StoryFanout
- StoryExpire
- StoryDelete
- ProfileMigrationDeliverMoveActivityPipeline

The shared method accepts a Profile (sender), audience (inbox URLs),
and activity (payload array), handling signing, user-agent, timeout,
and concurrency in one place. No direct Guzzle usage remains in
app/Jobs/.
4 weeks ago
Shlee f018004b56
Merge pull request #6892 from pixelfed/refactor/move-models-to-namespace
Refactor/move models to namespace
4 weeks ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Your Name a142db87b4 polish 4 weeks ago
Your Name c807a8524c refactor: replace short facade aliases with fully-qualified imports
Convert all 273 short facade alias imports (e.g. 'use Cache;') to their
fully-qualified class names (e.g. 'use Illuminate\Support\Facades\Cache;')
across 193 files.

This resolves 643 PHPStan 'class.notFound' errors caused by the static
analyzer being unable to resolve global aliases, and aligns with modern
Laravel conventions. It also unblocks removing the aliases array from
config/app.php in a future change.

All 107 tests pass.
4 weeks ago
Shlee 5f831b48f7
Update ProfileMigrationDeliverMoveActivityPipeline.php 9 months ago
Daniel Supernault 53742fa699
Lint 9 months ago
dansup f9d430d6e6
Merge pull request #6299 from pixelfed/classNotFoundV1
Larastan: Fix Missing classes - Low risk
11 months ago
Your Name ca6c875bbb Fix PHPStan class.notFound issues 11 months ago
Your Name 72e840345e Fix PHPStan 'empty() always exists and is not falsy' errors
- Remove redundant empty() checks where variables are guaranteed to exist and be non-falsy
- Replace empty() with simple null/false checks where appropriate
- Maintain original logic while fixing static analysis issues
- Affected files:
  - app/Http/Controllers/GroupController.php
  - app/Http/Controllers/ProfileAliasController.php
  - app/Jobs/ImageOptimizePipeline/ImageUpdate.php
  - app/Jobs/InboxPipeline/DeleteWorker.php
  - app/Jobs/InboxPipeline/InboxValidator.php
  - app/Jobs/InboxPipeline/InboxWorker.php
  - app/Jobs/ProfilePipeline/HandleUpdateActivity.php
  - app/Rules/ExpoPushTokenRule.php
  - app/Services/AutospamService.php
  - app/Services/CollectionService.php
  - app/Services/NotificationAppGatewayService.php
  - app/Services/WebfingerService.php
  - app/Util/ActivityPub/Helpers.php
11 months ago
Your Name 4bbabfffb9 Misc pipelines defensive checks 11 months ago
dansup 59cccb1a25
Merge pull request #6223 from intentionally-left-nil/fix-update-no-shared-inbox
Fix null dereference error when updating the sharedInbox
11 months ago
dansup f2e4715749
Merge pull request #6194 from emlove/migration
Account Migration fixes
11 months ago
Anil Kulkarni 2f6c6830ea
Fix null dereference error when updating the sharedInbox for actor
updates.

The old code assumes that all update messages have an endpoints key.
However, both the endpoints key, as well as the sharedInbox may be
missing or null per spec. This commit fixes the bug by using isset to
check for the key to exist, otherwise coalescing it to null

server to server update messages are PUT operations, not PATCH,
so if the sharedInbox is missing in the update, it should always be
removed (if previously set)
11 months ago
Emily Love Watson e645008ad5
More precise 12 months ago
Emily Love Watson 49b0a7358e
Update follower records 12 months ago
Emily Love Watson 74bf7e45c8
Restore follower count logic 12 months ago
Emily Love Watson 451d59cb7c
fixies 12 months ago
Emily Love Watson a07f3595d8
More cleanup 12 months ago
Emily Love Watson 453ae4b32e
MVP migration 12 months ago
Daniel Supernault 3686c92122
Update Status storage, add SanitizerService to fix spacing in html stripped content 1 year ago
Daniel Supernault decaa2596d
Fix curl 2 years ago
Daniel Supernault 45bdfe1efd
Add Profile Migration federation 3 years ago
Daniel Supernault f8145a78cf
Add Profile Migrations 3 years ago
Daniel Supernault 8b843d620c
Update ProfilePipeline jobs 3 years ago
Daniel Supernault 9d621108b0
Add ProfilePurgeNotificationsByDomain pipeline job 3 years ago
Daniel Supernault 484a377a44
Add ProfilePurgeFollowersByDomain pipeline job 3 years ago
Daniel Supernault b2c9cc2318
Update IncrementPostCount job 3 years ago
Daniel Supernault 0d35f1a3e5
Update IncrementPostCount pipeline 3 years ago
Daniel Supernault edbcf3ed79
Update RemoteStatusDelete and DecrementPostCount pipelines 3 years ago
Daniel Supernault 5bea903409
Update HandleUpdateActivity 3 years ago
Daniel Supernault 1bf3ad7ed9
Update HandleUpdateActivity 3 years ago
Daniel Supernault 31afaba3d0
Update ProfilePipeline 3 years ago
Daniel Supernault 29961c4a80
Update ap inbox 3 years ago
Daniel Supernault 93077625ca
Update IncrementPostCount job 4 years ago
Daniel Supernault 149cf9dc29
Fix remote account post counts 4 years ago