Skip to content

docs(eloquent): fix stale @method annotations after __callStatic fix#63

Merged
benkhalife merged 1 commit into
mainfrom
fix/stale-method-annotations-after-callstatic-fix
Jun 30, 2026
Merged

docs(eloquent): fix stale @method annotations after __callStatic fix#63
benkhalife merged 1 commit into
mainfrom
fix/stale-method-annotations-after-callstatic-fix

Conversation

@benkhalife

Copy link
Copy Markdown
Member

The IDE-helper @method block on Model still typed chainable methods (select, where, orderBy, join, groupBy, limit/offset, dump) as returning Foxdb\Query\Builder — accurate before the __callStatic fix, but stale afterwards, since static::query()->$name(...) now returns ModelBuilder. This caused IDEs to flag with() as unknown when chained after select(), even though it works correctly at runtime.

Updates all chainable-method annotations to ModelBuilder and adds an explicit @method for with() returning EagerBuilder. Terminal methods (get, count, paginate, insert, ...) were already correctly typed and are unchanged. Docblock-only change — no runtime behaviour affected.

The IDE-helper @method block on Model still typed chainable methods
(select, where, orderBy, join, groupBy, limit/offset, dump) as
returning Foxdb\Query\Builder — accurate before the __callStatic fix,
but stale afterwards, since static::query()->$name(...) now returns
ModelBuilder. This caused IDEs to flag with() as unknown when chained
after select(), even though it works correctly at runtime.

Updates all chainable-method annotations to ModelBuilder and adds an
explicit @method for with() returning EagerBuilder. Terminal methods
(get, count, paginate, insert, ...) were already correctly typed and
are unchanged. Docblock-only change — no runtime behaviour affected.
@benkhalife benkhalife merged commit 7fb5aa6 into main Jun 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant