Commit Graph

34 Commits (d2fb9ec99870dd63ffc09f4f66e49eee0ad702fd)

Author SHA1 Message Date
Your Name 5ebc1af91e BATCH 1 1 week ago
Daniel Supernault 1d96c94054
Refactor Auth, remove expensive middleware 2 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
Daniel Supernault 33dce75f2c
Pint app/ 4 weeks ago
Your Name f54e6280bc comment dead code 4 weeks ago
Your Name ea2d054a40 Revert "fix: remove dead publicApi/homeApi methods from TimelineController"
This reverts commit 8cf5321566.
4 weeks ago
Your Name 8cf5321566 fix: remove dead publicApi/homeApi methods from TimelineController
- publicApi referenced non-existent StatusTimelineTransformer class
- Neither method is routed anywhere
- Removes unused imports (Fractal, Cache, Status, Profile, UserFilter)
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
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
Daniel Supernault 374344754e
Lint 9 months ago
Daniel Supernault af7face4da
Add Network Timeline 6 years ago
Daniel Supernault c8abffb811
Update TimelineController 7 years ago
Daniel Supernault eada999b3b
Update TimelineController, add network method 8 years ago
Daniel Supernault 582c4913d5
Update timeline controllers and routes 8 years ago
Daniel Supernault e7c4f084bc
Update TimelineController 8 years ago
Daniel Supernault 53e8da4837
Update TimelineController 8 years ago
Daniel Supernault cba743bb5b
Update TimelineController 8 years ago
Daniel Supernault 679a566466
Update TimelineController 8 years ago
Daniel Supernault 6d890aaf7f
Prepare 2FA 8 years ago
Daniel Supernault 197829224e
Update timeline logic to sort by date instead of id 8 years ago
Daniel Supernault 84ba7f4a9c
Update timeline logic to filter non public posts 8 years ago
daniel b8abbdd90f Apply fixes from StyleCI 8 years ago
Daniel Supernault c52c841eac
Update TimelineController, add filters 8 years ago
Daniel Supernault 5f13428197
Update TimelineController 8 years ago
Daniel Supernault 1fb532995a
Update TimelineController 8 years ago
Daniel Supernault e88777ed57 Add self posts to personal timeline
Closes #85
8 years ago
Daniel Supernault b4394605ee Update TimelineController 8 years ago
Daniel Supernault a7b186d7fb Add local timeline to TimelineController 8 years ago
Daniel Supernault 36b0bfb19a Update TimelineController 9 years ago
Daniel Supernault 5f775ce648 Add TimelineController 9 years ago