Commit Graph

44 Commits (0435d08568baf6c502c623e8fc8075375d6ae151)

Author SHA1 Message Date
Your Name 0435d08568 RemoveAlwaysElseRector 5 days ago
Your Name a2e38e5ffe CompactToVariablesRector 5 days ago
Your Name 5949dc21c1 UseIdenticalOverEqualWithSameTypeRector 5 days ago
Your Name 0d999f5dda added return type to function 5 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
Your Name 277b8aa970 Use now() helper instead of Carbon::now() for current-time access
Aligns with the app's dominant convention (413 now()/today() call
sites vs 12 Carbon::now()). Carbon::parse() calls are untouched since
they parse arbitrary date strings, not current-time access.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 weeks ago
Your Name 6d8ad3885a Convert string class references to ::class
Applies the ::class conversion from pixelfed-staging PR #9 (patch 1/21),
formatted with Pint (short imported ::class form). Excludes the
ModelNamespaceMigrationTest namespace assertions, which intentionally
compare against literal namespace strings.
3 weeks ago
Shlee 10ae3fa8cb
Update AdminReportController.php 3 weeks ago
Daniel Supernault 0679216fa2
Update AdminReportController 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 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.
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 374344754e
Lint 9 months ago
Your Name 45a9a3b472 RemoveUnreachableStatementRector 11 months ago
Daniel Supernault 28990280ef
Update AdminReportController 2 years ago
Daniel Supernault ed9f2fbb09
Update AdminReportController 2 years ago
Daniel Supernault c0478f5f8f
Update AdminReportController 2 years ago
Daniel Supernault 06ebb514d7
Update AdminReportController 2 years ago
Daniel Supernault ef0ff78e4a
Add Remote Reports to Admin Dashboard Reports page 3 years ago
Daniel Supernault a16309ac18
Update AdminReportController, add story report support 3 years ago
Daniel Supernault e4d3b19642
Update AdminReportController, add `profile_id` to group by. Fixes #4685 3 years ago
David Gabriel 480394f3d8 [Bugfix] Fix for #4518: SQL query that generates the report list in the admin view needs to include the 'id' field 3 years ago
Daniel Supernault ed87ddb923
Update RemoteStatusDelete pipeline 3 years ago
Daniel Supernault c6ffda9618
Update admin moderation logic, only re-add top level posts 3 years ago
Daniel Supernault ae0d5d2d40
Update AdminReportController 3 years ago
Daniel Supernault 588ca653a8
Update admin autospam apis, remove autospam warning notifications when appropriate 3 years ago
Daniel Supernault c6cc6327d3
Redesigned Admin Dashboard Reports/Moderation 3 years ago
Daniel Supernault 85794784d4
Update DeleteAccountPipeline queue 4 years ago
Daniel Supernault b57066d15d
Fix email verification requests filtering to gracefully handle deleted accounts and accounts already verified 4 years ago
Daniel Supernault b4bc9fe31c
Update AdminReportController 4 years ago
Daniel Supernault 3f322e29d7
Update adminReportController, fix mail verification request 500 bug by changing filter precedence to catch deleted users that may still be cached in AccountService 4 years ago
Daniel Supernault 563817a94a
Update AdminReportController, add account delete button 4 years ago
Daniel Supernault b37c805172
Update AdminReportController 5 years ago
Daniel Supernault 83b48b5681
Update StatusService, improve cache invalidation 5 years ago
Daniel Supernault ae8c751796
Update Autospam service, add mark all as read and mark all as not spam options and filter active, spam and not spamreports 5 years ago
Daniel Supernault dff3dad1c8
Update AdminController, move report methods to AdminReports trait 5 years ago
Daniel Supernault bc65938757
Add manual email verification requests 5 years ago
Daniel Supernault fcef8c9a2f
Cache private profile id list 8 years ago
Daniel Supernault e926fbba35
Update AdminReportController, flush thumbnail cache after setting item as NSFW 8 years ago
Daniel Supernault 1e839d2517
Update AdminReportController 8 years ago
daniel b8abbdd90f Apply fixes from StyleCI 8 years ago
Daniel Supernault 707b686e8a
Add AdminReportController 8 years ago