Commit Graph

75 Commits (7fa0615448feabaee8d8e3949d50ee6319010643)

Author SHA1 Message Date
Daniel Supernault 33dce75f2c
Pint app/ 4 weeks ago
Your Name 570a30d037 refactor: replace $fillable with $guarded = [] across all models
Aligns all models with the project convention (see .ai/rules/models.md).
Model::shouldBeStrict() in non-production will catch any issues early.
4 weeks ago
Your Name c891f34df6 polish 4 weeks ago
Your Name f2159197e8 fix: add return type declarations to Eloquent relation methods
Larastan 3.x requires explicit return types on relation methods to
verify relation existence when using with(), has(), etc. This adds
the appropriate return type declarations to all relation methods
flagged by the larastan.relationExistence rule.

Models fixed:
- Profile (avatar, statuses)
- User (profile)
- Status (profile, media, hashtags)
- DirectMessage (status, author, recipient)
- Report (reporter, status, reportedUser)
- Like (actor, status)
- Media (status)
- Notification (item)
- HashtagFollow (hashtag)
- OauthClient (user)
- Story (profile)
- StatusHashtag (status, hashtag, profile, media)
- AccountInterstitial (user)
- Hashtag (posts)
- CustomFilter (keywords)
- CustomFilterKeyword (customFilter)
- AdminShadowFilter (profile)
- ImportPost (status)
4 weeks ago
Your Name 7c964f3b4f fix: replace backslash-prefixed facade calls with imported references
Replace \Cache::, \Log::, \DB:: calls with their imported facade
equivalents. The backslash-prefix relies on global aliases which
PHPStan cannot resolve, causing class.notFound errors.
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.
1 month ago
Your Name 98267eb26f refactor: replace deprecated str_random() with Str::random()
str_random() is a deprecated helper from laravel/helpers that was
missed in the initial helpers removal. Replace all 18 call sites
with the modern Str::random() equivalent.
1 month 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
dansup c6b32882e0
Merge pull request #6483 from pixelfed/q2
Refactor: Updated Laravel casts to modern format
6 months ago
Daniel Supernault ef803ae9b6
Fix oauth/token 6 months ago
Your Name 2f06f30508 fix 7 months ago
Daniel Supernault 53742fa699
Lint 9 months ago
dansup 9d4fe07c29
Merge pull request #6333 from shleeable/clean2
Larastan: Add @property - Mergable
11 months ago
Your Name 4b14819923 Larastan: Add @property 11 months ago
Your Name 45a9a3b472 RemoveUnreachableStatementRector 11 months ago
dansup 225e835015
Staging (#6264)
* StatusPipeline defensive checks

* HomeFeedPipeline defensive checks

* DeletePipeline defensive checks

* InboxPipeline defensive checks

* MediaPipeline defensive checks

* PushNotificationPipeline defensive checks

* LikePipeline defensive checks

* FollowPipeline defensive checks

* ImageOptimizePipeline defensive checks

* Misc pipelines defensive checks

* Update CommentPipeline.php

* Update FollowPushNotifyPipeline.php

* Update LikePushNotifyPipeline.php

* Update FollowPushNotifyPipeline.php

* Update MentionPushNotifyPipeline.php

* Update MoveSendUndoFollowPipeline.php

* Update RemoteFollowPipeline.php

* Update FollowPushNotifyPipeline.php

* Update LikePushNotifyPipeline.php

* Update MentionPushNotifyPipeline.php

* Update Site/Config.php - config_cache only has 1 arg. No fallback.

* Update Bouncer.php - Called 'count' on Laravel collection, but could have been retrieved as a query.            🪪  larastan.noUnnecessaryCollectionCall

* Update Status.php - Missing use App\Models\Conversation;

* Larastan: Update UndoSharePipeline.php (Undefined variable: $status)

* Update ResilientMediaStorageService.php

* Update ImageS3UploadPipeline.php

* Larastan: Update Profile.php missing "use App\Avatar;"

* Larastan: Update MediaStorageService.php

* Larastan: Update MediaPathService.php

* Update MediaPathService.php

* Update MediaStorageService.php

* Update ImageS3UploadPipeline.php

* Larastan: Update AddUserDomainBlock.php

```
 ------ ------------------------------------------------------------- 
  Line   Console/Commands/AddUserDomainBlock.php                      
 ------ ------------------------------------------------------------- 
  37     Variable $domain in empty() always exists and is not falsy.  
         🪪  empty.variable                                           
 ------ ------------------------------------------------------------- 
```

* Larastan: Update CatchUnoptimizedMedia.php

```
 ------ ------------------------------------------------------------------------------------------------- 
  Line   Console/Commands/CatchUnoptimizedMedia.php                                                       
 ------ ------------------------------------------------------------------------------------------------- 
  31     Constructor of class App\Console\Commands\CatchUnoptimizedMedia has an unused parameter $media.  
         🪪  constructor.unusedParameter                                                                  
 ------ ------------------------------------------------------------------------------------------------- 
```

* Update DeleteUserDomainBlock.php

* Update StatusHashtag.php

* Update FixLikes.php

* Update User.php

* Update Installer.php

* Update SeedFollows.php

* Update DiscoverCategory.php

* Update FollowRequest.php

* Update Follower.php

* Update AccountController.php

* Update CustomFilterKeyword.php

* Update FederationController.php

* Update Inbox.php

* Update HttpSignature.php

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Shlee <github@shl.ee>
11 months ago
Shlee cc9bab1171
Update CustomFilterKeyword.php 11 months ago
Ross Bearman db03733415 Add admin invite interface and email support
This commit does two things:

* Add invite email support to AdminInviteCommand
  - Moves `invite_code` generation to AdminInvite model `creating` event
* Add admin invite management section under admin users dashboard
  - Adds `Admin/AdminUserInviteController` and associated `home` and
    `create` Blade templates.
  - Adds "Invites" button to admin user dashboard
1 year ago
Gavin Mogan 441c8e0d4c Generic OIDC Support
* Everything should be configurable by env variables
* Basic request tests
1 year ago
Daniel Supernault 77044ba193
Update CustomFilter model, add custom limits for max_content_scan_limit, max_filters_per_user, max_keywords_per_filter, max_keyword_length, max_pattern_length, max_reported_matches, max_create_per_hour, max_updates_per_hour so admins have more control over this feature 1 year ago
Daniel Supernault 578718c606
Update CustomFilterKeyword model, add setKeywordAttribute method 1 year ago
Daniel Supernault b86102823b
Update CustomFilter model and CustomFilterController 1 year ago
Daniel Supernault 3ff54b9ea6
Updaet CustomFilter model 1 year ago
Daniel Supernault 437d742ac4
Add custom filters
Add custom filters, compatible with Mastodon `/api/v2/filters`

Todo:
- [ ] fix routes
- [ ] finish other context filtering
1 year ago
Daniel Supernault 604746bd5e
Add AppRegister 2 years ago
Daniel Supernault bcf99d637f
Add ModeratedProfile model 2 years ago
Daniel Supernault 3d6b9badf4
Add groups models, controllers and services 2 years ago
Daniel Supernault 481314cd23
Update custom emoji, add config_cache support 3 years ago
Daniel Supernault 3f0539978e
Update ProfileMigration model, add target relation 3 years ago
Daniel Supernault f8145a78cf
Add Profile Migrations 3 years ago
Daniel Supernault 071163b47b
Add Curated Onboarding Templates 3 years ago
Daniel Supernault 2b5d723582
Update Curated Onboarding dashboard, improve application filtering and make it easier to distinguish response state 3 years ago
Daniel Supernault 8dac2caf1d
Add Curated Onboarding 3 years ago
Daniel Supernault 67c650b195
Add forgot email feature 3 years ago
Daniel Supernault c53894fe16
Add Parental Controls feature 3 years ago
Daniel Supernault 7dbdbf15a5
Add Roles & Parental Controls 3 years ago
Daniel Supernault f3f0175c84
Add DefaultDomainBlock model + migration 3 years ago
Daniel Supernault a492a95a0e
Update AdminShadowFilter, fix deleted profile bug 3 years ago
Daniel Supernault 5cea5aab3c
Add Domain Blocks 3 years ago
Daniel Supernault 176b4ed793
Add app:hashtag-related-generate command 3 years ago
Daniel Supernault 175203089b
Add Related Hashtags 3 years ago
Daniel Supernault a510c3e89c
Add AdminShadowFilter model/migration 3 years ago
Daniel Supernault a9220e4e01
Add Account Migrations 3 years ago
Daniel Supernault 45b9404ec1
Add Sign-in with Mastodon 3 years ago
Daniel Supernault fe6123c820
Update ImportPostController 3 years ago
Daniel Supernault b89c4f1cdc
Update ActivityPubFetchService, fix authorized_fetch support 3 years ago
Daniel Supernault 8c9f4da48a
Add ImportPost model, migration and service 3 years ago
Daniel Supernault a2305d5fdc
Added `/api/v1.1/accounts/app/settings` endpoint and UserAppSettings model to store app specific settings 3 years ago
Daniel Supernault 98cf8f32a0
Add Post Edits/Updates 3 years ago