L37 — Request input key completion from validation rules - #292
Merged
AJenbo merged 7 commits intoJul 28, 2026
Merged
Conversation
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
@AJenbo I think test are failing because of some permission issue. Can you please confirm that? |
Contributor
|
The benchmark fails for outsiders, hvaen't fully investigated if there is a solution, but it's not important for now. |
AJenbo
force-pushed
the
feat/request-input-key-completion-from-validation-rules
branch
from
July 28, 2026 17:05
f754470 to
e8689d4
Compare
Contributor
|
Thanks for working on this |
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.
Inside
$request->input('…')and its siblings, the acceptable field names are the keys of the rules array that validates the request. PHPantom now reads that array — from aFormRequest'srules()or avalidate()/Validator::make()call earlier in the same method — and offers those keys as completion, with go-to-definition to the rule that declares them.Two commits: a preparatory refactor that shares the open-quote scan between string detectors, then the feature. See the commit messages for the details.
Worth a reviewer's attention:
has()is both a request accessor and a relation method. A builder subject resolves as a relation first; only a request-typed subject falls through.virtual_members/laravel/validation_rules.rs, separate from the completion surface, so L38 (typedvalidated()array shapes) can reuse it. L38's backlog entry now points at it.StringCallContextgained acall_open_parenfield. It ships with the feature rather than the refactor commit because an unusedpub(crate)field tripsdead_codeand would failclippy -D warningson its own.Checklist
If applicable:
CHANGELOG.mdREADME.md,docs/,examples/)config-schema.json) — no new config options