Conversation
Complete L60 by resolving relation-name variables, unions, and relation objects through the shared type engine. Retain custom builders for relation shortcuts and concrete relations for direct eager callbacks. Cover callback types, completion, diagnostics, navigation, and Laravel runtime behavior. Keep this follow-up separate from L59.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Cover fallback and recovery paths across the stacked L61 diff, including missing stubs, stale metadata, ancestry cycles, union paths, and dynamic callbacks. Simplify unreachable relation-chain and eager-call fallthroughs. Keep assertions outside the parser panic boundary so failures cannot be swallowed. Verify 947 of 947 changed executable lines against main with a clean LLVM coverage run, plus the full tests and required lint checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relation callbacks could discard model alternatives, lose custom relationship bindings, or replace a callback type declared by the application. Complete L61 by retaining the full receiver and relationship context, respecting application overrides, and inferring inline eager-loading array callbacks through the shared forward walker.
The shared relation-chain resolver follows custom ancestry and union branches without erasing instantiated members. Generic ancestor projection now lives in the inheritance layer and binds the receiver's own arguments; the type resolver preserves different generic instantiations of the same class. Method matching follows PHP's case-insensitive rules. Both cursor-driven editor requests and diagnostics consume the same eager-array context, including nested paths, named arguments, and legacy arrays.
Calls containing only eager-load names skip callback context resolution. Cached classes and shared method metadata are retained, and repeated related models are deduplicated without dropping distinct relationship types.
Adds regressions for all 13 review failures and their interactions: 157 type assertions total, 20 completion/diagnostic cases with positive and negative member checks, navigation checks, and a plain PHP generic-union regression. Updates both demo projects and their runtime assertions; Laravel has 222 passing runtime checks.
Stack: depends on #453 (L60), above #452, #451, #450, #449, #448, and #447. This stacked follow-up targets upstream
main, so its diff includes the unmerged dependencies. The commits after L60 contain L61; merge the dependencies first.Validation: full
cargo test(14,852 passed), both required clippy runs, formatting, PHP syntax/runtime checks, and Laravel analysis with exactly the three intentional diagnostics. The plain PHP demo retains its existing 109 diagnostics with no added or removed messages.Coverage follow-up: adds regression tests for unresolved relations, absent framework stubs, stale declaration/cache metadata, ancestry cycles, trait precedence, generic related models, nested union keys, and dynamic callbacks. Parser-backed unit tests assert outside the parser panic boundary so assertion failures cannot be swallowed. Simplifies two unreachable fallthroughs without changing inference behavior.
A clean LLVM coverage run reports 100% cumulative patch line coverage (947/947 changed executable lines) against
main, including the uncovered paths inherited from L60. All 14,851 instrumented tests pass; the regular suite passes 14,852 tests including its doctest. Coverage configuration and exclusions are unchanged.