rollerworks/search
Rollerworks Search is a PHP search component that turns user-friendly query strings into structured search conditions. It integrates with Doctrine ORM/DBAL and Symfony, supports custom fields, validation, and flexible parsing for building powerful, safe search interfaces.
Architecture fit
rollerworks/search is a search-condition layer, not a search engine. You define a FieldSet (fields, comparators, value transforms), feed it raw user input or structured values, and get back a validated, serializable search-condition tree. It does not index, store, or execute anything — backend translation is explicitly someone else's job.between, gt, contains, in), or a requirement to serve the same search semantics against SQL now and a search engine later without rewriting the parser.Integration feasibility
FieldSet definitions, a string-input processor binding, a SearchCondition → Eloquent query-builder converter, exception-to-validation-error mapping, and a field-visibility layer for authorization.Technical risk
composer update.FieldSet definition time, not discovered at query time.FieldSet is the authorization boundary. A misconfigured definition silently exposes a column to filtering. Treat definitions as access-control code.Key questions
spatie/laravel-query-builder plus Eloquent scopes cover ~80% of the requirement at a fraction of the risk?Stack fit
FieldSets once and cache as singletons or config, never per request.SearchCondition exists.Migration path
LIKE behaviour, null handling).Compatibility
Sequencing
FieldSet, one converter, one real endpoint, real data.spatie/laravel-query-builder on that same endpoint.Maintenance
FieldSet growth as product adds filters is cheap; library upgrades are infrequent but occasionally manual.Support
FieldSet/authorization convention in an ADR. Without it, each team invents its own semantics and the "one search model" benefit evaporates.Scaling
FieldSet metadata and this is a non-issue.EXPLAIN review for any new comparator.Failure modes
FieldSet exposes a column the user must not filter on. Mitigate with negative tests per field; review definitions as security code.Ramp-up
FieldSet/transform/processor concepts; the domain vocabulary is the learning curve, not the code.FieldSet doubles as a machine-readable spec of what is searchable — useful for API contracts and user-facing documentation.Verdict: viable when we genuinely need a multi-resource search DSL with backend portability and persisted query semantics, and when we accept owning an adapter plus a fork contingency. For a handful of filters on a few endpoints, risk-adjusted cost favors spatie/laravel-query-builder or plain scopes. Low adoption and single-maintainer exposure make this "adopt deliberately, with an owner and an exit" — not a default.
How can I help you explore Laravel packages today?