graviton/rql-parser
A Laravel/PHP parser for Resource Query Language (RQL), turning filter, sort, and pagination expressions into structured query objects you can apply to Eloquent or other data sources. Clean syntax, extensible operators, and framework-friendly integration for flexible APIs.
LimitNode always carries an integer offset. Offset/limit typing is client-visible: a string/null/float offset that leaks into our translator produces off-by-one pages, empty result pages, or 500s at the API edge. This is a concrete reminder that the pagination half of the grammar is as much a contract as the filter half, and that we must type-normalize at the parser boundary, not downstream.Note on the change: the prior assessment treated this package as abandoned (last release 2019, archived). The v3.0.1 patch release invalidates that premise — there is an active v3 line under maintenance. That removes our single biggest objection, but a patch release is one data point, not a maintenance guarantee. Verify release cadence, supported PHP versions in composer.json, PHPUnit/CI status, and whether issues are being triaged before treating it as a safe runtime dependency.
Consider it when:
limit/offset model and you can normalize and clamp values after parsing (the v3.0.1 fix helps, but bounds-checking max page size is still our job).Look elsewhere when:
Practical path: adopt it behind an internal interface — parse to AST, validate against a per-endpoint field allow-list, normalize limit/offset (ints, clamped to a max page size), then compile in our own translator. That keeps the grammar swappable without an API break and confines the dependency to the parse step.
To executives (one paragraph): This is a small, single-purpose library that parses a standardized query syntax (RQL) into a structured form our code can act on. It is not a complete filtering solution — it does no database work, no authorization, and no validation of what a user is allowed to see. The risk picture has improved since our last review: the project was previously dormant and is now actively maintained, with a v3.0.1 bugfix correcting how pagination offsets are typed. That was our main blocker, and it is gone — but one patch is not a track record, so the remaining question is maturity and support guarantees, not abandonment. Ownership of the query translator, allow-lists, and security review still sits with us.
Recommendation: move from "do not adopt" to "pilot behind an internal interface." Adopt v3 as the parse step only if a short spike confirms current PHP/Laravel support, CI health, and a plausible release cadence. Budget the fork fallback, the field allow-list layer, and the AST → ORM translator as one line item with a named owner. If RQL is externally mandated by a partner contract, this release makes adoption cheaper than forking; if it is not mandated, keep the simpler maintained filtering approach as the default and revisit only when a customer commitment demands it.
To engineering: the appeal is unchanged — small, focused, AST-based, which is the right shape: parse once, validate against a per-endpoint allow-list, compile to your persistence layer. v3.0.1 fixes LimitNode to always expose an integer offset, so you no longer have to defensively coerce that field, though you should still clamp page size and validate bounds. The compiler, authorization rules, and security review remain yours. Keep the grammar behind our own interface so we can replace the parser without breaking the API contract, and pin the version until you've confirmed the maintenance cadence.
How can I help you explore Laravel packages today?