Commit Graph

131 Commits (904b74c09a49ce1bc17672c4be048ce326fb9737)

Author SHA1 Message Date
Daniel Supernault 9909bd0d33
Fix video embeds. Closes #7373 4 days ago
Your Name c57e5d8ed7 adding type 6 days ago
Your Name 5ebc1af91e BATCH 1 6 days ago
Your Name e3b6cebf27 Fix MariaDB driver detection and reblog caption null inserts
Laravel 11 exposes MariaDB as a dedicated 'mariadb' driver, so
config('database.default') === 'mysql' checks silently misclassified
MariaDB as the non-mysql (postgres) branch.

- Add App\Util\Database\DatabaseDriver with isMysqlLike()/isPgsql()
  plus db_is_mysql_like()/db_is_pgsql() global helpers.
- Route all database.default driver checks through the helpers so
  MySQL and MariaDB are treated as one group.
- Use '' (not null) for share/compose caption+rendered, valid whether
  the column is nullable or NOT NULL (it is NOT NULL on MySQL/MariaDB).
- Guard pgsql strtolower() in registration against missing fields.
- Scope CustomEmoji::duplicateShortcodes to the grouped column for
  Postgres GROUP BY validity.
- Remove stale Postgres guard in status:dedup; use havingRaw for
  cross-driver HAVING.
1 week ago
Daniel Supernault 1e6ce226e0
Refactor StatusController 2 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 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 54cfdf3c2b refactor: add return type declarations to controller methods
Adds explicit return type declarations to 498 controller methods
across 88 files. Types inferred from return statements:

- JsonResponse for response()->json() returns
- RedirectResponse for redirect()/back() returns
- View (contract) for view() returns
- Response for response() returns
- void for methods with no return value
- array for array returns
- string/int/bool for scalar returns

Also fixes 3 methods with incorrect bare returns:
- AvatarController::deleteAvatar - bare return → json response
- ImportPostController::checkPermissions - bare return → true
- RemoteAuthController::accountToId - bare return → empty array
4 weeks ago
Your Name ffcef3eb2d fix: replace Auth facade with $request->user() in request-scoped classes
Replace Auth::user() with $request->user() and Auth::check() with
$request->user() !== null (or ! $request->user()) across all
controllers and middleware that have access to the request object.

This resolves 99 larastan.noAuthFacadeInRequestScope errors and
improves Octane compatibility.

For protected helper methods without $request in scope, uses the
request() helper instead.

Methods that previously lacked a Request parameter but used Auth
facade now accept Request $request via Laravel's auto-injection.
4 weeks ago
Your Name 1617734907 Revert "Merge pull request #6851 from pixelfed/fix/phpstan-auth-request-scope-2"
This reverts commit ce4baf6995, reversing
changes made to 9235cb979a.
4 weeks ago
Your Name 0939f495bb fix: replace Auth facade with $request->user() in request-scoped classes
Replace Auth::user() with $request->user() and Auth::check() with
$request->user() !== null (or ! $request->user()) across all
controllers and middleware that have access to the request object.

This resolves 99 larastan.noAuthFacadeInRequestScope errors and
improves Octane compatibility.

For protected helper methods without $request in scope, uses the
request() helper instead.

Methods that previously lacked a Request parameter but used Auth
facade now accept Request $request via Laravel's auto-injection.
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
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.
4 weeks 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.
4 weeks ago
Daniel Supernault 40aef7a212
Update GroupsFeedController 1 month ago
Daniel Supernault 7f7387ee4d
Update StatusController, fix mimeTypeCheck 1 year ago
Daniel Supernault 1d2f76c8e5
Postgres fixes 2 years ago
Daniel Supernault 1da08feed0
Update StatusController to handle Moved accounts 2 years ago
Daniel Supernault 83098428bb
Update StatusController, fix unlisted post guest/ap access bug 2 years ago
Daniel Supernault 25d41901ec
Lint 2 years ago
Daniel Supernault a75b89b239
Update StatusController, cache AP object 2 years ago
Daniel Supernault c5e7e91777
Add disable_embeds setting, and fix cache invalidation in other settings 2 years ago
Daniel Supernault 9a7acc12a6
Update StatusController, refactor status embeds 2 years ago
Daniel Supernault 5071aaf408
Update activitpub setting, use config_cache() 3 years ago
Daniel Supernault bf46f6f5f4
Update config_cache 3 years ago
Daniel Supernault ed87ddb923
Update RemoteStatusDelete pipeline 3 years ago
Daniel Supernault c167af43a4
Update StatusController, disable embeds from spam accounts 3 years ago
Daniel Supernault 738925c20d
Update StatusController, allow users to delete replies to posts 4 years ago
Daniel Supernault 1b53174d3a
Update StatusController 4 years ago
Daniel Supernault 257c094911
Update StatusDelete pipeline, dispatch async 4 years ago
a e6e16d2cdd Fix: Use correct response type and remove Accept from http signature 4 years ago
a e380868b44 fix typo: http -> https 4 years ago
a 6bf1bea325 Fix: Use correct Content-Type over ActivityPub
This was causing federation issues
4 years ago
Daniel Supernault 6e214904a8
Update StatusController 4 years ago
Daniel Supernault 04e8c96a7e
Update status deletion, fix database lock issues and side effects 4 years ago
Daniel Supernault 7734dc033b
Add instance post/profile embed config setting 4 years ago
Daniel Supernault 72e3d89118
Update controller signatures, fix mysql 8 support 5 years ago
Daniel Supernault 71dff472cc
Update StatusController, redirect status view for authed users to Metro 2.0 UI 5 years ago
Daniel Supernault 548a12a4c2
Update StatusController, set missing reblog/share type 5 years ago
Daniel Supernault 6cfd6be523
Add ReblogService, improve reblogged state for api entities 5 years ago
Daniel Supernault de42d84c11
Update ApiV1Controller, fix reblogs endpoints 5 years ago
Daniel Supernault d820669bd1
Update StatusController, change param signature 5 years ago
Daniel Supernault 83b48b5681
Update StatusService, improve cache invalidation 5 years ago
Daniel Supernault 9f4f983f27
Update ap helpers, set text type when appropriate 5 years ago
Daniel Supernault c8e40e0fd3
Update SharePipeline, add Undo->Announce support 5 years ago
Daniel Supernault d48ebb829c
Update StatusController, improve share api perf (11s to 72ms) 5 years ago
Daniel Supernault f3bf2fd41e
Update StatusController, add cache invalidation for timeline cursor 5 years ago
Daniel Supernault 7cbd6bc36d
Update StatusController, use transactions for status views 5 years ago
Daniel Supernault 3de44f3392
Update Timeline.vue, batch api views 5 years ago
Daniel Supernault 53134208fe
Update config() to config_cache() 5 years ago