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 Filter Bundle

Query Filter Bundle Laravel Package

opwoco/query-filter-bundle

A PHP query filter bundle for turning request parameters into reusable, composable filters and applying them to database queries. It keeps search and listing endpoints clean, consistent, and secure while reducing boilerplate.

View on GitHub
Deep Wiki
Context7

Symfony 4 QueryFilterBundle that simplifies request filtering basing on different conditions (for Doctrine-based applications)

Frequently asked questions about Query Filter Bundle
What is opwoco/query-filter-bundle used for?
It is a Symfony 4 QueryFilterBundle that simplifies request filtering based on different conditions for Doctrine-based applications. It turns request parameters into reusable, composable filters that can be applied to database queries. This keeps search and listing endpoints clean, consistent, and secure while reducing boilerplate. It is not a Laravel package.
How do I install opwoco/query-filter-bundle with Composer?
Install it with Composer by requiring opwoco/query-filter-bundle in your Symfony 4 project. Then register the bundle in your Symfony application using the normal bundle registration conventions. You will also need Doctrine configured because the package is designed for Doctrine-based query filtering. Check the repository README for the exact namespace and configuration details.
Does opwoco/query-filter-bundle work with Laravel?
No. The package is explicitly a Symfony 4 QueryFilterBundle for Doctrine-based applications, not a Laravel package. It is not built around Laravel's Eloquent ORM or service container. Laravel developers should use Laravel-specific query filtering packages or custom query scopes instead.
Which Laravel versions are supported by this package?
None. This package targets Symfony 4 and Doctrine, so it does not declare Laravel version support. If you are building a Laravel application, choose a package designed for Eloquent and Laravel's request lifecycle. Do not assume Symfony bundle registration or Doctrine integration will work in Laravel without significant adaptation.
How does QueryFilterBundle integrate with Doctrine queries?
The bundle is intended for Doctrine-based applications and applies composable filters to database queries. It focuses on turning request filtering conditions into reusable filter logic rather than replacing Doctrine itself. The exact integration and configuration should be confirmed in the package documentation. You still rely on Doctrine for query execution and parameter binding.
Can I reuse and compose filters across multiple endpoints?
Yes, reusable and composable filters are the core purpose of the package. You can define filter behavior once and apply it across search or listing endpoints to keep behavior consistent. This reduces duplicated filtering code and makes endpoint logic easier to maintain. Composition also helps keep complex request filtering readable.
How do I keep request filtering secure with this bundle?
Define which request parameters, fields, and operators are allowed instead of passing raw request data into queries. Validate and sanitize incoming values, and restrict sortable or filterable fields to safe lists. Rely on Doctrine parameter binding rather than string-concatenating user input into DQL. Review the bundle configuration and your own endpoint rules before exposing filtering in production.
How should I test query filters in a Symfony application?
Unit test your filter definitions with representative request data and assert the expected filtering behavior. Add functional tests for search and listing endpoints using Symfony's test client and a Doctrine test database. Verify that allowed filters return expected results and disallowed parameters are rejected or ignored. This catches regressions in reusable filters and endpoint wiring.
What are alternatives to opwoco/query-filter-bundle?
Alternatives include custom Doctrine query builders, Doctrine filters, API Platform filters if you use API Platform, and Laravel-specific query filter packages for Laravel applications. Compare maintenance activity, Symfony 4 compatibility, Doctrine integration, and security controls. Because this package targets Symfony 4, also consider whether a newer Symfony-focused solution fits your project.
Is opwoco/query-filter-bundle production-ready and actively maintained?
The context identifies it as a Symfony 4 bundle, and Symfony 4 is end-of-life, so evaluate maintenance and security carefully before production use. Review the repository's recent activity, open issues, release history, and compatibility with your Symfony and Doctrine versions. Pin dependency versions and run integration tests in your own application. If long-term support is required, compare it with actively maintained alternatives.
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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core