Commit Graph

15 Commits (cb3da9999dd36dfd3603d3e610d8163727837d4e)

Author SHA1 Message Date
Daniel Supernault bbd7618c46
Update StoryService and add has_story to AccountTransformer 2 weeks ago
Your Name 9850aac676 Invalidate latest-story cache on remote story expiry and null-guard latest() 2 weeks ago
Your Name f0e951dcce fix: stop caching raw Eloquent models to prevent incomplete-object 500s
Caching an Eloquent model in a Cache::remember closure could deserialize
into a __PHP_Incomplete_Class on read, throwing 'attempt to access a
property on an incomplete object' and returning a 500. This surfaced on
guest profile pages (ProfileController::buildProfile reading
$user->user->settings) and affected several other latent call sites.

Changes:
- ProfileController: cache a plain settings array instead of the
  UserSetting model; fall back to defaults when the settings row is missing
- StoryService::getById: fetch a live model instead of caching it
- InstanceService::getByDomain, CustomEmoji::scan: cache arrays
- Site/MobileController: cache Page data as an array via a shared
  ManagesCachedPages trait; update blade views to array access
- Add public-route smoke/regression tests covering the cache-read path
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
Shlee 4bb9edcb22
Update StoryService.php 4 weeks ago
Shlee 942e15c652
Update StoryService.php 4 weeks ago
Shlee 2bc40e38f8
Merge pull request #6844 from pixelfed/fix/phpstan-static-method-not-found
fix: remove call to non-existent PollService::storyPoll()
4 weeks ago
Your Name 7bde84b23c fix: remove call to non-existent PollService::storyPoll()
The storyPoll() method was never implemented on PollService.
Replace with null to fix phpstan staticMethod.notFound.

Note: Passport::personalAccessClientId() is also flagged but deferred
to a separate PAT refactoring effort.
4 weeks ago
Your Name 49b85e9f22 fix: use query methods instead of collection methods (phpstan noUnnecessaryCollectionCall)
- PollService: pluck()->first() → value()
- StoryService: groupBy()->pluck()->count() → distinct()->count()
- Inbox: find($objects)->count() → whereIn('id', $objects)->count()
4 weeks ago
Daniel Supernault 53742fa699
Lint 9 months ago
Daniel Supernault 633351f6dc
Update StoryController, show active self stories on home timeline 3 years ago
Daniel Supernault 8f9d36bd3d
Cleanup, fixes #3440 4 years ago
Daniel Supernault 6ae1ba0a64
Update StoryService, fix division by zero bug 5 years ago
Daniel Supernault 6b0b2cfaa5
Update StoryService 5 years ago
Daniel Supernault 0573213093
Add StoryService 5 years ago