Skip to content

Document opt-in model table resolution from Source attributes - #351

Open
QUAD69 wants to merge 4 commits into
phalcon:masterfrom
QUAD69:docs-source-attribute
Open

QUAD69 wants to merge 4 commits into
phalcon:masterfrom
QUAD69:docs-source-attribute

Conversation

@QUAD69

@QUAD69 QUAD69 commented Nov 8, 2026 •

Copy link
Copy Markdown

Document opt-in ORM table resolution from #[Source] in the Phalcon 5.24 guides, matching phalcon/cphalcon#17742 and its review request: phalcon/cphalcon#17742 (comment).

The model guide shows how to select AttributesReader before using Source, explains named and positional arguments, explicit-source precedence, table prefixes, per-class caching, inheritance, and compatibility with the configured metadata strategy. It also documents InvalidSourceTable for missing, empty, or non-string table names. The annotations guide links to this section; PHPDoc @Source remains ignored for table resolution.

The availability note states that Phalcon 5.23.0 lacks this behavior and requires a release containing the framework fix. The framework PR is still under review. The new guidance lives in the upcoming 5.24 documentation; the released 5.23 guides retain their existing behavior.

Related: phalcon/cphalcon#17741, phalcon/cphalcon#17742.

Validation after syncing upstream master and moving the guide to 5.24:

  • Both changed pages compile with @mdx-js/mdx.
  • Full pnpm build passes: 3152 pages built.
  • pnpm lint:docs passes: 3153 files lint clean.
  • The unchanged PHP usage example was previously executed against the patched extension and returns accounting_invoices.
  • git diff --check passes.

The final diff against master changes only docs-5.24/annotations.mdx and docs-5.24/db-models.mdx; generated API pages, routes and released-version manuals are unchanged.

Describe reader configuration, source precedence, prefixes and inheritance
for the model table resolution fix in phalcon/cphalcon#17742. Link the
annotations guide to the model guide and state the release requirement.

Assisted-by: Codex
Explain that missing, empty and non-string Source table names raise
InvalidSourceTable during source resolution, matching phalcon/cphalcon#17742.

Assisted-by: Codex
Bring in the upstream 5.24 documentation tree before moving the pending
Source integration guide to the upcoming release.

Assisted-by: Codex
Move the model Source attribute guide and annotations cross-reference to
the newly available 5.24 documentation. Restore the released 5.23 guides
and retain the availability note linking the unreleased framework fix.

Assisted-by: Codex

This branch has not been deployed

No deployments
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