Commit Graph

18 Commits (96f7f794324187dfc595e7d4ea2538173ffdada0)

Author SHA1 Message Date
Your Name 0dbd78ca8e Lint 6 days ago
Your Name f3b6487451 BATCH 2 6 days 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
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
Shlee 6f5f6e3368
Update ReportController.php 1 month ago
dansup db0b096798
Staging (#6343)
* Prepared new docker

* Docker setup improvements and fixes

* Update DOCKER_SETUP.md

* Update DOCKER_SETUP.md

* Update DOCKER_SETUP.md

* Update DOCKER_SETUP.md

* Update DOCKER_SETUP.md

* Update DOCKER_SETUP.md

* Update .dockerignore

* DB/Redis health check

* updated health checks

* updated install guide

* updated DOCKER_SETUP

* Updated DOCKER_SETUP

* Updated DOCKER_SETUP

* Update and rename DOCKER_SETUP.md to DOCKER_COMPOSE_SETUP.md

* RemoveUnreachableStatementRector

* Update GroupActivityPubService.php

* Larastan: Add @property

* Delete rector.php

* more properties

* 2fa_enabled needs to be refactored

* Fix AdminUser.php syntax error - remove invalid property declaration

* Update AdminUser.php

* update

* Upgrade predis from v2.0 to v3.2

- Update predis/predis from ^2.0 to ^3.2
- Predis v3.2.0 includes RESP3 support, improved pipeline abstractions
- No code changes required, configuration remains compatible
- Tested successfully with tinker

* Upgrade predis from v2.0 to v3.2

* Update

* Update .env.docker.example

* Update DOCKER_COMPOSE_SETUP.md

* Create ImageDriverManager.php

* Update image.php

* Update ImageResizePipeline.php

* Update StoryComposeController.php

* Update AvatarOptimize.php

* Update Image.php

* Update composer.json

* Update AvatarOptimize.php

* update lock

* Update composer.lock

* update

* update

* update

* Allow to set new image types in admin interface

* Update composer, fix deps

* Update composer

---------

Co-authored-by: Shlee <github@shl.ee>
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Severin <savewish@icloud.com>
10 months ago
Daniel Supernault ccc7f2fc69
Update ReportController, fix type validation 1 year ago
Daniel Supernault 4e1d0ed596
Add admin report email notifications 4 years ago
Daniel Supernault 5206b09627
Update ReportController, handle json reports 6 years ago
Daniel Supernault d4c647cb4d
Update ReportController, add new report types 6 years ago
daniel b8abbdd90f Apply fixes from StyleCI 8 years ago
Daniel Supernault 3b7077a3d3
Update ReportController 8 years ago
Daniel Supernault 31a238e925 Add Report model/migration/controller 8 years ago