chore: add IDE helper annotations to Eloquent models #81

Open
Charon wants to merge 1 commit from feat/ide-helper-annotations into dev
Member

Summary

Add PHPDoc @property, @property-read, @method, and @mixin annotations to the seven core Eloquent models for IDE autocompletion and static analysis support.

Models annotated:

  • Workspace -- all 35+ columns, 13 relationship collections, 2 computed attributes, scopes (active, ordered), factory
  • User -- all columns incl. tier/referral fields, relationships (workspaces, namespaces, boosts, referrals), factory
  • WorkspaceMember -- relationship properties (user, workspace, team, inviter), scope methods (forWorkspace, forUser, withRole, inTeam, owners)
  • WorkspaceInvitation -- all columns, relationships, scopes (pending, expired, accepted), factory
  • Namespace_ -- all columns incl. polymorphic owner, relationships, scopes (active, ordered, ownedByUser, ownedByWorkspace, accessibleBy)
  • Package (EntitlementPackage) -- all columns incl. pricing fields, relationships, scopes (active, public, base, addons, purchasable, free, ordered)
  • Feature (EntitlementFeature) -- all columns, relationships (packages, parent, children), scopes (active, inCategory, root)

Fixes #31

Test plan

  • Verify PHPStan/Larastan passes without new errors
  • Verify IDE autocompletion works for model properties, relationships, and scopes
  • Confirm no runtime behaviour changes (PHPDoc only)
## Summary Add PHPDoc `@property`, `@property-read`, `@method`, and `@mixin` annotations to the seven core Eloquent models for IDE autocompletion and static analysis support. **Models annotated:** - **Workspace** -- all 35+ columns, 13 relationship collections, 2 computed attributes, scopes (`active`, `ordered`), factory - **User** -- all columns incl. tier/referral fields, relationships (workspaces, namespaces, boosts, referrals), factory - **WorkspaceMember** -- relationship properties (`user`, `workspace`, `team`, `inviter`), scope methods (`forWorkspace`, `forUser`, `withRole`, `inTeam`, `owners`) - **WorkspaceInvitation** -- all columns, relationships, scopes (`pending`, `expired`, `accepted`), factory - **Namespace_** -- all columns incl. polymorphic owner, relationships, scopes (`active`, `ordered`, `ownedByUser`, `ownedByWorkspace`, `accessibleBy`) - **Package** (EntitlementPackage) -- all columns incl. pricing fields, relationships, scopes (`active`, `public`, `base`, `addons`, `purchasable`, `free`, `ordered`) - **Feature** (EntitlementFeature) -- all columns, relationships (`packages`, `parent`, `children`), scopes (`active`, `inCategory`, `root`) Fixes #31 ## Test plan - [ ] Verify PHPStan/Larastan passes without new errors - [ ] Verify IDE autocompletion works for model properties, relationships, and scopes - [ ] Confirm no runtime behaviour changes (PHPDoc only)
Charon added 1 commit 2026-03-24 13:56:12 +00:00
Add @property, @property-read, @method, and @mixin PHPDoc annotations
to the seven core Eloquent models for IDE autocompletion support.

Models annotated:
- Workspace: all columns, relationships, scopes (active, ordered)
- User: all columns, relationships, factory
- WorkspaceMember: relationship props, scope methods (forWorkspace, forUser, withRole, inTeam, owners)
- WorkspaceInvitation: all columns, relationships, scopes (pending, expired, accepted)
- Namespace_: all columns, relationships, scopes (active, ordered, ownedByUser, ownedByWorkspace, accessibleBy)
- Package: all columns, relationships, scopes (active, public, base, addons, purchasable, free, ordered)
- Feature: all columns, relationships, scopes (active, inCategory, root)

Fixes #31

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/ide-helper-annotations:feat/ide-helper-annotations
git checkout feat/ide-helper-annotations

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout dev
git merge --no-ff feat/ide-helper-annotations
git checkout feat/ide-helper-annotations
git rebase dev
git checkout dev
git merge --ff-only feat/ide-helper-annotations
git checkout feat/ide-helper-annotations
git rebase dev
git checkout dev
git merge --no-ff feat/ide-helper-annotations
git checkout dev
git merge --squash feat/ide-helper-annotations
git checkout dev
git merge --ff-only feat/ide-helper-annotations
git checkout dev
git merge feat/ide-helper-annotations
git push origin dev
Sign in to join this conversation.
No description provided.