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
- Aligned the query runner and lexer with the JSONPath comparison suite: JSON documents are now decoded as objects to preserve {} vs [], unsupported selectors no longer abort the runner, and dot-notation now accepts quoted keys with dots/spaces/leading @.
- Hardened filter parsing: boolean-only filters (`?(true|false|null)`), literal short-circuiting (`&& false`, `|| true`), and empty filters now return the expected collections instead of throwing.
- Slice filters gracefully skip non-countable objects.
Signed-off-by: Sascha Greuel <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
1
# Changelog
2
2
3
+
### 1.0.1
4
+
- Aligned the query runner and lexer with the JSONPath comparison suite: JSON documents are now decoded as objects to preserve `{}` vs `[]`, unsupported selectors no longer abort the runner, and dot-notation now accepts quoted keys with dots/spaces/leading `@`.
5
+
- Hardened filter parsing: boolean-only filters (`?(true|false|null)`), literal short-circuiting (`&& false`, `|| true`), and empty filters now return the expected collections instead of throwing.
- Rebuilt the test suite from scratch: removed bulky baseline fixtures and added compact unit/integration coverage for every filter (index, union, query, recursive, slice), lexer edge cases, and JSONPath core helpers. Runs reflection-free and deprecation-free.
5
10
- Achieved and enforced 100% code coverage across AccessHelper, all filters, lexer, tokens, and JSONPath core while keeping phpstan and coding standards clean.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ This is a [JSONPath](http://goessner.net/articles/JsonPath/) implementation for
11
11
- PHP 8.5+ only, with enums/readonly tokens and no `eval`.
12
12
- Works with arrays, objects, and `ArrayAccess`/traversables in any combination.
13
13
- Unions cover slices/queries/wildcards/multi-key strings (quoted or unquoted); negative indexes and escaped bracket notation are supported.
14
-
- Filters support path-to-path/root comparisons, regex, `in`/`nin`/`!in`, deep equality, and RFC-style null existence/value handling.
14
+
- Filters support path-to-path/root comparisons, regex, `in`/`nin`/`!in`, deep equality, RFC-style null existence/value handling, and literal-only short-circuiting (e.g., `?(true)`, `?(false)`, `&& false`, `|| true`).
15
15
- Tokenized parsing with internal caching; lightweight manual runner to try bundled examples quickly.
16
16
17
17
## Installation
@@ -65,7 +65,7 @@ Symbol | Description
65
65
`*` | Wildcard. All child elements regardless their index.
66
66
`[,]` | Array indices as a set
67
67
`[start:end:step]` | Array slice operator borrowed from ES4/Python.
68
-
`?()` | Filters a result set by a comparison expression
68
+
`?()` | Filters a result set by a comparison expression (constant expressions like `?(true)`/`?(false)` are allowed; unsupported/empty filters evaluate to an empty result)
69
69
`()` | Uses the result of a comparison expression as the index
0 commit comments