Repository navigation
What's changed
Search Parser 1.0 turns the component list into a full, extensible search language while preserving the original parse() workflow.
Query language
- Add boolean expressions with
AND,OR,NOT, parentheses, and implicitAND. - Add comparison operators:
=,!=,>,>=,<, and<=. - Add explicit and open-ended ranges using
.., such asdate:2026-01-01..2026-12-31,score:10.., andscore:..20. - Add null, missing, and existence queries.
- Add escaping for quotes, colons, commas, backslashes, and parentheses.
- Add structured parse diagnostics and strict parsing through
parseResult().
Validation and integrations
- Add typed field schemas for allowlisting, coercion, enum validation, and database-field mapping.
- Add a parameterized SQL transform with named bindings and field-identifier validation.
- Add an Elasticsearch transform supporting boolean, term, range, wildcard, and existence queries.
- Make Eloquent transforms honor boolean expression grouping.
- Add query counting, array conversion, and JSON serialization.
Bug fixes
- Keep comma-separated Eloquent alternatives inside a nested
WHEREgroup soORclauses cannot escape surrounding conditions. - Correct the Eloquent hashtag transform namespace and field reference.
- Use logical complements for negated comparisons and require all negated list alternatives to match.
Compatibility note
- The original
parse()and transform APIs remain available. - Legacy numeric ranges such as
age:18-30remain supported. - Use the explicit
..separator for date and text ranges; hyphenated values are now treated as literal values instead of ambiguous ranges.
Verification
- 52 tests and 86 assertions pass on PHP 8.5.9.
- All PHP source and test files pass syntax checks.
- Composer strict validation passes.
Full changelog: v0.4...v1.0.0