You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(laravel): ParentField pairs the wrong index for nested wildcard parents #59
From Code Review Partner's review of #55 (minor, deferred past 3.0.0): for a parent field like items.0.addresses.*.country, ParentField resolves the wildcard against the wrong index, so a child rule can check against another row's country.
Acceptance: a failing test with nested arrays (two items, two addresses each, different countries) passes after the fix; existing rule tests stay green.
In progress. Draft PR #65 has the failing test: three nested cases (a fixed outer index with a wildcard inner, two wildcards, and a parent one level up). The first fails today because the outer index fills the wildcard.
Plan: pair each * in the parent field with the attribute segment at the same position, the way Laravel lines up wildcard keys, instead of taking numeric segments in order. Invariant: the existing single-level pairing (addresses.*.country) and plain field names keep working. Next: the fix, then the full suite and the quality checks on the changed lines.
Ready for review: #65. Parent-field wildcards now pair by depth, so each nested address is checked against its own country. The new nested-array test failed before the fix and passes now. The full suite passes (87 passed, 1 skipped), and phpstan and pint are clean. The PR lists the complexity, duplication and mutation numbers. Waiting on review.
Notes: there is no Infection or coverage driver on this machine, so the mutation check on this PHP repo was run by hand.
Activity
parsilver commentedon Nov 16, 2026
Moving to Ready: the acceptance above is enough to build from, and nothing else touches this rule.
parsilver commentedon Nov 16, 2026
Work has started on this, on branch fix/59-parentfield-pairs-wrong-index.
parsilver commentedon Nov 16, 2026
In progress. Draft PR #65 has the failing test: three nested cases (a fixed outer index with a wildcard inner, two wildcards, and a parent one level up). The first fails today because the outer index fills the wildcard.
Plan: pair each
*in the parent field with the attribute segment at the same position, the way Laravel lines up wildcard keys, instead of taking numeric segments in order. Invariant: the existing single-level pairing (addresses.*.country) and plain field names keep working. Next: the fix, then the full suite and the quality checks on the changed lines.fix(laravel): pair ParentField wildcards by depth in nested arrays
parsilver commentedon Nov 16, 2026
Ready for review: #65. Parent-field wildcards now pair by depth, so each nested address is checked against its own country. The new nested-array test failed before the fix and passes now. The full suite passes (87 passed, 1 skipped), and phpstan and pint are clean. The PR lists the complexity, duplication and mutation numbers. Waiting on review.
Notes: there is no Infection or coverage driver on this machine, so the mutation check on this PHP repo was run by hand.
parsilver commentedon Nov 16, 2026
Fixed in #65 and released as 3.0.1. CI was green on main, and Composer's metadata serves 3.0.1 (
composer require farzai/geonames:^3.0.1).