Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Query Parser Laravel Package

gdbots/query-parser

A PHP library for parsing query strings into a structured AST, with support for boolean operators, fielded terms, grouping, ranges, and wildcards. Useful for validating and translating user search input into database queries.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Search UX scope: Decide whether hashtags, mentions, and quoted phrases should be first-class search tokens, filter chips, or highlighted results.
  • Feature prioritization: A low-effort way to support search-term extraction, saved-search analytics, content tagging, and mention/hashtag discovery without building custom tokenization.
  • Build vs. buy: Apache-2.0 licensed PHP library that can replace ad hoc regex for basic lexical parsing, but should be treated as a narrow utility, not a search platform.
  • Use cases: Query normalization, hashtag/mention extraction, autocomplete inputs, search analytics, result highlighting, routing tokens to a full-text engine, and parsing saved searches.
  • Out of scope: Boolean grammar, fielded search, relevance ranking, stemming, synonyms, fuzzy matching, multilingual NLP, moderation classification, or semantic entity extraction.

When to Consider This Package

  • Consider it when you need lightweight PHP/Laravel-side tokenization of free-text search into terms, phrases, hashtags, and mentions, and you can validate compatibility with your PHP/Laravel versions.
  • The v3.0.0 release requiring PHP 8.1+ and replacing the library's custom enum classes with native PHP enums is a positive modernization signal: the package is not abandoned mid-2021, and it now targets a supported PHP baseline.
  • It remains a reasonable fit for internal tools, prototypes, social/content products, and search-analytics utilities where permissive licensing and no external service are valuable.
  • Adoption should still be gated on a short spike, pinned dependency, wrapper service/adapter, and tests for edge cases. The breaking enum change means any existing integration must audit type checks, serialized values, instanceof usage, and persisted token data before upgrading. Star count and dependent count remain thin validation signals.
  • Look elsewhere if you need active maintenance guarantees (this is a single modernization release, not a proven cadence), modern PHP/Laravel support certainty, boolean operators, field filters, escaping rules, relevance ranking, stemming/synonyms, multilingual NLP, or search-engine-native parsing.
  • Prefer Elasticsearch/OpenSearch/Meilisearch/Postgres full-text or Laravel Scout capabilities when the real requirement is search relevance, not lexical tokenization.

How to Pitch It (Stakeholders)

  • Executives: A small Apache-2.0 PHP component that turns user search strings into useful tokens for hashtag/mention filtering, search analytics, and better search UX at low cost. The v3.0.0 release signals renewed maintenance and moves to native PHP enums, but it is a breaking change and the project still has limited ecosystem validation. Recommend a time-boxed spike, not a platform bet.
  • Engineering: A composable lexical parser to wrap behind an internal interface, pin, and test. v3.0.0 requires PHP 8.1+ and swaps home-grown enum classes for native PHP enums — treat this as a breaking upgrade requiring code and data-migration review, and confirm Laravel version support before adopting. It is not a relevance engine or full query grammar; keep a fallback custom tokenizer if compatibility or edge cases become a problem.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource