-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #49331 [PropertyAccess] Allow escaping in PropertyPath (alanp…
…oulain) This PR was merged into the 6.3 branch. Discussion ---------- [PropertyAccess] Allow escaping in PropertyPath | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #41845 | License | MIT | Doc PR | TODO symfony/symfony-docs#... I'm not sure if it can be considered a feature or a fix. Currently there is no way to escape `.` and `[` when using `PropertyPath`. It can cause issue when we want to access a "property" containing a dot (for instance a key in an array). I tried to modify the regexp as little as possible and to handle (really) edge cases such as double escaping. Initially I had the issue in some Behat tests where I needed to evaluate some paths in a big JSON file (OpenAPI documentation). Some keys contain dots and I cannot test the JSON node when it's the case. Commits ------- d534287 feat(property-access): allow escaping in PropertyPath
- Loading branch information
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
CHANGELOG | ||
========= | ||
|
||
6.3 | ||
--- | ||
|
||
* Allow escaping `.` and `[` with `\` in `PropertyPath` | ||
|
||
6.2 | ||
--- | ||
|
||
|
This file contains 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
This file contains 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