ite/filtration-bundle
ITE FiltrationBundle is a Symfony bundle that adds configurable filtering to Doctrine entity queries. Define text, choice, date, boolean, and relation filters, then apply them to query builders to build dynamic search forms and listings with minimal setup.
ArrayCollection) and to database queries (QueryBuilder). That's an architecture decision worth making on purpose rather than letting each team hand-roll if ($request->has('status')) chains in controllers.Caveat to state in any write-up: despite being framed here as a Laravel package, this is a Symfony bundle built on Doctrine. It does not work in a Laravel/Eloquent codebase without a port. Every recommendation below assumes that mismatch.
Adopt only under narrow conditions:
ArrayCollection and QueryBuilder through one API. That dual-source capability is the genuinely interesting idea — in-memory for fast, database-free tests, database for production, identical filter definitions for both.Look elsewhere — or build — when:
To executives: We evaluated a small open-source component for filtering, sorting, and paginating data listings. The capability is real and recurring — it underpins admin tables, search results, and exports — but the package itself is unsuitable as a dependency: one star, zero downstream users, a single maintainer, no security process, and it targets Symfony/Doctrine rather than our stack. Recommendation: do not adopt; do capture the design. We'll build an equivalent internal component as part of planned list/filter work — roughly one to two engineer-weeks including tests — which removes third-party risk, gives us consistent filter behavior across screens, and creates a single place to enforce data-access rules and index coverage.
To engineering: Treat it as a reference, not a dependency. The transferable idea is a declarative filter definition applied identically to in-memory collections and to queries — that buys fast, database-free tests and one filtering vocabulary across API, admin, and exports. The non-transferable parts are the Symfony/Doctrine coupling and the absent maintenance. Build a thin internal abstraction: a FilterDefinition (field → type/operators/allowed), a ListQuery value object (filters, sorts, page), one adapter per persistence layer behind that contract, and pagination rendered as a JSON envelope in the API and a Blade component in the UI — no Twig coupling. Make two things non-negotiable from day one: a server-side allowlist for filter and sort field names (never trust client-supplied field names — that's the SQL-injection vector here), and one code path per endpoint so in-memory and database filtering never silently diverge. Push sort and pagination into the store, plan keyset pagination for large tables, and pair the field allowlist with an index review so exposing a filter doesn't turn into a full scan.
Bottom line: low adoption risk only if we own the code. The opportunity here is the pattern, not the package.
How can I help you explore Laravel packages today?