Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[JsonPath] Add utils methodsfirst
andlast
toJsonPath
builder#60188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
JsonPath
builderJsonPath
builderJsonPath
builderJsonPath
builderThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good idea, this names are the are commonly used in libraries.
@@ -43,11 +43,21 @@ public function deepScan(): static | |||
return new self($this->path.'..'); | |||
} | |||
public function anyIndex(): static |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That's good that you renamed this method. Its name wasn't clear (to me).
Thank you@alexandre-daubois. |
c16162f
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
JsonPath
builderfirst
andlast
toJsonPath
builder
Uh oh!
There was an error while loading.Please reload this page.
Small DX improvements that goes with#60105 and#60083.
This PR adds two new methods,
first()
andlast()
, added to JsonPath builder. This voluntary reminds methods from the DomCrawler component. The goal is not to add every possible method, but I thinkfirst()
andlast()
are common enough to be added.I also propose to rename
anyIndex()
toall()
.