gl3n/http-query-string-filter-bundle
A Symfony bundle for filtering HTTP query string parameters, letting you validate, sanitize, and normalize incoming request data before it reaches your application logic. Keeps controllers clean by centralizing query-string filtering rules.
Architecture fit — poor, with a category mismatch. The package is a Symfony bundle (HttpQueryStringFilterBundle), not a Laravel package. It hooks into Symfony's kernel.request event, reads controller/action annotations via Doctrine, and delegates to Symfony's Validator and Security layers to validate, cast, and authorize query-string parameters. Laravel has no equivalent extension point: bundles, kernel listeners, and annotation-driven controller metadata do not exist in its lifecycle. In a Laravel codebase this package cannot be installed and used as intended; only its pattern transfers.
The underlying problem it solves is real and under-served. Typed, authorized query-string parameters (pagination, sort keys, filter sets) are a persistent source of defects in both frameworks — Laravel's $request->validate() validates shapes but does not cast, and authorization of individual parameters (e.g., "may this caller filter by cost_center?") has no first-class home in FormRequest. That gap is worth addressing internally regardless of this package's fate.
Integration feasibility — low. Three compounding blockers:
Technical risk — high, and concentrated in security-relevant surface. The package's entire job is to coerce and gate untrusted input. Abandoned input-handling code is the worst category of abandoned code: no CVE monitoring, no patching path, and behavior that silently diverges from current framework conventions. Specific hazards to assume until disproven: loose type coercion (e.g., "1abc" → 1), incomplete handling of array-vs-scalar parameter pollution (?page=1&page=2), and authorization checks that fail open on unrecognized annotation shapes. A fork inherits these risks plus the burden of auditing code no one on the team wrote.
Key questions for the requester:
Verdict: do not adopt as a dependency. Score of 0.055 is consistent with the evidence. Treat the repository as a design reference and cite it as prior art in an internal build.
Stack fit. For a Laravel target, the mapping is direct but requires rewriting, not wrapping:
| Package concept (Symfony) | Laravel equivalent |
|---|---|
kernel.request listener |
Middleware, or FormRequest::prepareForValidation() |
| Doctrine annotations on actions | PHP 8 attributes on the controller method, or a rules()/casts() pair on a FormRequest |
| Symfony Validator constraints | Laravel Validator rules |
| Annotation-declared authorization | authorize() on FormRequest, or a policy call per parameter |
The cleanest Laravel-native shape is a QueryParametersRequest base class that combines rules() (validation), casts() (typed hydration into a DTO), and authorize() (per-parameter gating), with results accessible as a readonly value object rather than raw $request->query(). This is ~150–250 lines and fully within team capability.
Migration path. There is nothing to migrate — no existing install base, no dependents. The sequence is:
Compatibility. If a Symfony dependency ever materializes, do not resurrect this bundle — target a current Symfony release (6.4/7.x) with attributes and MapQueryString/MapRequestPayload, which cover most of the same ground natively. That consideration should be recorded, not acted on.
Sequencing. Blocked on the key questions above. Do not begin implementation until the parameter-surface question (Q3) is answered, because it determines whether this is a validation utility or an authorization control — different review rigor, different owners.
Maintenance. Adopting the package means owning a hard fork from day one: no upstream to rebase onto, no security advisories to subscribe to, and PHP/Symfony version drift to manage indefinitely. The internal-build alternative has a smaller, better-understood surface and a normal maintenance cadence. Neither option is free; the fork is strictly worse.
Support. Single maintainer, no releases in nine years, no dependents to surface breakage. Expect zero responsiveness. Team members unfamiliar with Symfony's annotation-driven style will need ramp-up time to read the source, which is pure overhead if the target is Laravel.
Scaling. Negligible runtime cost either way — this is request-scoped validation on a small parameter set. The scaling concern is organizational: a one-off fork sitting outside the normal package lifecycle becomes tribal knowledge that decays as the author rotates off.
Failure modes to instrument for, whichever path is chosen:
Ramp-up. Low for a Laravel-native implementation (familiar primitives, standard testing). Moderate for reading the Symfony source as reference (annotations, kernel events). High for maintaining the fork, which requires skills the team likely does not otherwise need.
Recommendation: decline adoption, log the package as evaluated-and-rejected with the rationale, and fund the 2–3 week internal pattern build if the parameter-handling gap is confirmed against real endpoints. Revisit only if a Symfony service enters the estate — and even then, use current Symfony primitives rather than this bundle.
How can I help you explore Laravel packages today?