- Is spiriitlabs/form-filter-bundle a Laravel package?
- No. Despite often being listed alongside Laravel packages, SpiriitLabs FormFilterBundle is a Symfony bundle. It integrates through Symfony's bundle registration, service container and Form component, and depends on Doctrine ORM for query building. It will not install or behave idiomatically in a Laravel application without a bespoke adapter layer, so confirm your target stack before evaluating it further.
- How do I install spiriitlabs/form-filter-bundle?
- Install it with Composer using composer require spiriitlabs/form-filter-bundle, then register the bundle in your Symfony application's bundle configuration. You also need the Symfony Form component and Doctrine ORM available in the project, since the bundle builds Doctrine queries from form data. After registration, define your filter classes and wire them into the controllers or list actions that need filtering.
- Does FormFilterBundle work with Laravel Eloquent?
- No, it is built around Doctrine ORM, not Eloquent. The bundle's whole value proposition is translating form field values into Doctrine query conditions, so there is no Eloquent query builder integration. For a Laravel codebase, reimplementing the pattern natively with Eloquent scopes, form requests and query pipelines is usually cheaper than maintaining a custom bridge.
- Which Symfony and PHP versions does v12.3.0 support?
- A v12 major line typically targets a modern PHP floor and current Symfony releases such as 6.4 and 7.x, but you should verify the exact composer.json constraints before committing. Check the required PHP version and Symfony component constraints against your runtime, because a major bump may have dropped older Symfony minors. The VitePress documentation migration in v12.3.0 has no runtime impact.
- How does the bundle turn a Symfony form into a Doctrine query?
- You define a filter class that describes the form fields and how each field maps to a query condition, then hand the submitted filter form to the bundle so it can build a Doctrine query builder from the populated values. This keeps controllers free of conditional query-building code and makes filters reusable across search, listing and admin pages. The result is a declarative filter object you can reuse and test in isolation.
- Is v12.3.0 a breaking release, and is it safe to upgrade?
- v12.3.0 is a low-risk, additive minor release containing two changes: a documentation migration to VitePress and a new profiler capability for tracing filter-state persistence. There are no breaking changes, no deprecations and no new required configuration. You can adopt v12.3.0 directly as your baseline without staging through v12.2.0.
- What does the new profiler tracing in v12.3.0 actually do?
- It adds WebProfiler integration that traces how filter state is persisted and restored across requests, which is a historically fiddly area involving sessions and query strings. The feature is opt-in tooling and does not change runtime filtering behavior. It requires the Symfony web profiler to be present, so confirm it degrades gracefully in environments where web_profiler is disabled.
- What is the Laravel equivalent of FormFilterBundle?
- In Laravel you would typically combine form requests for validation with Eloquent query scopes or a dedicated query-builder pipeline class per model. That gives you the same separation of concerns the bundle provides in Symfony, without pulling in Doctrine or Symfony's Form component. For most Laravel applications this native approach is simpler and easier to test than wrapping a Symfony bundle.
- How do I migrate from hand-rolled repository filters to this bundle?
- Start incrementally: introduce one filter class per entity and bind it to a single list or search action first, leaving write paths untouched. Run the new filtering alongside your existing repository methods behind a feature flag on a low-traffic admin screen, and compare results before rolling it out broadly. Because v12.3.0 is non-breaking, you can adopt it directly rather than stepping through earlier 12.x releases.
- Is FormFilterBundle production-ready and actively maintained?
- The v12.x line is a mature major series, which suggests a stable API, but a two-pull-request release from a small maintainer team is worth weighing for bus-factor risk. Before adopting, check the install base, release cadence and the open-issue versus merged-PR ratio over the last twelve months. Also confirm whether backing is commercial or volunteer-only, and whether an existing internal filtering convention would be duplicated or replaced.