Commit Graph

63 Commits (163cd9f589a485e6191c7ba8b3fa8f666deb80c8)

Author SHA1 Message Date
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 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 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 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 87d866f58d
Update SettingsController.php 1 month ago
Shlee 43f6686667
Update SettingsController.php 8 months ago
Daniel Supernault adc4cffc38
Add custom filter components 1 year ago
Daniel Supernault c5e7e91777
Add disable_embeds setting, and fix cache invalidation in other settings 2 years ago
Daniel Supernault dccec7d5a9
Update SettingsController, add photo_reblogs_only setting 3 years ago
Daniel Supernault 0eca48f1a4
Update SettingsController 3 years ago
Daniel Supernault c394fb76c6
Update sidebar/settings 3 years ago
Daniel Supernault 6eabe07ca3
Update DeleteAccountPipeline, dispatch on low queue 4 years ago
Daniel Supernault 4514ab1dbe
Update SettingsController, fix double json encoding and cache settings for 7 days 4 years ago
daniel ecffbd294e
Merge pull request #3490 from shleeable/patch-25
Update LabsSettings.php - CookieJar::make() expects string, true given.
4 years ago
Shlee 7447209236
Update SettingsController.php 4 years ago
Shlee e36be67c70 unwanted semicolons 4 years ago
Daniel Supernault 927a2a7d04
Update SettingsController 5 years ago
Daniel Supernault f363a3275a
Update SettingsController 5 years ago
Daniel Supernault ea0fc90c92
Add default licenses and license sync 5 years ago
Daniel Supernault 67e3f6048f
Update Settings, add default license and enforced media descriptions 5 years ago
Daniel Supernault f39f32c866
Update ApiController, fix notification bug 5 years ago
Daniel Supernault 0153ed6d64
Update Timeline, make text-only posts opt-in by default 5 years ago
Daniel Supernault c65d03788b
Update config() to config_cache() 5 years ago
Daniel Supernault 9cf962fff5
Update Settings, remove reports page 5 years ago
Daniel Supernault ffccf0fd41
Update SettingsController, add 404 to import when disabled 6 years ago
Daniel Supernault 0f0b3c2d05
Update SettingsController 7 years ago
Daniel Supernault cd9db4fe0c
Update SettingsController 7 years ago
Daniel Supernault 218f215938
Update SettingsController 7 years ago
Daniel Supernault e288b45c5b
Update SettingsController 7 years ago
Daniel Supernault 20caabc358
Update SettingsController 7 years ago
Daniel Supernault bcfbb0299c
Add Profile Sponsors 7 years ago
Daniel Supernault 3e7367366e
Update SettingsController 7 years ago
Daniel Supernault 0ff797c93c
Update SettingsController 8 years ago
Daniel Supernault de8d472527
Move data export to its own controller 8 years ago
Daniel Supernault f1edf83af4
Update SettingsController 8 years ago
Daniel Supernault 7ea8233a61
Update SettingsController 8 years ago
Daniel Supernault 5f9efbea3f
Fixes #1051 8 years ago
Daniel Supernault 4739c25fe0
Update Cache, prepare for laravel 5.8 8 years ago
Daniel Supernault fcef8c9a2f
Cache private profile id list 8 years ago
Daniel Supernault 507fbb90c0
Update SettingsController 8 years ago
Daniel Supernault 6f4da63a83
Update SettingsController 8 years ago
Daniel Supernault 44cac7c1df
Update SettingsController 8 years ago
Daniel Supernault 251cb72aa4
Update SettingsController 8 years ago
Daniel Supernault 5e371315c5
Update SettingsController 8 years ago
Daniel Supernault 0691961af0
Update SettingsController, add export endpoints 8 years ago
Daniel Supernault 9d808b27aa
Update SettingsController 8 years ago