Commit Graph

672 Commits (5ebc1af91e96ca065ea55f20e94de5d874a442c8)

Author SHA1 Message Date
Shlee 186fa7c860
Update VideoThumbnail.php 4 weeks ago
Your Name 8b53f23e77 refactor: migrate LikePipeline to use NotificationService::firstOrCreateNotification 4 weeks ago
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
Shlee b4afda12d5
Merge pull request #6889 from pixelfed/refactor/status-delete-http-client
refactor: replace Guzzle pool with Laravel HTTP client in StatusDelete
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 2b1c9c818b polish 4 weeks ago
Your Name a0f721781a fix: improve NewStatusPipeline retry configuration
Previous config (timeout=5, tries=1) was too aggressive — a single
transient failure would permanently lose the status publication.

New config:
- timeout: 5 → 30 (sufficient for DB check + job dispatch)
- tries: 1 → 3 (recover from transient Redis/DB issues)
- maxExceptions: 1 (don't retry actual bugs)
- backoff: [5, 10] (exponential delay between retries)
4 weeks ago
Your Name 00dd5b3d92 refactor: replace Guzzle pool with Laravel HTTP client in StatusDelete
Replace direct GuzzleHttp\Client and Pool usage in fanoutDelete()
with Laravel's Http::pool() facade. This provides:

- Testability via Http::fake() in tests
- Consistent timeout/retry configuration
- No direct Guzzle dependency in application code
- Proper integration with Laravel's HTTP client features
4 weeks ago
Daniel Supernault 33dce75f2c
Pint app/ 4 weeks ago
Your Name 7042ea5367 fix: remove dead RemoteFollowPipeline (references uninstalled HttpSignatures package)
- Delete app/Jobs/RemoteFollowPipeline/RemoteFollowPipeline.php
- Delete app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php
- Neither job is dispatched anywhere in the codebase
- Remote follow is handled by ActivityPub Inbox and FollowPipeline
4 weeks ago
Shlee b7626891df
Merge pull request #6845 from pixelfed/fix/phpstan-variable-undefined
fix: resolve undefined variable bugs (phpstan variable.undefined)
4 weeks ago
Your Name e7ba43e2e1 fix: add missing use imports to resolve phpstan class.notFound errors
Add missing imports for Log, Cache, DB, FollowerService, StatusService,
LikeService, ReblogService, UserFilterService, AdminProfile, OauthClient,
and fix StatusTimelineTransformer reference (class didn't exist, replaced
with StatusTransformer).
4 weeks ago
Your Name ccd75dd903 fix: resolve undefined variable bugs (phpstan variable.undefined)
- AdminReportController: fix closure param name and remove reference to
  undefined $meta variable
- GroupsPostController: replace $status with $gp (the actual GroupPost
  variable in scope)
- PortfolioController: replace undefined $metadata with null
- DeleteWorker: remove Cache::set() call with undefined $key
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.
1 month ago
Your Name faa216b329 refactor: replace str_limit() with Str::limit()
Replace remaining 3 deprecated str_limit() calls with Str::limit().
No other deprecated str_* helpers remain in the codebase.
1 month ago
Your Name 98267eb26f refactor: replace deprecated str_random() with Str::random()
str_random() is a deprecated helper from laravel/helpers that was
missed in the initial helpers removal. Replace all 18 call sites
with the modern Str::random() equivalent.
1 month ago
Your Name edb4368b08 refactor: replace deprecated laravel/helpers with native alternatives
Replace all deprecated helper function calls:
- str_slug() → Str::slug()
- starts_with() → str_starts_with()
- ends_with() → str_ends_with()
- array_first() → Arr::first()
- array_last() → Arr::last()
- array_flatten() → Arr::flatten()

Remove laravel/helpers package from composer.json as it is no longer
needed and will not be maintained for Laravel 13.
1 month ago
Shlee fb655f1308
Merge pull request #6782 from ashleyhull-versent/shift-179490
Laravel Shift Preshift
1 month ago
Ashley Hull ab07a705e6
Merge branch 'dev' into shift-179490 1 month ago
Shlee fc8e025339
Merge pull request #6758 from pixelfed/shleeable-patch-4
Fix: INSTANCE_CUR_REG_NOTIFY_ADMIN_ON_VERIFY
1 month ago
Your Name 552a55c2d2 Upgrade images to v4 1 month ago
Shift 19880c2ffb
Convert string references to `::class`
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
1 month ago
Shlee a8bbbcd0ee
Update CuratedOnboardingNotifyAdminNewApplicationPipeline.php 1 month ago
Shlee ceba5af03f
Refactor admin notification logic in pipeline 1 month ago
Daniel Supernault 5f397f9135
Update StoryController 1 month ago
dansup 4e429289ee
Merge pull request #6683 from pixelfed/shleeable-patch-17
Hashtag feeds omit posts when federated hashtags differ only by letter case
1 month ago
dansup 5335bb702b
Merge pull request #6692 from pixelfed/shleeable-patch-27
protect against deleting directory containing files. check for empty folder.
1 month ago
dansup 01a7bad535
Merge pull request #6689 from pixelfed/shleeable-patch-24
Confirm status is dead before deleting media
1 month ago
dansup bdea28479c
Merge pull request #6669 from pixelfed/shleeable-patch-2
remove dead code?
1 month ago
Shlee aaffd145e2
Update StoryExpire.php 2 months ago
Shlee 8f48722b6b
Update MediaDeletePipeline.php 2 months ago
Shlee 6c5df90468
Update MediaDeletePipeline.php 2 months ago
Shlee f858db840e
Update StatusTagsPipeline.php 2 months ago
Shlee d24a5f5205
Update MoveMigrateFollowersPipeline.php 2 months ago
Shlee 885bb1bbd3
Update DeleteCommentPipeline.php 2 months ago
vinz ef56880a74 Fix videos never reaching cloud storage by downscaling in Blurhash
Blurhash::generate() allocates one PHP array per pixel of the source. At
roughly 255 bytes per pixel (measured: 224 MB peak for a 720x1280 frame) a
1920x1080 frame approaches half a gigabyte.

Image thumbnails survive this because they are capped at 640x640 in
Image::__construct() *and* run under that constructor's
ini_set('memory_limit', '1024M'). Video thumbnails get neither: FFmpeg saves
them at the source video's resolution, and VideoThumbnail never raises the
limit. So a video whose frame is 1080p or larger exhausts memory_limit.

That is a PHP fatal, not an \Exception, which has three consequences:

  - the catch block in VideoThumbnail::handle() does not catch it
  - the job never lands in failed_jobs, so nothing reports a problem
  - MediaStoragePipeline::dispatch() on the last line of handle() never runs

The video therefore stays on local disk permanently while images beside it
replicate normally. Reported in #2652 (2021-02-13) and diagnosed correctly in
that thread on 2021-11-04.

Two changes:

1. Blurhash::generate() downscales to 128px on the long edge before sampling.
   The result is a 4x4-component DCT, so full-resolution sampling adds
   essentially nothing: measured against the full-resolution hash, mean
   per-channel deviation of the decoded 24x24 preview is ~7.5/255 at a 32px
   sample, ~4.5/255 at 64px, ~2.5/255 at 128px, and no better at 256px. Peak
   memory for the frame above drops from 224 MB to 6 MB.

   This removes the ceiling for every caller rather than moving it, which is
   all that raising memory_limit would have done. Existing stored hashes are
   not recomputed, so nothing already published changes appearance.

2. VideoThumbnail wraps the blurhash in its own try/catch, so a decorative
   step can no longer skip the replication dispatch. Change 1 covers the
   fatal; this covers any ordinary exception.

Verified on a live instance with S3 cloud storage: a 1920x1080 video that
previously stranded now generates a blurhash, uploads original and thumbnail
to the bucket, sets cdn_url/thumbnail_url/replicated_at, and removes the local
copies. Existing images re-hash to visually identical previews.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 months ago
dansup 77f228da1f
Merge pull request #6501 from pixelfed/shleeable-patch-12
Refactored StatusDelete jobs that currently skip deletion if the profile is soft-deleted
6 months ago
Daniel Supernault ff2c7a60cf
Update CuratedOnboarding notify admin. Fixes #6400 6 months ago
Shlee 6959dd46db
Update StatusDelete.php 7 months ago
Shlee 1466d4ef7b
Update StatusDelete.php 7 months ago
Shlee 971050b134
Update StatusDelete.php 7 months ago
dansup 4b923ed0c6
Merge pull request #6456 from pixelfed/a7
Refactor: InboxWorker and InboxValidator moved lock after the signature validation.
7 months ago
dansup bff9aae06d
Merge pull request #6455 from pixelfed/a6
Refactor: Update ImportMediaToCloudPipeline to handle multiple files being uploaded.
7 months ago
dansup db0c8befea
Merge pull request #6452 from pixelfed/a3
bugfix: Remove a unnecessary join from Hashtag fanout
7 months ago
dansup 9969a394c3
Merge pull request #6451 from pixelfed/a1
bugfix: Video/ImageThumbnail marks media as processed even when thumbnail generation fails
7 months ago
Your Name 09aba28d88 fix 8 months ago
Your Name 492e78b95f fix 8 months ago
Your Name daea5da055 fix 8 months ago
Your Name 13d877b832 bug 8 months ago
Your Name 89c54bbd84 bad logic 8 months ago
Shlee 8d7b090e4c
Update DeleteRemoteProfilePipeline.php 8 months ago
dansup 712c279b0a
Merge pull request #6414 from pixelfed/shleeable-patch-13
Bugfix: Remote home fanout ignores mutes/blocks due to user_id vs profile_id mismatch
8 months ago
Shlee ec3e723a63
Update HashtagInsertFanoutPipeline.php 9 months ago
Shlee ce8836fa3b
Update FeedInsertPipeline.php 9 months ago
Shlee e3de5c8596
Update FeedInsertRemotePipeline.php 9 months ago
Shlee 5f831b48f7
Update ProfileMigrationDeliverMoveActivityPipeline.php 9 months ago
Shlee 16d374aa08
Update StatusLocalUpdateActivityPubDeliverPipeline.php 9 months ago
Shlee 6ff0c899f0
Update StatusActivityPubDeliver.php 9 months ago
Daniel Supernault 53742fa699
Lint 9 months ago
Daniel Supernault 374344754e
Lint 9 months ago
Daniel Supernault 4bc1e22121
Refactor LikePipeline and improve Undo Announce handling 11 months ago
Daniel Supernault efd351900d
Fix InboxWorker 11 months ago
Daniel Supernault 04bf75fb68
Revert inbox changes 11 months ago
Shlee 130dca355b
Regression - Fix federation - Update ActivityHandler.php (#6345)
* Update ActivityHandler.php

* Update ActivityHandler.php
11 months ago
dansup eae2dafcac
Merge branch 'staging' into intervention-laravel-clean 11 months ago
Shlee f839a1a67d
Update AvatarOptimize.php 11 months ago
Shlee 8ee07248d9
Update AvatarOptimize.php 11 months ago
Shlee b87b7c82b5
Update ImageResizePipeline.php 11 months ago
Your Name 45a9a3b472 RemoveUnreachableStatementRector 11 months ago
dansup 7881b09c2f
Merge pull request #6304 from pixelfed/classV2
Larastan: Fix Missing classes 2 - Medium risk
11 months ago
dansup 14d5fe940e
Merge pull request #6302 from pixelfed/miscClosureUnusedUseV2
Larastan: fix Unused Use - Low risk
11 months ago
dansup bacc8bc134
Merge pull request #6300 from pixelfed/argumentsV1
Larastan: Fix too many arguments - Medium risk
11 months ago
dansup f9d430d6e6
Merge pull request #6299 from pixelfed/classNotFoundV1
Larastan: Fix Missing classes - Low risk
11 months ago
dansup 6df58e67f2
Merge pull request #6290 from pixelfed/emptyv1
Larastan: 'empty() always exists and is not falsy' errors - Low risk
11 months ago
dansup 93217c8c63
Merge pull request #6284 from pixelfed/shleeable-patch-15
Larastan: Remove unused arg from Function config_cache - Safe/Mergable
11 months ago
Your Name 15cc07e602 Fix all class.notFound PHPStan issues - 31 fixes 11 months ago
Your Name 28ed625f12 Fix PHPStan closure.unusedUse issues - 7 fixes 11 months ago
Your Name b5c6984689 Fix PHPStan arguments.count issues 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
Shlee 4fa2942778
Update StoryFetch.php 11 months ago
Shlee f63346be32
Larastan: Update NewStatusPipeline.php - REVIEW 11 months ago
dansup 224053ecfa
Merge pull request #6244 from pixelfed/shleeable-patch-7
Larastan: Update ImageS3UploadPipeline.php (Variable $file might not be defined. )
11 months ago
dansup 3ea137dfd6
Merge pull request #6242 from pixelfed/shleeable-patch-5
Larastan: Update UndoSharePipeline.php (Undefined variable: $status)
11 months ago
dansup 0714d299a0
Merge pull request #6238 from shleeable/JobBatchv1-PushNotificationPipeline
JobBatch v1- PushNotification pipelines defensive checks
11 months ago
dansup 96c4da440d
Merge pull request #6237 from shleeable/JobBatchv1-HomeFeedPipeline
JobBatch v1- HomeFeed pipelines defensive checks
11 months ago
dansup 45453fd17b
Merge pull request #6236 from shleeable/JobBatchv1-ImageOptimizePipeline
JobBatch v1- ImageOptimizePipeline pipelines defensive checks
11 months ago
dansup 87e2953b19
Merge pull request #6235 from shleeable/JobBatchv1-FollowPipeline
JobBatch v1- Follow pipelines defensive checks
11 months ago
dansup 27daf6ec2b
Merge pull request #6234 from shleeable/JobBatchv1-MediaPipeline
JobBatch v1- Media pipelines defensive checks
11 months ago
dansup 6cc56548ca
Merge pull request #6233 from shleeable/JobBatchv1-LikePipeline
JobBatch v1- Like pipelines defensive checks
11 months ago
dansup 8e56d0cf83
Merge pull request #6232 from shleeable/JobBatchv1-DeletePipeline
JobBatch v1- Delete pipelines defensive checks
11 months ago
dansup 03e64efd68
Merge pull request #6231 from shleeable/JobBatchv1-StatusPipeline
JobBatch v1- Status pipelines defensive checks
11 months ago
dansup b4dacca924
Merge pull request #6230 from shleeable/JobBatchv1-InboxPipeline
JobBatch v1- Inbox pipelines defensive checks
11 months ago
dansup 17b9501e1e
Merge pull request #6229 from shleeable/JobBatchv1-MiscPipelines
JobBatch v1- Misc pipelines defensive checks
11 months ago
Shlee 57307aaff1
Update ImageS3UploadPipeline.php 11 months ago
Shlee d1defe35e5
Update ImageS3UploadPipeline.php 11 months ago
Shlee a647ad435c
Larastan: Update UndoSharePipeline.php (Undefined variable: $status) 11 months ago