refactor: consolidate User model external relationships #6

Open
opened 2026-02-20 16:34:28 +00:00 by Clotho · 0 comments
Member

Problem

The User model in Models/User.php contains relationships referencing classes not in this package (e.g. Page, Project, Domain, Pixel, and others from Core\Mod\Social, etc.). These fail silently or throw errors if the consuming application does not have these packages installed.

Impact

  • Package cannot be used as a standalone module
  • IDE analysis fails on undefined class references
  • Tests in isolation cannot instantiate the User model cleanly

Acceptance Criteria

  • Audit all User model relationships for undefined/external class dependencies
  • Add class_exists() guards or move app-specific relationships to the consuming application layer
  • Document which relationships are package-native vs. app-specific in CLAUDE.md

Discovered during automated scan (issue #3)

## Problem The `User` model in `Models/User.php` contains relationships referencing classes not in this package (e.g. `Page`, `Project`, `Domain`, `Pixel`, and others from `Core\Mod\Social`, etc.). These fail silently or throw errors if the consuming application does not have these packages installed. ## Impact - Package cannot be used as a standalone module - IDE analysis fails on undefined class references - Tests in isolation cannot instantiate the User model cleanly ## Acceptance Criteria - Audit all User model relationships for undefined/external class dependencies - Add `class_exists()` guards or move app-specific relationships to the consuming application layer - Document which relationships are package-native vs. app-specific in `CLAUDE.md` _Discovered during automated scan (issue #3)_
Clotho added the
review
discovery
refactor
labels 2026-02-20 16:34:28 +00:00
Clotho was assigned by Charon 2026-02-21 00:01:44 +00:00
Charon added the
agent-ready
label 2026-02-21 01:32:02 +00:00
Sign in to join this conversation.
No description provided.